26 Cycles Integration Guides at Publication
When we launched Cycles, the question we heard most was: "Does this work with my stack?"
At publication on 2026-04-02, the documentation covered 26 integration patterns across Python, TypeScript, Java, and Rust; see the integrations overview for the current list. Each guide shows where an application can insert the same reserve-commit lifecycle. Coverage is not automatic: the integration must route every protected call through the boundary, classify caller-assigned exposure such as RISK_POINTS, and retain application authorization for tool permissions.
What shipped
We added 9 new integration guides, bringing the total from 17 to 26:
LLM Providers (8)
| Provider | Languages | What's new |
|---|---|---|
| OpenAI | Python, TypeScript | TypeScript guide added — withCycles and reserveForStream with stream_options: { include_usage: true } |
| Anthropic | Python, TypeScript | TypeScript guide added — streaming via client.messages.stream(), per-tool-call tracking |
| Groq | Python, TypeScript | New — OpenAI-compatible API, Groq-specific pricing, model-downgrade degradation pattern |
| AWS Bedrock | TypeScript | — |
| Google Gemini | TypeScript | — |
| Ollama / Local LLMs | Python, TypeScript | — |
AI Frameworks (10)
| Framework | Language | What's new |
|---|---|---|
| LangGraph | Python | New — callback handler in graph nodes, per-node scoping, conditional edges with client.decide() |
| LangChain | Python, JS | — |
| CrewAI | Python | — |
| AutoGen | Python | New — model client wrapper for teams, swarms, and graph flows |
| LlamaIndex | Python | — |
| Pydantic AI | Python | — |
| AnyAgent | Python | New — single callback covers all 7 supported frameworks |
| Vercel AI SDK | TypeScript | — |
| Spring AI | Java | — |
Agent Platforms (3)
| Platform | Language |
|---|---|
| OpenAI Agents SDK | Python |
| MCP (Claude, Cursor, Windsurf) | TypeScript |
| OpenClaw | TypeScript |
Web Frameworks (5)
| Framework | Language | What's new |
|---|---|---|
| Django | Python | New — middleware, exception handling, per-tenant budget dashboard |
| Flask | Python | New — error handlers, before_request preflight |
| FastAPI | Python | — |
| Next.js | TypeScript | New — route-level guards, server actions, per-tenant isolation |
| Express | TypeScript | — |
The patterns that matter
Budget gates across frameworks
The integration pattern is consistent: put a successful reservation before each instrumented LLM call, tool invocation, or API request. That proves budget availability for the submitted Subject and estimate; application authorization still decides whether the specific tool and arguments are permitted.
This can also bound cumulative caller-assigned action exposure. If the host authorizes and instruments send_email, for example, the OpenAI Agents guide can reserve 50 RISK_POINTS per call while search_knowledge uses zero. The application chooses those classifications and prevents unauthorized tools or arguments; the budget authority accounts for what it submits.
For a layer-by-layer view of how the Python integrations above sit relative to wrapper-style libraries, provider-client patches, LLM gateways, and observability tooling — and where each layer covers cost, risk, or audit — see Python AI Agent Control: Cost, Risk, and Audit by Layer.
Graceful degradation with model downgrade
The Cycles decision model has ALLOW, ALLOW_WITH_CAPS, and DENY for preflight/dry-run evaluation. A caller can implement model downgrade when its configured policy returns caps or when a live reservation is rejected.
The Groq guide introduces a pattern where agents switch models based on remaining authority:
def chat_with_downgrade(prompt: str) -> dict:
try:
return primary_chat(prompt) # GPT-4o: $2.50/$10 per 1M tokens
except BudgetExceededError:
return fallback_chat(prompt) # Groq Llama 4: $0.11/$0.34 per 1M tokensIn this example the application catches the primary-path budget error and attempts a separately configured fallback. Cycles records action_name as context but does not derive budget scopes from it; use standard Subject fields and estimates to give primary and fallback calls the intended budgets.
Multi-tenant SaaS guide
Beyond integrations, we shipped a comprehensive Multi-Tenant SaaS Guide — the single most-requested doc.
It covers the full lifecycle of per-customer runtime authority:
- Customer onboarding — automated tenant + API key + budget creation
- Plan tiers — Free ($5/mo), Pro ($50/mo), Enterprise ($500/mo) with overdraft limits
- Per-tenant isolation — one customer's runaway agent cannot affect others
- Graceful degradation — upgrade prompts, model downgrade, feature disabling
- Tenant suspension — ACTIVE → SUSPENDED → CLOSED lifecycle
Each customer can receive independent scope ledgers, while tenant-bound API-key checks reject cross-tenant access. Application authorization and mandatory-boundary coverage remain necessary; this is not cryptographic isolation of arbitrary application actions.
Try it
Pick your framework from the integration overview and follow the guide. Setup time depends on how many execution paths, Subjects, estimates, and failure modes your application must instrument.
If your stack isn't covered, open an issue. We're prioritizing based on real user requests.