r/MachineLearning · · 1 min read

Sponsio: Deterministic Contract Layer for LLM Agents [P]

Mirrored from r/MachineLearning for archival readability. Support the source by reading on the original site.

We've been trying to put LangGraph agents into production for a while. The thing that kept biting us was tool-call boundary enforcement: stuff like "must call X before Y", "max N retries", "approval gate before destructive action". Worked fine in demos, broke at the moments that mattered.

What we tried first:

Prompt engineering. Told the model "always call check_policy before issue_refund". Worked ~95% of the time. The 5% that didn't was exactly the cases an auditor would ask about. Not a great answer when someone wants to know why a refund went through.

Post-hoc audit (OTEL + log). Caught violations after the fact. By then the side effect already happened. Refunding the refund is awkward.

Pulling everything into a workflow engine (Temporal, or nano-vm more recently). Strong guarantees but you rewrite the agent against their runtime. Too much for our use case.

What we ended up with:

A contract layer at the tool boundary. YAML rules, deterministic eval, runs before the tool call commits. Open-sourced as Sponsio.

Repo: github.com/SponsioLabs/Sponsio

Would love feedback from anyone running agents in prod.

submitted by /u/johnnaliu
[link] [comments]

Discussion (0)

Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.

Sign in →

No comments yet. Sign in and be the first to say something.

More from r/MachineLearning