Unified Gateway (Hermes-style)
**Status:** shipped (v1.20.0)
1 min read
This is a migrated reference document from the original Anvio source repo. Content is preserved as-is; canonical documentation lives in the sections above in the sidebar.
Original path: docs/76-unified-gateway.md
Status: shipped (v1.20.0)
One daemon replaces the separate worker + API + WebSocket stack — equivalent to Hermes GatewayRunner.
Start
# Background daemon (writes workspace/.gateway/gateway.pid)
anvio gateway start
# Foreground (Ctrl+C to stop)
anvio gateway start --foreground
anvio gateway status
anvio gateway stopWhat runs in one process
| Component | Endpoint / role |
|---|---|
| Channel Hub | Telegram, Slack, Discord, … |
| Agent worker | Detached runs, approvals, inbox |
| REST API | /api/sessions, webhooks |
| WebSocket | /ws?sessionId=<id> |
| Cron / automation | Built-in scheduler |
| Harness | Channel formatting + soul gate |
| A2A Server | /a2a/*, /.well-known/agent.json (when enabled) |
Default port: 3001 (ANVIO_GATEWAY_PORT).
SQLite sessions (Hermes state.db)
Set in workspace/anvio.yaml:
spec:
storage:
provider: sqlite
basePath: .
# connectionString: sqlite:./state.db # optional overrideSessions persist in workspace/state.db with FTS5 message search (session_search tool uses FTS when enabled).
OpenAI Realtime STT
export OPENAI_API_KEY=sk-...
export ANVIO_VOICE_REALTIME=1 # or pass --realtime
anvio voice realtime-transcribe sample.wavUses OpenAI Realtime WebSocket (wss://api.openai.com/v1/realtime?intent=transcription).
Env: OPENAI_REALTIME_MODEL (default gpt-4o-mini-transcribe).
Migration from worker + API
| Before | After |
|---|---|
pnpm --filter @anvio/worker dev | anvio gateway start |
pnpm --filter @anvio/api dev | included in gateway |
pnpm --filter @anvio/gateway dev | included in gateway |
Legacy split processes still work for development; unified gateway is recommended for production.
Related
Last updated on
Workflow → Skill pattern
Hermes-style pattern: capture a repeatable workflow as a **skill** the agent can invoke.
Skill Execution Engine (v2)
**Status:** Shipped — v1.23.0 **Refs:** [05-skills.md](./05-skills.md) · [37-skills-catalog.md](./37-skills-catalog.md) · [74-workflow-to-skill-example.md](./74-workflow-to-skill-example.md)