SDK Overview
The Curate-Me platform provides SDKs and tools for integrating with the AI Gateway — the governance layer that sits between your application and LLM providers. Point your existing LLM SDK at the gateway URL, add your API key, and get cost tracking, rate limiting, PII scanning, model allowlists, and human-in-the-loop approvals with zero code changes.
Available SDKs
| Package | Language | Install | Purpose |
|---|---|---|---|
curate-me | Python | pip install curate-me | Python SDK for gateway integration and agent development |
@curate-me/sdk | TypeScript | npm install @curate-me/sdk | TypeScript SDK for gateway integration |
curate | CLI | npm install -g @curate-me/cli | Command-line tool for managing agents, runners, and gateway config |
@curate-me/embed | JavaScript | npm install @curate-me/embed | Embeddable gateway widget for web applications |
@curate-me/observer-sdk | TypeScript | npm install @curate-me/observer-sdk | Observability and tracing SDK for agent execution |
Features
| Feature | Description |
|---|---|
| AI Gateway Proxy | Route LLM calls through the governance chain with a base URL swap — no code changes required |
| Cost Tracking | Per-call cost recording with breakdowns by agent, model, organization, and API key |
| Rate Limiting | Per-org, per-key request throttling with configurable RPM limits |
| PII Scanning | Lightweight regex scan for secrets and PII before requests reach providers |
| Model Allowlists | Control which models each organization or team can use |
| Human-in-the-Loop | Approval queues for high-cost or sensitive operations |
| Multi-Tenant | Built-in tenant isolation with scoped state and cost tracking per organization |
| Real-Time Streaming | Full SSE passthrough for streaming LLM responses |
| Time-Travel Debugging | Replay and inspect any agent execution step-by-step |
Quick Start: Gateway Integration
The fastest way to use Curate-Me is to point your existing LLM SDK at the gateway. No new libraries needed — just change the base URL and add your API key header.
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://api.curate-me.ai/v1/openai",
api_key="sk-your-openai-key",
default_headers={"X-CM-API-Key": "cm_sk_xxx"}
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)TypeScript (OpenAI SDK)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.curate-me.ai/v1/openai",
apiKey: "sk-your-openai-key",
defaultHeaders: { "X-CM-API-Key": "cm_sk_xxx" },
});
const response = await client.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);Anthropic SDK
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.curate-me.ai/v1/anthropic",
api_key="sk-ant-your-key",
default_headers={"X-CM-API-Key": "cm_sk_xxx"}
)
message = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}]
)The gateway intercepts every call, applies your governance policies (rate limits, cost budgets, PII scanning, model allowlists, HITL gates), records costs, and proxies to the upstream provider. Your application receives the standard provider response — no changes to your response handling code.
Running Agents with the Python SDK
Use the curate-me Python SDK to manage and run agents registered in your
organization. Agents are referenced by an opaque ID (or an Autopilot template
name); the SDK proxies calls through the gateway so every run gets cost
tracking, streaming, and observability automatically.
from curate_me import CurateMe
client = CurateMe(api_key="cm_sk_xxx", org_id="org_xxx")
# or: client = CurateMe.from_env() # reads CURATE_ME_API_KEY / CURATE_ME_ORG_ID
# Run an agent by ID and await the result
result = await client.agents.run(
"agt_123",
input={"text": "Summarize the following article ..."},
)
print(result.status, result.output)
# Stream events as the agent executes
async for event in client.agents.stream("agt_123", input={"text": "..."}):
print(event.type, event.data)The client.agents sub-client exposes list, get, create, update,
delete, run, stream, get_run, list_runs, and cancel_run (each with a
*_sync variant for non-async callers). Other sub-clients cover the rest of the
platform: client.workflows, client.evaluations, client.guardrails,
client.costs, client.runners, client.snapshots, client.compliance, and
client.traces.
To instrument your own functions as traced agents, use the SDK decorators:
from curate_me import agent, trace
@agent(name="text_summarizer", model="claude-sonnet-4-6")
async def summarize(input: dict) -> dict:
# call your LLM through the gateway, then return a result dict
return {"summary": "..."}
@trace(name="analyze_document")
async def analyze_document(text: str) -> dict:
...Note: Authoring custom backend templates that ship with the platform is done via the Autopilot template contract (a
SKILL.md+ a registered template module), not via the SDK. Seedocs/00-platform/AUTOPILOT_TEMPLATE_CONTRACT.mdand thetemplates/skills/pattern underservices/backend/src/services/autopilot/.
Enterprise Features
Multi-Tenant Support
The platform includes middleware for tenant isolation in B2B deployments. Organization context is extracted from API keys (gateway) or JWT claims (dashboard API) and propagated through every request, ensuring that state, costs, rate limits, and audit logs are scoped to the correct organization.
HTTP API Integration
Mount pipelines as FastAPI endpoints with built-in SSE streaming. The B2B API (main_b2b.py) and Gateway API (main_gateway.py) use this pattern internally to expose agent management and governance routes.
JSON Workflow Definitions
Define pipelines declaratively for integration with visual builders and version control:
{
"nodes": [
{"id": "summarize", "agent": "agt_summarize", "model": "claude-haiku-4-5-20251001"},
{"id": "sentiment", "agent": "agt_sentiment", "depends_on": ["summarize"]}
]
}Supported Models
The gateway supports multiple provider families and evolves with the router. For the current routable catalog in your environment, call GET /v1/models or use the provider reference pages. Common examples include gpt-4o, claude-opus-4-7, claude-sonnet-4-6, gemini-2.5-pro, deepseek-chat, and OpenRouter vendor-scoped model IDs.
Next Steps
- Gateway Overview — understand routing, governance, and headers
- Pricing — plans and usage limits
- Creating Agents — manage and run agents with
client.agents - Cost Tracking — monitor and control LLM spend
- Managed Runners — secure OpenClaw sandbox containers (private beta)