agentc
GitHubagentc-sh/agentc
agentc
GitHubagentc-sh/agentc
›Introduction
Get started›Concepts in 5 minutes›Build your first agent›Add your first tool›Serve and connect
Concepts›Architecture overview›The manifest›The compilation pipeline›Archetypes›The graph›Tools and capabilities›Runtime libraries›Skills›Agents and prompts›Serving and protocols›Observability
Guides›Author a manifest›Write a tool›Give your agent a filesystem›Control network egress›Connect external tools via MCP›Connect agents via A2A›Use the bash tool›Control tool access with capabilities›Write templated prompts›Manage prompts with Langfuse›Pass context from the client›Configure a model provider›Connect a CopilotKit frontend›Deploy a standalone binary›Deploy with Docker and PostgreSQL›Instrument with OpenTelemetry›Extend code generation with blocks
Reference
Manifest
Runtime
›Observability

Serve and connect

Start the HTTP server and send your agent its first request.

You have run your agent from the command line. Now you will start its HTTP server and talk to it over the network, the way a real client would. This continues from the my-agent project you built in the previous guides.

Start the server

The scaffolded manifest already defines an http_server block, so the binary can serve. Set your API key and start it:

export ANTHROPIC_API_KEY=your_key_here
./artifacts/build/my-agent serve

The agent starts, connects to its database, registers its tools, and begins listening on 127.0.0.1:8080. The process stays in the foreground, so leave it running and open a second terminal for the next step.

Where the data goes

On first start the agent creates a local SQLite database file for session and checkpoint storage, so runs are durable with no extra setup. Moving to PostgreSQL for production is covered in Deploy with Docker and PostgreSQL.

Send a request

The manifest enabled the AG-UI protocol, which exposes a /ag-ui/run endpoint. From your second terminal, send it a message:

curl -X POST http://localhost:8080/ag-ui/run \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{ "role": "user", "content": "What is 21 plus 21?" }]
  }'

The response is a stream of Server-Sent Events. You will see the run start, the agent call the adder tool you added earlier, the streamed text of the answer, and finally the run finishing. That event stream is what a frontend consumes to render the conversation as it happens.

What you have done

You installed agentc, described an agent in a manifest, gave it a tool, compiled it to a single binary, and served it over HTTP. That is the full loop from an empty directory to a running agent.

Where to go next

  • Author a manifest: build a manifest deliberately, block by block.
  • Connect a CopilotKit frontend: put a UI in front of the AG-UI endpoint.
  • Deploy a standalone binary: take the binary to production.
  • HTTP reference: the native endpoints behind the server.
← PreviousAdd your first toolNext →Architecture overview

© 2026 pogue.dev. All rights reserved.

Creative CommonsCC BY 4.0
On this pageStart the serverSend a requestWhat you have doneWhere to go next

Search docs

Search the agentc documentation