Documentation Index
Fetch the complete documentation index at: https://docs.svantic.com/llms.txt
Use this file to discover all available pages before exploring further.
Connecting to Svantic
Every agent built with the SDK runs in one of two modes:- Connected — the agent opens an outbound WebSocket to Svantic and receives dispatches over that socket. This is the default.
- Hosted — the agent serves A2A over its own public HTTPS URL, and Svantic POSTs dispatches to it.
Which mode do I want?
Use connected mode (the default) when:- The agent runs on a laptop, CI worker, or anywhere behind NAT / corporate egress / a cloud provider’s default firewall.
- You don’t want to manage an ingress, TLS certificate, or WAF.
- The agent is ephemeral — scales to zero, spins up per-task, runs as a background worker.
- The agent is already a public HTTP service you’d run regardless (e.g. a customer-facing API that also wants to be reachable from Svantic).
- You want Svantic traffic to flow through your own ingress for auditing, WAF rules, or compliance reasons.
- You want the agent to be callable from systems that are not on Svantic (bare A2A clients, other platforms).
Credentials
Every SDK connection exchanges aclient_id / client_secret pair for a short-lived JWT. Create the pair once in the Svantic dashboard under Settings → API Credentials and set them as environment variables:
The URL
Every SDK call to Svantic uses a single hostname:api.svantic.com. The edge routes paths (/auth/get_token, /agents/register, /sessions/init, WebSocket upgrade, …) to the right internal service, so your config stays simple.
Override it only when pointing at a self-hosted or dev instance:
DEFAULT_SVANTIC_URL = https://api.svantic.com.
Connected mode
- No
port, nopublic_url. The SDK opens a single outbound WebSocket. - The WebSocket is authenticated with your JWT and keeps a persistent ping/pong heartbeat.
- If the connection drops, the SDK reconnects with exponential backoff automatically.
await agent.stop()deregisters cleanly.
Hosted mode
Setpublic_url (and optionally port) on the config:
- The SDK starts an Express server on
portand registerspublic_urlwith Svantic. - Svantic POSTs dispatches to
${public_url}/send. - You’re responsible for the ingress, TLS termination, and keeping the URL reachable.
- Turn on dispatch auth in hosted mode.
Using expose(app) + MeshConnector
When embedding into an existing Express service, split the two responsibilities:
attach().
