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.2.0, wrap your existing client, and report your first call.
Python quickstart
Install the SDK
pip install solwyn, then point it at your existing client. → Quickstart
Wrap your client
Three lines wrap OpenAI, Anthropic, Gemini, Bedrock, or Together. → Quickstart
See spend in the dashboard
Your first tracked call shows up as a cost event. → Quickstart
Set a budget
Choose alert-only or hard-deny for the project in Solwyn Cloud. → Budget enforcement
Running coding agents? The CLI gives them pre-flight budget guardrails to call before they spend — reserve, spend, settle. → Agent integration
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.
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.