Skip to main content

Svantic SDK

@svantic/sdk is the TypeScript toolkit for building AI agents on Svantic. You describe what your agent can do in plain code, and Svantic handles the rest — discovery, orchestration, streaming, authentication, and observability. A handler you write today runs the same way whether it’s called by a user in the chat UI, by another agent as a tool, or by a scheduled trigger at 3 a.m.

Install

Requires Node.js 20 or later.

Hello, agent

Run it with your credentials from the Svantic dashboard:
Your agent is now live, discoverable, and callable by other agents on Svantic. No ingress, no public URL, no port forwarding — it dials out to api.svantic.com and keeps a persistent connection open.

What the SDK gives you

Two ways to run

Every agent built with the SDK is either:
  • Connected — the default. Your agent dials Svantic over an outbound WebSocket. No public URL, no inbound firewall rules. Ideal for laptops, CI, ephemeral workers, and anything behind NAT.
  • Hosted — your agent exposes a public HTTPS URL, and Svantic POSTs to it. Use this when you want Svantic traffic to flow through your own ingress for auditing or WAF reasons.
See Connecting to Svantic for when to choose which.

How to read these docs

  • Guides are task-oriented. Start here if you’re building something. Each guide is a complete walkthrough.
  • Reference is the exhaustive API listing — every class, method, option, and type.
If you’re new, go to the Quickstart.

Getting credentials

Every SDK call to Svantic uses a client_id / client_secret pair issued to your tenant. Create them in the Svantic dashboard under Settings → API Credentials, then set them as environment variables:
The SDK exchanges these for a short-lived token automatically — you never mint or refresh JWTs by hand.

Support