HTTP API

REST API endpoints for interacting with agents.

POST /chat

Send a message to the agent.

curl -X POST http://localhost:9000/chat \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Hello!",
    "session_id": "optional-session-id"
  }'

Response

{
  "content": "Hello! How can I help you?",
  "session_id": "abc123",
  "tool_calls": []
}

GET /health

Check if the agent is running.

curl http://localhost:9000/health

# Response: {"status": "ok", "agent": "my-agent"}

GET /sessions

List all sessions for this agent.

curl http://localhost:9000/sessions

# Response: {"sessions": ["abc123", "def456"]}