Skip to content

Guides

Each guide covers one end-to-end workflow. Start from the guide that matches your current task. Prerequisites are listed at the top of each guide.

GuideWhat it covers
Integrate the TypeScript SDKInstall @caracalai/sdk, configure env vars, spawn agents, delegate authority, and make outbound calls
Integrate the Python SDKInstall caracalai-sdk, use async context managers to spawn and delegate, wire ASGI middleware
Integrate the Go SDKInstall github.com/garudex-labs/caracal/sdk, use Spawn, Delegate, Current, and Transport
Protect an MCP ServerGate MCP tool calls with mandate verification using @caracalai/transport-mcp (TS) or caracalai_transport_mcp (Python)
Protect an Express AppAdd caracalAuth middleware to Express routes and enforce scope requirements
Protect a FastMCP AppAttach CaracalAuth to a FastMCP server so every tool call is mandate-gated
Protect a Go net/http ServiceWrap Go handlers with mcpnethttp.Middleware and read validated claims from context
Author a Rego PolicyWrite a caracal.authz policy, understand the full input schema, and avoid forbidden builtins
Activate a Policy SetCreate, version, bundle, and promote a policy set to active using the CLI
Define Resources and ProvidersRegister upstream resources, declare scopes, and attach credential providers
Issue Grants and InvitationsBind applications and users to resource scopes; invite new zone members
Implement Multi-Agent DelegationSpawn child agents, attach caveats, read the delegation graph, and trigger cascade revocation
Tail and Query the Audit StreamStream live decisions from the CLI and inspect full diagnostics per request
Run an Agent with caracal runInject a short-lived per-resource token into a subprocess without writing SDK code
Step-Up Re-AuthenticationHandle interaction_required from the STS and complete the challenge flow from agent code
  • A running Caracal stack (caracal up or Docker Compose).
  • A zone with at least one registered application. Run caracal init on a fresh stack to create the local zone and write caracal.toml.
  • CARACAL_ADMIN_TOKEN set in your shell for CLI operations that mutate control-plane state.