Architecture

Voice agent infrastructure

Voice agent infrastructure across the hosted Speko Router, the open customer-side Gateway, and the separate hosted Agents API.

The three Speko boundaries

  • Router. The hosted data plane at router.speko.dev accepts native, typed STT, LLM, and TTS requests. It owns managed routing, admission, provider dispatch, normalized errors, and usage settlement.
  • Gateway. The open runtime in SpekoAI/gatewayruns inside the customer workload. It keeps BYOK credentials local, provides one streaming protocol across providers, and ships native LiveKit and Pipecat integrations.
  • Agents API. The hosted API at api.speko.dev owns agents, sessions, phone numbers, calls, and the managed conversation loop.

Choose by trust boundary

Choose Router when Speko should operate the managed model data plane. Choose Gateway when provider-direct audio should stay in the customer workload or provider keys must remain inside a customer process. The two can coexist: a LiveKit session can use Gateway for direct STT and TTS while using Router for a managed LLM. Read Gateway's public trust document before deciding which process may inspect environment variables and which traffic crosses the hosted boundary.

Choose the Agents API when Speko should also own the agent definition, session lifecycle, phone number, and call transport. A Router credential does not create an agent or place a call, and a Gateway local token is not a hosted API key.

Use the contracts, not guessed compatibility

Router is not an OpenAI-compatible hostname. Its canonical OpenAPI 3.1 document is available at router.speko.dev/openapi.json, with streaming speech documented by the AsyncAPI contract in the public Gateway repository. Every POST requires an Idempotency-Key, and every non-2xx response uses the same typed error envelope with a stable code, message, recovery hint, and retryable flag.

Start with the Router quickstart, the LiveKit Gateway guide, or the Pipecat Gateway guide. The versioning policy defines compatibility, deprecation, and Sunset behavior for durable clients.