Networking Configuration
This guide explains Agenta's network topology, how containers communicate with each other, and the environment variables that control networking behavior and connectivity.
Network Topology
Agenta uses a Docker-based network architecture with a dedicated bridge network for container communication and Traefik as the reverse proxy for external access.
┌─────────────────────────────────────┐
│ External Users │
└─────────────────┬───────────────────┘
│ HTTPS/HTTP
┌─────────────────▼───────────────────┐
│ Host Server (80/443) │
└─────────────────┬───────────────────┘
│
┌─────────────────────────────────────────▼───────────── ──────────────────────┐
│ agenta-network (bridge) │
│ │
│ ┌───────────────────────────────────────────────────────────────────────┐ │
│ │ Traefik (Reverse Proxy) │ │
│ │ HTTP: 80 -> HTTPS: 443 -> Dashboard: 8080 │ │
│ │ SSL termination and routing │ │
│ └─┬─────────────────────┬─────────────────────┬─────────────────────────┘ │
│ │ │ │ │
│ │ / │ /api/ │ /services/ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌────────────────────┐ │
│ │ Web │ │ API │ │ Services API │ │
│ │ :3000 │ │ :8000 │ │ :80 │ │
│ └─────────────┘ └──────┬──────┘ └────────────────────┘ │
│ │ │
│ │ Redis queues / streams │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ Worker Pool │ │
│ │ worker-evaluations, worker-tracing, worker-webhooks, │ │
│ │ worker-events, cron │ │
│ └─────────────────────────┬────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ Infrastructure Layer │ │
│ │ │ │
│ │ ┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐ │ │
│ │ │ PostgreSQL │ │ Redis │ │ SuperTokens │ │ │
│ │ │ :5432 │ │ :6379 / :6381 │ │ :3567 │ │ │
│ │ │ Core + Tracing DB │ │ queues + caching │ │ auth + sessions │ │ │
│ │ └───────────────────┘ └───────────────────┘ └───────────────────┘ │ │
│ └──────────────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
Container Communication Patterns
External Access Flow
Internet → Traefik (80/443) → Internal Services
├── / → web:3000 (Frontend)
├── /api/ → api:8000 (Backend API)
└── /services/ → services:80 (includes completion/chat endpoints)
Internal Service Communication
Web Container: