Open-source project
SponsioLabs/Sponsio avatar
SponsioLabs/Sponsio

Sponsio: deterministic contracts that check an AI agent's tool calls before they run

Deterministic safety solutions for probabilistic AI agents

455 stars27 forksPythonApache-2.0

At a glance

What is it?
Sponsio is a runtime enforcement layer that evaluates rules against each tool call an LLM agent makes, using history-aware contracts and no model call. It is still an alpha release, and how well it resists a misbehaving agent depends on which of three deployment tiers you use.
Who is it for?
Sponsio fits teams that run tool-calling agents and want written, reviewable rules enforced on every call without paying for a second model, and who will deploy at Tier 2 or Tier 3 when the agent itself cannot be trusted. It is a weak fit for anyone who needs a stable release, since the current version is an alpha installed with the pre flag, or who relies on the default Tier 1 install to stop a determined agent.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • SponsioLabs/Sponsio455 ★ · +15
Star history
Repository2026-09-112026-11-25
SponsioLabs/Sponsio440455

15 Stars in the last 75 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Contracts see history, so one rule replaces a paragraph of prompt

Sponsio checks an agent's tool calls before they run. A rule can look at what already happened, so a requirement like check the policy before issuing a refund is a single rule, not a paragraph in a prompt. The README defines an agent contract as a runtime rule that is checked at every agent action and backed by formal methods. Each check is said to take under 0.01 ms and to call no model.

It works with LangChain, Claude Agent, OpenAI Agents, Google ADK, CrewAI, Vercel AI, MCP and any custom tool-calling loop, in Python or TypeScript. The package keywords include ltl and runtime-verification, which fits the claim of formal methods. The practical meaning is that a refusal comes from a rule you can read, and not from a model that might answer differently tomorrow.

The limit of this design is that contracts judge actions, not intent. A rule that looks at tool calls and their history can stop a refund issued without a policy check, but it cannot tell whether a message the agent writes is honest. Rules are only as complete as the tool calls you wrote them for, so an action that goes through a tool with no contract is not covered.

The current release is an alpha, installed with the pre flag

Version v0.2.0a21 is the newest release, preceded by v0.2.0a20 and v0.2.0a19 within about two weeks. Installation therefore needs the pre-release switch, and a first command pair sets up a project:

bash
pip install --pre sponsio   # or: npm install -D @sponsio/sdk@alpha
sponsio init .              # asks what you use, then writes sponsio.yaml

The wizard detects your framework and prints the right wrap snippet. The package requires Python 3.10 or newer and lists a Beta development status classifier, while the release names are alpha. Expect command names, config keys and behaviour to move between alpha builds, and pin the exact version you test. The core dependencies are click, rich, questionary and pyyaml, which keeps the base install small.

Can the agent switch Sponsio off? That depends on the tier

The README answers this with three deployment tiers. Tier 1 is the default install: the daemon runs as the agent's user, every hook path fails closed, and changes to rules, mode, wiring and engine are detected and recorded, with weakening changes waiting for your review. Tier 2 is for teams: the daemon runs as its own system user with a root-owned engine and managed host settings, so the agent's user cannot change rules, mode, history, wiring or logs.

Tier 3 is the enterprise setup, where the agent is sandboxed and Sponsio owns the tool gateway, credentials and egress. The commands are sudo sponsio install --system for Tier 2 and sponsio run --sandbox for Tier 3. Tier 2 covers Claude Code on macOS and Linux only, and Cursor stays at Tier 1 even then. The sponsio doctor command reports which tier a machine is in.

The speed and safety numbers come from the project's own benchmarks

One contract takes a p50 of 0.0052 ms to check, and the heaviest workload in the ODCV benchmark, with 19 contracts on every call, takes 0.139 ms. Against an LLM-as-judge guardrail at 50 to 800 ms, the project calls this 5,000 to 60,000 times faster. p99 stays near 1 ms on every workload measured. A host hook for Claude Code or Cursor also starts a short-lived process per tool call, which adds time.

