Run your Agno agents as a production API.
HiveGate is an open-source FastAPI service that gives your agents what production needs: per-user sessions, OAuth tokens, approvals, multi-agent teams and tracing. You write the agent. HiveGate serves it.
Everything is an HTTP call
Your app talks to agents, teams, approvals and tokens through one REST API, with plain JSON or streamed responses.
Each user gets their own session. HiveGate stores the history, so the next message picks up where this one left off.
curl -X POST $HIVEGATE/v2/agents/customer-support/chat \
-H "X-API-Key: agk_…" \
-d '{
"message": "I need help resetting my password",
"user_id": "user-42",
"session_id": "sess-abc123",
"stream": false
}'
{
"content": "I can help you reset your password…",
"agent_id": "customer-support",
"session_id": "sess-abc123",
"model": "gemini-3-flash-preview",
"status": "completed",
"run_id": "run-f47ac10b"
}
A team gets one request. The supervisor splits the work between its agents and returns one answer, with token usage for the whole run.
curl -X POST $HIVEGATE/v2/teams/support-team/runs \
-H "X-API-Key: agk_…" \
-d '{
"message": "A customer can't log in after changing their email",
"user_id": "user-42",
"session_id": "team-sess-001",
"stream": false
}'
{
"content": "The customer needs to verify their new email…",
"team_id": "support-team",
"status": "completed",
"token_usage": {
"input_tokens": 1250,
"output_tokens": 340
},
"run_id": "run-team-abc"
}
When an agent wants to do something that needs sign-off, like sending an email, the run pauses. It continues once a person approves.
{
"status": "paused",
"run_id": "run-abc",
"tools": [{
"tool_call_id": "tc-001",
"tool_name": "send_email",
"requires_confirmation": true,
"tool_args": { "to": "jane@acme.com" }
}]
}
curl -X POST $HIVEGATE/v2/approvals/run-abc:tc-001/approve \
-H "X-API-Key: agk_…"
{
"job_id": "run-abc:tc-001",
"status": "approved",
"message": "Tool call approved"
}
Store a user's Google or Microsoft token once. Their agents can then use Gmail, Calendar, Contacts and Drive, and HiveGate refreshes the token when it expires.
curl -X POST $HIVEGATE/v2/users/user-42/tokens \
-H "X-API-Key: agk_…" \
-d '{
"integration_key": "google",
"provider": "google",
"token_type": "oauth2",
"token_data": {
"access_token": "ya29…",
"refresh_token": "1//0dx…"
},
"scopes": ["calendar", "email"]
}'
{
"integration_key": "google",
"provider": "google",
"token_type": "oauth2",
"message": "Token stored successfully for google"
}
What you'd otherwise build yourself
Running an agent in a notebook is easy. Serving it to many users means building all of this around it. HiveGate ships it.
Serving
- Agents over HTTP
- Create, version and chat with agents through a REST API, with JSON or streamed replies.
- Per-user sessions
- Conversation history is kept per user and per session, and separated by tenant.
- Teams of agents
- Group agents into a team that coordinates, or one where a supervisor hands out the work.
Identity and integrations
- API keys
- Per-client API keys, plus a separate admin secret for management endpoints.
- OAuth token store
- Each user's Google and Microsoft tokens are stored and refreshed for you.
- Workspace toolkits
- Ready-made Gmail, Calendar, Contacts and Drive tools for Google and Microsoft accounts.
Knowledge
- Knowledge base
- Per-tenant documents your agents can search, stored in Qdrant.
- Versioned prompts
- Edit an agent's prompt through the API without redeploying. Every change gets a new version number.
- Skills
- Reusable step-by-step instructions, reference material and scripts that agents can follow.
Operations
- Approvals
- Risky tool calls pause until a person approves or denies them.
- Tracing and errors
- OpenTelemetry, Sentry and Logtail, switched on with environment variables.
- Deploy anywhere
- A prebuilt image for Render, Railway, Koyeb, Kubernetes, AWS, Azure and Google Cloud.
How a team run works
The hive at the top of this page, step by step.
-
A request comes in
Your app sends a message to a team, along with who the user is and which tenant they belong to.
-
The supervisor splits the work
A supervisor agent decides which agents in the team should handle each part of the request.
-
Workers act for the user
Each agent calls its tools, such as Gmail, Calendar or the knowledge base, using that user's own tokens.
-
Risky actions wait for a person
Anything marked as needing approval pauses the run until someone approves or denies it.
-
One answer comes back
The team replies as JSON or a stream. Every step is traced, so you can see what happened afterwards.
Run it locally in five minutes
You need Docker, Python 3.11+ and an API key for a model provider. The demo agent uses Gemini.
-
Clone it and add your key
git clone https://github.com/hivegate-ai/hivegate cd hivegate cp .env.example .envIn
.env, setGOOGLE_API_KEYand uncommentAUTH_DISABLED=truefor local use. The server reads.envwhen it starts, so do this first. -
Start the databases and the API
docker compose up -d ./scripts/dev_setup.sh source .venv/bin/activate ./scripts/start_server.shThis starts Postgres and Qdrant and loads some demo agents.
-
Chat with the demo agent
curl -X POST \ http://localhost:8000/v2/agents/demo-assistant/chat \ -H 'Content-Type: application/json' \ -d '{"message": "Hi", "user_id": "u1", "session_id": "s1", "stream": false}'Interactive API docs are at
http://localhost:8000/docs.
Where it runs
Every option uses the same image, ghcr.io/hivegate-ai/hivegate, built for both x86 and ARM.
| Platform | Good for | Config |
|---|---|---|
| Render | The easiest first deploy | render.yaml |
| Railway | The smoothest Postgres setup | railway.toml |
| Koyeb | Trying it on a free tier | koyeb.yaml |
| Kubernetes | Self-hosting and scaling | Kustomize manifests |
| AWS, Azure, Google Cloud | Your own cloud account | ECS, Container Apps, Cloud Run |
Questions
Is it production-ready?
Yes, with caveats. The API, supervisor, job queue and toolkits are covered by an integration test suite that runs against real Postgres and Qdrant on every change. Choose your observability backend and review authentication before exposing it to end users.
How does it relate to Agno?
HiveGate runs on top of Agno. Agno provides the agent itself: model calls, tools and memory. HiveGate adds the HTTP API, multi-tenancy, storage, supervisor teams, OAuth tokens and the operational side.
Is it an API gateway like Kong?
No. Despite the name, HiveGate doesn't route traffic between services. It runs AI agents and exposes them over a REST API.
Which models can I use?
Any model Agno supports, including OpenAI, Anthropic (Claude) and Gemini. Set the model per agent, or per request with the model field.
Do I need a vector database?
Only for the knowledge base. Qdrant comes with the Docker Compose setup, but chat works without it.
Can I run it without Docker?
Yes. You need Postgres 14 or later, and Qdrant if you use the knowledge base, reachable over the network. See the deploy guide.