Menu

1 / 2

Deploying Agno agents to production as a REST API

DEV Community: fastapi·HiveGate·8 days ago
#BVSCpYFw
#devtofastapi#devto#dev#agent#hivegate
Reading 0:00
15s threshold

Originally published on hivegate.dev .

An Agno agent that works in a script is a few lines of Python. Turning it into something a web or mobile app can call for thousands of users takes more: an HTTP endpoint, a conversation per user, history that survives restarts, API keys, model keys kept on the server, and a container you can deploy.

This post shows how HiveGate , an MIT-licensed FastAPI service built on Agno, handles each of those. It also covers when you should skip HiveGate and use Agno's own AgentOS.

First: you may not need HiveGate

Agno ships AgentOS , which serves agents defined in code over HTTP, with sessions, human approval, RBAC and tracing:

from agno.agent import Agent from agno.db.postgres import PostgresDb from agno.models.google import Gemini from agno.os import AgentOS

support_agent = Agent ( name = " support-agent " , model = Gemini ( id = " gemini-3-flash-preview " ), db = PostgresDb ( db_url = " postgresql+psycopg://ai:ai@localhost:5432/ai " ), add_history_to_context = True ,…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.