http://127.0.0.1:1907.
Send your first request
From your agent folder, runharnest serve .. In another terminal:
outputText and keep sessionId for follow-up turns. A session is created automatically. Send input; model configuration belongs on the agent.
See response request fields for session reuse, streaming, metadata, and typed input.
Continue the conversation, replacing the placeholder with the returned ID:
-N disables curl’s output buffering:
status, not just the HTTP status code. A response can be completed, in_progress, or requires_action; see response recovery and approvals and client tools.
These commands target a local agent without authentication. For a protected deployment, use the authentication configured by its owner; for bearer authentication, add
-H "Authorization: Bearer $HARNEST_TOKEN". Do not put credentials in metadata.Discover the API
/agent for enabled routes and schema resources. Resolve resource URIs against the server address. JSON and YAML describe the same API; check POST /responses and its input schema before generating requests for a typed agent.
Startup prints Swagger and schema URLs. Save YAML with curl --fail-with-body -sS http://127.0.0.1:1907/openapi.yaml -o openapi.yaml.
In Swagger UI, open Send a message to the agent → Try it out → Execute. Authentication still applies. Set server.openapi: false to hide documentation routes.
Endpoints
See the HTTP route reference for sessions, media, responses, discovery, and health endpoints. Availability depends on the deployed configuration.AG-UI clients
Connect an agent-facing UI throughPOST /agui. Harnest supports streamed text, shared state, frontend tools, and human approval on ADK and LangGraph. See AG-UI for supported capabilities, client integration, and interaction contracts.
Try the CopilotKit demo
Run the CopilotKit example to test both frameworks with a local React UI, without a model API key.A2A bindings
Declare an A2A HTTP+JSON or JSON-RPC interface inagent-card.yaml to mount it beside the neutral API.
See Agent2Agent (A2A) for discovery, Tasks, streaming, and recovery.
Response modes
- JSON
- SSE
- WebSocket
Send one request to
POST /responses and receive one completed response.Response status and recovery
Harnest records the latest status for every neutral JSON, SSE, and WebSocket response. Use the server-issued response ID and the same session ID:404 for a missing or mismatched scope so callers cannot probe another user’s response IDs.
Ordinary receipts last for the serving process. A Harnest-owned checkpointer also preserves terminal responses across restarts; pending approvals and client tools remain process-local.
Advanced mode keeps the same API where Harnest owns the neutral transport. Recovery is best effort when your application replaces the graph, checkpointer, transport, or tool wiring; Harnest leaves those user-owned boundaries alone.
All modes use the same portable activity contract. JSON returns these items in output. SSE and WebSocket use the corresponding response.* frames.
JSON, SSE, and WebSocket expose the same portable activity types. Output policy controls which optional events callers receive.
OutputPolicy(agent_metadata=AgentMetadataMode.RAW) to add a raw mapping to each metadata
event. See Output policy for the ADK
and LangGraph namespaces and the disclosure warning.
Checkpointed completion output includes normalized metadata. Raw metadata persists only with the explicit output-policy opt-in.
Native metadata that you explicitly declare in a structured output remains namespaced under adk or langgraph. Treat that metadata as framework-specific rather than part of the portable activity contract.
An external or queued durable wait returns status: in_progress. Poll the response ID with the same authenticated user and session until it is completed or failed. See Durable execution.
Typed input, output, and media use the same contract in every mode. See Accept multimodal data.
Pagination properties
FollownextCursor unchanged until it is null. Cursors are scoped to the user and, for transcripts, the session. See pagination limits.
Malformed or cross-user cursors return 400.
Playground
The playground uses the neutral API for conversations and activity. Live is available only when the server advertises/live.
Open /?session=<id> to restore an owned session. Enter its full ID if it is outside the session picker’s current page.
Browsers cannot add arbitrary authorization headers to a WebSocket handshake.