Get Sponsio blocking an unsafe tool call in under a minute. No API key, no framework SDK, no Docker.
pip install sponsioOptional extras (all pure Python):
pip install "sponsio[all]" # yaml + llm + otelFour recorded unsafe-agent trajectories ship in the wheel. Replay one:
sponsio demo --scenario wire --fastYou'll see an accounts-payable agent try to wire $847k to an unverified vendor, and Sponsio block it on three fronts at once:
━━━ ◒◓ sponsio ━━━━━━━━━━━━━━━━━━━━━━━━━━
▎ contract · ap_copilot
▎ single wire capped at $50k
▎ enforce ▸ wire_transfer.amount must be in range [0, 50000]
▎ contract · ap_copilot
▎ compliance_approve must precede wire_transfer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-> wire_transfer(to='Acme Logistics LLC', amount=847000, ...)
✗ amount must be in range [0, 50000] — VIOLATED → blocked
✗ compliance_approve must precede wire_transfer — VIOLATED → blocked
Other scenarios:
sponsio demo --scenario cleanup # Claude Code agent deletes .env + .git/
sponsio demo --scenario backup # SRE cost-optimizer deletes prod DR backups
sponsio demo --scenario freeze # Replit-style code-freeze violation + coverup
sponsio demo --scenario wire --no-guard # same trajectory without contractsOne command. Detects framework, writes sponsio.yaml in observe mode, runs sponsio doctor, prints a 2-line patch:
sponsio init .Typical output:
· framework: langgraph (found 1 langgraph import in agent.py)
· provider: none (no provider credentials detected)
· starter-pack: +5 contracts from name-heuristic safety rules
· packs: +2 auto-selected (capability/shell, capability/filesystem)
· wrote sponsio.yaml
· running doctor checks…
✓ sponsio.yaml
tools: 2
contracts: 17
mode: observe
framework: langgraph
doctor: 8/9 ok, 1 warn
Add this to your agent entry point:
from sponsio.langgraph import Sponsio
guard = Sponsio(config="sponsio.yaml", agent_id="agent")
agent = create_react_agent(model, guard.wrap(tools))
Without an LLM key, init still ships a name-heuristic starter plus capability packs (shell / filesystem / credentials / …) with deterministic rules — no LLM calls. Run sponsio packs for the full list with rule counts.
For TypeScript, install @sponsio/sdk and run npx sponsio init .. Same yaml output, same Sponsio({ config: "sponsio.yaml" }) API.
sponsio.yaml starts in observe mode. Every contract evaluates, nothing blocks. Would-have-blocked decisions land in ~/.sponsio/sessions/<agent_id>/*.jsonl.
After exercising the agent, review what would have blocked:
sponsio report --agent agent --since 24hPure-OSS live stream:
sponsio host trace --followWhen the report is clean:
export SPONSIO_MODE=enforce # no code changeOr bake it into yaml:
runtime:
mode: enforcePrecedence: explicit ctor arg > env var > yaml > default.
sponsio doctor # install + config + wiring
sponsio validate --config sponsio.yaml # parse + structural checks
sponsio check --trace trace.json --config sponsio.yaml --agent agent- First contract: write your own rule.
- Integrations: plug into LangGraph, CrewAI, OpenAI Agents, and others.
- Config reference: full
sponsio.yamlschema. - CLI reference: every command and flag.