5. Start the server

5. Start the server

With an AgentCard and an AgentExecutor ready, you can start an A2A-compliant HTTP server.

In the official Python SDK examples, the server is typically built from:

  • a request handler that routes JSON-RPC calls to your executor, and
  • an HTTP application that exposes A2A endpoints and the well-known AgentCard endpoint.

What to look for in the HelloWorld example

In a2a-samples, the HelloWorld server entrypoint shows the wiring clearly:

  • DefaultRequestHandler connects your executor to protocol methods and uses a TaskStore to track task state.
  • A2AStarletteApplication (or a similar app builder) exposes the A2A HTTP endpoints and serves the AgentCard.
  • uvicorn runs the ASGI application.

Running the example

From the a2a-samples repository root (with your virtual environment activated), run:

python samples/python/agents/helloworld/__main__.py

You should see logs indicating the server is listening (the port should match the url in your AgentCard).

Next, you’ll send requests using the test client.