The http_server block enables and configures the built-in HTTP server.
The http_server block enables the built-in HTTP server. It is optional. If omitted, the agent
runs as a process without an HTTP interface.
http_server {
host = runtime("HTTP_HOST", "127.0.0.1")
port = runtime("HTTP_PORT", 8080)
max_request_size = runtime("HTTP_MAX_REQUEST_SIZE", 2097152)
protocol {
ag_ui {}
a2a {}
}
}| Field | Type | Required | runtime() | Default | Description |
|---|---|---|---|---|---|
host | string | no | yes | "127.0.0.1" | Host address to bind the server to. Overridable via the HTTP_HOST environment variable. |
port | integer | no | yes | 8080 | Port to listen on. Overridable via the HTTP_PORT environment variable. |
max_request_size | integer | no | yes | 2097152 | Maximum accepted request body size, in bytes. Requests exceeding it are rejected with 413 Payload Too Large. Overridable via the HTTP_MAX_REQUEST_SIZE environment variable. |
protocol | block | no | Enables optional protocol implementations. |
The protocol block enables specific protocol implementations on the HTTP server. Supported
protocols are ag_ui and a2a.
protocol {
ag_ui {
path = "/ag-ui"
}
}Enabling ag_ui mounts the AG-UI streaming protocol on the server. This allows frontend UIs and
clients to connect to the agent and receive real-time execution events as a Server-Sent Events
stream.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | no | "/ag-ui" | Base URL path at which the AG-UI endpoint is mounted. The run endpoint is served at <path>/run. |
See AG-UI for the full protocol documentation, event types, and client connection examples.
protocol {
a2a {
path = "/a2a"
}
}Enabling a2a mounts the foundational Agent2Agent protocol surface on the server. This allows
upstream agents to discover the agent, send work as tasks, stream basic task updates, inspect a known
task, and cancel a task.
This setting exposes the current agent as an inbound A2A server. To let the current agent call
another A2A server, configure an A2A tool with tool { kind = "a2a" }.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | no | "/a2a" | Base URL path at which the A2A endpoints are mounted. |
See A2A for the supported endpoint shapes and current implementation scope. See Connect agents via A2A for outbound A2A tools.
© 2026 pogue.dev. All rights reserved.
CC BY 4.0Search the agentc documentation