Quickstart
If you have not made a call yet, start on first API call: dashboard setup plus curl against https://api.callvault.dev. This page adds the TypeScript SDK and operator HTTP details.
Production URLs
- API:
https://api.callvault.dev - Dashboard: https://app.callvault.dev
- Auth0 API audience:
https://api.callvault.dev - Default
X-Broker-Tenant-Id(dashboard):11111111-1111-1111-1111-111111111101
Operator session (dashboard and HTTP)
Routes such as /v1/connections, /v1/agents, and /v1/api-keys require:
Authorization: Bearer <Auth0 access token>with audiencehttps://api.callvault.devX-Broker-Tenant-Id: <tenant uuid>Content-Type: application/jsonon POST bodies
Sign in at the dashboard with email, Google, or GitHub via Auth0. New workspaces start a free seven-day Personal trial (card collected up front). The SPA stores the session; for raw curl you need to obtain an access token from Auth0 (same audience) or use the control-key path below for agent-style calls.
Bootstrap GitHub smoke tools (once per tenant)
Before github.get_authenticated_user can run, the tenant needs tool definitions and policies. The dashboard Create test agent button calls this for you. Via HTTP:
curl -s -X POST https://api.callvault.dev/v1/tools/bootstrap-github-smoke \
-H "Authorization: Bearer $AUTH0_TOKEN" \
-H "X-Broker-Tenant-Id: $TENANT_ID" \
-H "Content-Type: application/json" \
-d '{"env":"test"}'Register an agent
curl -s -X POST https://api.callvault.dev/v1/agents \
-H "Authorization: Bearer $AUTH0_TOKEN" \
-H "X-Broker-Tenant-Id: $TENANT_ID" \
-H "Content-Type: application/json" \
-d '{"name":"My agent","env":"test"}' | jq .Response includes agent.id; use that as agent_app_id when minting broker JWTs. Only owner / admin roles may create agents.
Control plane: mint broker JWT (server)
Store a control API key (bk_test_* or bk_live_*) in server environment only. Legacy sk_* keys are rejected. Create a key in the dashboard Connection keys screen (secret shown once).
import { BrokerControlClient } from "@broker/sdk-ts";
const control = new BrokerControlClient({
baseUrl: "https://api.callvault.dev",
controlApiKey: process.env.BROKER_CONTROL_API_KEY!,
});
const { access_token } = await control.mintBrokerToken({
agent_app_id: process.env.AGENT_APP_ID!,
env: "test",
});HTTP equivalent (no tenant header; tenant comes from the key):
curl -s -X POST https://api.callvault.dev/v1/broker/token \
-H "Authorization: Bearer $FULL_KEY" \
-H "Content-Type: application/json" \
-d '{"agent_app_id":"<uuid>","env":"test"}'Pass access_token to the agent process. Never pass the control key to an agent runtime.
Agent runtime: execute a tool
import { BrokerAgentClient } from "@broker/sdk-ts";
const agent = new BrokerAgentClient({
baseUrl: "https://api.callvault.dev",
accessToken: brokerJwtFromYourServer,
});
const { invocation_id, result } = await agent.executeTool({
tool_name: "github.get_authenticated_user",
connected_account_id: process.env.CONNECTION_ID!,
arguments: {},
});BrokerAgentClient throws if you pass a bk_* string as accessToken.
High-risk tools (for example github.create_issue) may return 409 with approval_required. Approve in the dashboard, then call POST /v1/tools/invocations/:id/continue with the same broker JWT or re-execute with an approval_id.
Create a control key via HTTP
curl -s -X POST https://api.callvault.dev/v1/api-keys \
-H "Authorization: Bearer $AUTH0_TOKEN" \
-H "X-Broker-Tenant-Id: $TENANT_ID" \
-H "Content-Type: application/json" \
-d '{"name":"server mint","env":"test","scopes":["broker:token","tools:invoke","admin"]}' | jq .The response field api_key.secret is reveal-once (same as the dashboard UI).
Package
SDK source and install notes: packages/sdk-ts/README.md.