AAnvio
Reference ArchiveSource Docs

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 stop

What runs in one process

ComponentEndpoint / role
Channel HubTelegram, Slack, Discord, …
Agent workerDetached runs, approvals, inbox
REST API/api/sessions, webhooks
WebSocket/ws?sessionId=<id>
Cron / automationBuilt-in scheduler
HarnessChannel 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 override

Sessions 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.wav

Uses OpenAI Realtime WebSocket (wss://api.openai.com/v1/realtime?intent=transcription).

Env: OPENAI_REALTIME_MODEL (default gpt-4o-mini-transcribe).

Migration from worker + API

BeforeAfter
pnpm --filter @anvio/worker devanvio gateway start
pnpm --filter @anvio/api devincluded in gateway
pnpm --filter @anvio/gateway devincluded in gateway

Legacy split processes still work for development; unified gateway is recommended for production.

Edit on GitHub

Last updated on

On this page