Thoth SDK
sdk v0.1.6 / proxy v0.2.7

Installation

Install the Thoth SDK for Python, Go, or TypeScript and configure your API key.

Enterprise rollout?

If you are deploying Thoth across managed endpoints, start with the Deployment Guides and Claude Desktop Fleet Configuration.

Prerequisites

You need a tenant, an API key, and the enforce URL for your environment.

export THOTH_API_KEY="thoth_live_your_key_here"
export THOTH_API_URL="https://enforce.<tenant>.<apex-domain>"

If your security team already provisions keys through secrets management, use that key directly.

Headless key creation (control-plane API)

If you run fully headless, create keys through GovAPI instead of a UI.

curl -sS -X POST "https://<tenant>.<apex-domain>/<tenant>/thoth/api-keys" \
  -H "Authorization: Bearer $THOTH_ADMIN_BEARER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "sdk-runtime-key",
    "scope_level": "organization",
    "permissions": ["read", "write", "execute"]
  }'

Store the returned api_key in your secret manager. It is shown once.


Python

Requirements: Python 3.10+

pip install aten-thoth

Or with Poetry:

poetry add aten-thoth

Verify install:

import thoth
print(thoth.__version__)

Framework integrations

  • Anthropic Claudeinstrument_anthropic()
  • OpenAIinstrument_openai()
  • LangChain / LangGraph — auto-detected by instrument()
  • CrewAI — auto-detected by instrument()

Go

Requirements: Go 1.21+

go get github.com/atensecurity/thoth-go

Import:

import "github.com/atensecurity/thoth-go"

Environment fallbacks are applied automatically (THOTH_API_KEY, THOTH_API_URL, THOTH_TENANT_ID, THOTH_AGENT_ID).


TypeScript / Node.js

Requirements: Node.js 18+, TypeScript 5.x

npm install @atensec/thoth
# or
pnpm add @atensec/thoth
# or
yarn add @atensec/thoth

Sub-path integrations:

import { wrapAnthropicTools } from "@atensec/thoth/anthropic";
import { wrapOpenAITools } from "@atensec/thoth/openai";

Next steps

On this page