On ODCV-Bench, covering 12 frontier models over 80 trajectories each, unguarded models cheat in 11.5% to 66.7% of runs. With Sponsio, 95.6% of misalignment is avoided on average, and 24 of 36 high-risk scenarios reach 100%. In a financial audit fraud scenario, models commit fraud in 16 of 24 trials and Sponsio blocks 18 of 19. These are the authors' measurements, with the methodology in the benchmarks document.

Enforcement is local, and the hosted console is optional and best effort

Enforcement is local and needs no account. If you want to see what an agent did, the hosted console at app.sponsio.dev is optional. One attach call puts a run on screen:

python
import sponsio
import sponsio.bridge

guard = sponsio.Sponsio(config="sponsio.yaml", agent_id="mailer", mode="enforce")
run = sponsio.bridge.attach(guard)

The command sponsio push sponsio.yaml uploads a rulebook as a draft, and it does not arm it. A person publishes it in the console, and sponsio pull or the config value sponsio://default brings the reviewed version back. Sending is best effort, so a console that is down never blocks the agent. The result is a review step between a drafted rule and a live rule, without making the agent depend on a network service.

Plain-English drafting gives you a draft, not a verified rule

The command sponsio validate with a rule written in plain English turns it into a contract you can read back. The README is careful about the limit: treat the output as a starting draft to review and adjust before you enforce. The determinism is in how contracts are enforced at runtime, not in how they are drafted.

That distinction matters in review. A drafted contract may match your words but miss an edge case, such as a refund tool called under a different name. Read the generated YAML, run the agent in observe mode first, and only then flip to enforce. The quick start refers to an observe to enforce flip and CI wiring in the full walkthrough in QUICKSTART.md.

Twenty-two bundled contract packs, and an OpenClaw preset

The contract library ships 22 bundles, organized by tier into always-on, per-tool and per-incident groups. Each bundle is a YAML pack composed from Sponsio's deterministic patterns, and you drop one into sponsio.yaml to guard against a class of problems. OpenClaw users get bundled ClawHavoc and CVE-2026-25253 coverage out of the box.

The repository also holds docs, evals, examples, plugins, a deploy directory, an OSS_PROMISE.md file and README translations in Chinese and Japanese. The license is Apache-2.0, and the last push was on 2026-10-30. The integration guides list each supported framework, so use them for manual wiring when the wizard's snippet does not fit your agent loop.

Because the packs are plain YAML, you can read each one before enabling it, and copy only the always-on group at first. Per-incident bundles respond to specific named problems, so they age as new incidents appear, and you should check which ones match the agent frameworks you actually run.

Editorial conclusion

Sponsio fits teams that run tool-calling agents and want written, reviewable rules enforced on every call without paying for a second model, and who will deploy at Tier 2 or Tier 3 when the agent itself cannot be trusted. It is a weak fit for anyone who needs a stable release, since the current version is an alpha installed with the pre flag, or who relies on the default Tier 1 install to stop a determined agent. Run sponsio doctor on each machine to see which tier it is actually in.

Frequently asked questions

what does sponsio mean

In this project Sponsio is the name of a runtime contract enforcement tool for LLM agent systems. It checks an agent's tool calls against rules before they run.

How do I install Sponsio?

Run pip install --pre sponsio, or npm install -D @sponsio/sdk@alpha for TypeScript, then run sponsio init . to write sponsio.yaml. The release is an alpha, so the pre flag is required.

Can an agent disable Sponsio?

At the default Tier 1 install the daemon runs as the agent's user, so changes are detected and recorded rather than prevented. Tier 2 and Tier 3 move the daemon and the egress out of the agent's reach.

Official sources

  1. License: Apache-2.0
  2. Project website
  3. README
  4. Releases
  5. SponsioLabs/Sponsio on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/sponsiolabs-sponsio.svg)](https://hysenlabs.com/projects/sponsiolabs-sponsio)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/sponsiolabs-sponsio.svg)](https://hysenlabs.com/projects/sponsiolabs-sponsio)

Was this useful?