Skip to content

SDKs

Caracal publishes a layered set of packages across TypeScript, Python, and Go. The SDK packages handle session lifecycle and context propagation. The companion packages handle token exchange, identity verification, revocation, and administration. The connector packages adapt Caracal to specific server frameworks.

PackageLanguageInstallPurpose
@caracalai/sdkTypeScriptnpm install @caracalai/sdkAgent sessions, delegation, outbound transport, ASGI/express middleware
caracalai-sdkPythonpip install caracalai-sdkAgent sessions, delegation, outbound transport, ASGI middleware
github.com/garudex-labs/caracal/sdkGogo get github.com/garudex-labs/caracal/sdkAgent sessions, delegation, outbound transport, net/http middleware
PackageLanguageInstallPurpose
@caracalai/identityTypeScriptnpm install @caracalai/identityJWT verification, JWKS caching, scope evaluation
caracalai-identityPythonpip install caracalai-identitySame as above
github.com/garudex-labs/caracal/identityGogo get github.com/garudex-labs/caracal/identitySame as above
@caracalai/oauthTypeScriptnpm install @caracalai/oauthRFC 8693 token exchange, token caching, step-up handling
@caracalai/revocationTypeScriptnpm install @caracalai/revocationRevocationStore interface and in-memory implementation
caracalai-revocationPythonpip install caracalai-revocationSame as above
@caracalai/adminTypeScriptnpm install @caracalai/adminControl-plane REST client (zones, apps, policies, grants, agents)
PackageLanguageInstallPurpose
@caracalai/transport-mcpTypeScriptnpm install @caracalai/transport-mcpMCP server-side mandate verification
caracalai-transport-mcpPythonpip install caracalai-transport-mcpSame as above
@caracalai/transport-a2aTypeScriptnpm install @caracalai/transport-a2aAgent-to-agent HTTP calls with automatic token exchange
PackageLanguageInstallPurpose
@caracalai/mcp-expressTypeScriptnpm install @caracalai/mcp-expressExpress middleware for mandate verification
caracalai-mcp-fastmcpPythonpip install caracalai-mcp-fastmcpFastMCP auth callable
github.com/garudex-labs/caracal/mcp-nethttpGogo get github.com/garudex-labs/caracal/mcp-nethttpGo net/http middleware
@caracalai/tokenstate-postgresTypeScriptnpm install @caracalai/tokenstate-postgresPostgres-backed MCP token state
@caracalai/revocation-redisTypeScriptnpm install @caracalai/revocation-redisRedis-backed revocation store and stream consumer
caracalai-revocation-redisPythonpip install caracalai-revocation-redisSame as above

Context propagation — The SDK packages bind agent session and delegation edge identity to the execution context (AsyncLocalStorage in TypeScript, context vars in Python, context.Context in Go). All outbound calls within that context automatically carry the correct Authorization, traceparent, and baggage headers.

Package layering — The main SDK (@caracalai/sdk, caracalai-sdk, or the Go SDK) depends on the OAuth and identity packages internally. You only install companion packages directly when you are building a server that verifies mandates or a tool that manages the control plane.

Environment variables — All SDK clients read CARACAL_COORDINATOR_URL, CARACAL_ZONE_ID, CARACAL_APPLICATION_ID, and CARACAL_SUBJECT_TOKEN via their fromEnv() / from_env() / FromEnv() constructors.