Solwyn Docs
Python and TypeScript SDKs for AI agents — hard spending caps, automatic provider failover, and per-agent cost attribution, without sending prompt or response content to Solwyn Cloud.
Choose your SDK
Python SDK
Install solwyn, wrap your existing client, and report your first call in about five minutes.
TypeScript SDK
Install @solwyn/sdk 0.3.0, wrap your existing client, and report your first call.
Using Claude Code, Codex or Cursor? Paste one prompt and let your agent do the wiring. You only open links in your browser to sign up and approve. → Set up Solwyn with your coding agent
Python quickstart
Install the SDK
pip install solwyn on Python 3.11 or newer, then point it at your existing client. On Node.js 22 or 24, use the TypeScript SDK. → Quickstart
Create a project from the CLI
Install the CLI (Python 3.11+), run solwyn login and approve it in your browser, where you can also sign up. Then run solwyn projects create --name my-app --budget 50 --mode hard_deny --store-key and approve that too. Prefer a browser? The dashboard creates projects too. → Quickstart
Wrap your client
Three lines wrap OpenAI, Anthropic, Gemini, Bedrock, or Together. → Quickstart
Check spend from the terminal
solwyn budget status and solwyn costs show your first tracked call, or open the dashboard. → Quickstart
Running coding agents? The CLI gives them pre-flight budget guardrails to call before they spend: reserve, spend, settle. → Agent integration · Setup prompt
Not on Python, or shipping through CI? The same CLI meters calls the SDK does not wrap and gates a deploy on budget with one exit code.
Python providers
Explore the Python docs
Quickstart
From pip install to a tracked call in your dashboard — about five minutes.
Providers
OpenAI, Anthropic, Google Gemini, Amazon Bedrock, Together AI, and any OpenAI-compatible endpoint.
Budget enforcement
Alert-only vs hard-deny, and what happens when you hit the limit.
Run control
Stop a runaway agent from the dashboard, or let the SDK's velocity detector stop it locally.
Framework integrations
Tested recipes for OpenAI Agents, LangChain and LangGraph, and CrewAI.
Testing
Script denials, outages, and kills against a zero-network control-plane double.
Privacy & how it works
The exact wire contract — token counts and operational metadata, never prompt or response content.
Set up with your coding agent
One prompt for Claude Code, Codex or Cursor. Your agent runs the setup, and you approve in your browser.
CLI
Budget guardrails for agents, cost monitoring for humans — from the terminal or over MCP.
Gate CI on budget
Block a deploy when a project is near its cap — one command, one exit code, no code change.
Dashboard guide
Signing up, where everything lives, and how to recover access.
Cloud & dashboard
Get your API key, watch spend, and receive signed webhooks for budget events.
Reference
Full constructor and method signatures, config fields, and exceptions.