Self-host Agno AgentOS or HiveGate with Docker Compose
You have an Agno agent that works, and you want it running on your own machine or server, behind an HTTP API, with its data in your own database. The first questions are practical. Which containers? Does it need Redis? What about auth? And when an agent pauses for a human to approve a tool call, how does your app answer that run over REST? This post compares the two self-hosted options built on…
Two self-hosted options exist for running Agno agents: Agno's AgentOS, which utilizes the agentos-docker template, and HiveGate, an MIT-licensed FastAPI service. Both require Postgres, but neither necessitates Redis.
AgentOS consists of two containers: Postgres and the API. It operates within two services in compose.yaml. The agentos-db service runs agnohq/pgvector:18, responsible for sessions, memory, and knowledge vectors. The api service, built from the repo's Dockerfile, runs the FastAPI app on port 8000. No separate worker service is needed.
To run locally, clone the agentos-docker repository, set OPENAI_API_KEY, and execute docker compose up -d --build. Production deployment requires setting up token checks, using a strong DB_PASS, and configuring the API to bind only to the local host.
HiveGate, on the other hand, involves three services: pgvector, qdrant, and hivegate itself. pgvector runs agnohq/pgvector:16, responsible for sessions, memory, knowledge vectors, and runs the API. Qdrant, only required for knowledge search, runs on ports 6333 and 6334. The API container, hivegate, connects to pgvector and runs on port 8000.
This setup uses JWT for authentication, with ADMIN_SECRET protecting the /admin/* endpoints. Unlike AgentOS, HiveGate requires users to manage OAuth tokens, which are encrypted and refreshed server-side.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to