Loading repository data…
Loading repository data…
liberzon / repository
Production-ready FastAPI + Agno gateway for serving AI agents — agents, teams, supervisor execution, skills, knowledge bases, OAuth tokens, toolkits, OpenTelemetry.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
📖 Docs & landing page: agentsgateway.dev
A production-ready API gateway for serving AI agents. Built with FastAPI and Agno 2.5.16+.
Prerequisites: Docker Desktop installed and running, Python 3.11+.
git clone <repository-url>
cd agents-gateway
# Start PostgreSQL + Qdrant (seeds demo agents automatically)
docker compose up -d
# Set up Python environment
./scripts/dev_setup.sh && source .venv/bin/activate
# Start the API server
./scripts/start_server.sh
# API docs (interactive)
open http://localhost:8000/docs
# List demo agents (no API key needed with AUTH_DISABLED=true)
curl http://localhost:8000/v2/agents
# Get a specific agent
curl http://localhost:8000/v2/agents/demo-assistant
Set at least one model provider API key, then chat:
export GOOGLE_API_KEY="your-google-api-key" # Gemini (default)
# export OPENAI_API_KEY="your-openai-api-key" # OpenAI (GPT)
# export ANTHROPIC_API_KEY="your-anthropic-api-key" # Anthropic (Claude)
curl -X POST http://localhost:8000/v2/agents/demo-assistant/chat \
-H "Content-Type: application/json" \
-d '{
"message": "What can you help me with?",
"user_id": "user1",
"session_id": "session1",
"timezone": "UTC",
"locale": "en",
"stream": false
}'
docker compose down # Keep data
docker compose down -v # Reset everything
agents-gateway/
├── api/ # FastAPI application
│ ├── routes/v2/ # V2 API endpoints (agents, teams, knowledge, tokens,
│ │ # prompts, skills, approvals, engines, targets)
│ ├── services/ # Shared services (auth, logging, knowledge)
│ └── observability/ # Tracing and logging providers
├── supervisor/ # Supervisor/worker orchestration
│ ├── queue/ # Job queue (producer, consumer, CRUD)
│ ├── pack/ # Agent pack loader/exporter
│ └── plugins/ # Plugin generator
├── remote_agent/ # Containerized worker runner (Docker & K8s runtimes)
├── prompts/ # Prompts service (parser, service, storage backends)
├── toolkits/ # Agno agent toolkits (Calendar, Email, Contacts,
│ # Drive, Claude Code, managed agents)
├── workspace_suite/ # Vendor-agnostic workspace integrations (Google, Microsoft)
├── evals/ # Agent evaluation framework
├── db/ # Database models and migrations
├── deploy/ # Deployment manifests (aws, azure, gcp, generic)
└── scripts/ # Development and deployment scripts
All endpoints are documented at /docs. Key endpoints:
| Resource | Endpoint | Description |
|---|---|---|
| Agents | GET/POST /v2/agents | List and create agents |
| Agent Chat | POST /v2/agents/{id}/chat | Chat with an agent |
| Teams | GET/POST /v2/teams | List and create teams |
| Team Run | POST /v2/teams/{id}/runs | Execute a team |
| Knowledge | GET/POST /v2/knowledge/{tenant_id} | Manage knowledge entries |
| Tokens | GET/POST /v2/users/{user_id}/tokens | Manage OAuth tokens |
| Prompts | GET/POST /v2/prompts | Manage prompt templates |
| Skills | GET/POST /v2/skills | Manage reusable skill definitions |
| Engines | GET/POST /v2/engines | Manage supervisor execution engines |
| Targets | GET/POST /v2/targets | Manage supervisor run targets |
| Approvals | GET/POST /v2/approvals | Review and decide on pending job approvals |
V2 API (/v2/*): API key via X-API-Key header
curl -H "X-API-Key: agw_xxxxx" http://localhost:8000/v2/agents
Admin API (/admin/*): Admin secret via X-Admin-Secret header
curl -H "X-Admin-Secret: your-secret" http://localhost:8000/admin/api-keys
Development: Set AUTH_DISABLED=true to bypass authentication.
The toolkits/ package provides Agno agent toolkits for external service integrations:
| Toolkit | Providers | Tools |
|---|---|---|
| CalendarToolkit | Google Calendar, Microsoft Calendar | schedule_meeting, list_events, cancel_meeting |
| EmailToolkit | Gmail, Outlook | send_email, search_emails, create_draft |
| ContactsToolkit | Google Contacts, Microsoft Contacts | create_contact, search_contacts, list_contacts |
| DriveToolkit | Google Drive, OneDrive | list_files, read_file, upload_file |
All toolkits support:
See toolkits/README.md for detailed documentation.
# Install uv (package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install dependencies
./scripts/dev_setup.sh
source .venv/bin/activate
# Run validation (format, lint, type check)
./scripts/run_validate.sh
# Run tests
pytest tests/v2/
# Edit pyproject.toml, then regenerate requirements.txt
./scripts/generate_requirements.sh
# Upgrade all dependencies
./scripts/generate_requirements.sh upgrade
| Platform | Configuration | Script |
|---|---|---|
| Railway | railway.toml | scripts/deploy_to_railway.sh |
| Render | render.yaml | scripts/deploy_to_render.sh |
| Koyeb | koyeb.yaml | scripts/deploy_to_koyeb.sh |
Platform-specific deployment manifests and guides live under deploy/:
| Target | Path |
|---|---|
| AWS (ECS + CloudFormation) | deploy/aws/ |
| Azure (Container Apps + Bicep) | deploy/azure/ |
| Google Cloud Run | deploy/gcp/ |
| Generic (docker-compose, Kubernetes) | deploy/generic/ |
| Variable | Required | Description |
|---|---|---|
DB_HOST, DB_PORT, DB_USER, DB_PASS, DB_DATABASE | Yes | PostgreSQL connection |
ADMIN_SECRET | Yes (prod) | Admin endpoint authentication |
GOOGLE_API_KEY | * | Google/Gemini API key |
OPENAI_API_KEY | * | OpenAI API key |
ANTHROPIC_API_KEY | * | Anthropic API key |
QDRANT_URL | No | Qdrant vector database URL |
SECRET_TOKEN_ENC_KEY | No | Token encryption key (auto-generated) |
* At least one LLM API key is required.
See the Observability section for tracing/logging configuration.
| Schema | Tables | Purpose |
|---|---|---|
public | agent_info, team_info, team_agent, knowledge_entries, user_tokens, api_keys | Core data |
prompts | prompts | Prompt templates |
ai | (auto-created) | Agno agent sessions & memories |
# Run migrations (auto-runs on first docker compose up)
psql -h $DB_HOST -U $DB_USER -d $DB_DATABASE -f db/migrations/setup.sql
Pluggable tracing and logging using OpenTelemetry:
| Variable | Default | Options |
|---|---|---|
OTEL_TRACING_BACKEND | console | console, otlp, sentry |
OTEL_LOGGING_BACKEND | console | console, otlp, logtail |
Example: Production with Sentry
OTEL_TRACING_BACKEND=sentry
SENTRY_DSN=https://xxx@sentry.io/xxx
Example: Cloud-native with OTLP
OTEL_TRACING_BACKEND=otlp
OTEL_LOGGING_BACKEND=otlp
OTEL_OTLP_ENDPOINT=http://collector:4317
MIT License - see LICENSE for details.