Skip to content
Tech News
← Back to articles

What we have learned at OpenShell applying formal methods to control AI agents

read original more articles
Why This Matters

As AI agents move from single-task coding assistants to autonomous swarms handling long-running, open-ended work, traditional manual permission review can't keep up—human oversight simply doesn't scale to hundreds of agents. OpenShell's approach of using formal methods (via the Z3 solver) to mathematically prove that agent policy changes stay within approved bounds offers a promising path toward safe, verifiable autonomy rather than relying on ad-hoc sandbox checklists. This matters because as enterprises delegate more consequential tasks to AI agents, provable guarantees—not just spot-checks—will be essential for trust and safety.

Key Takeaways

What we have learned applying formal methods to control AI agents

An intro to using formal methods to reason about permission changes in long-running AI agents.

In this post- we’ll dive into how permission review breaks at agent scale, and how to use the Z3 open source library to write a formal proof that a policy change proposed by an agent stays inside what you approved.

Why permission review breaks at agent scale

AI agents are becoming smarter, and the work we ask them to do is becoming increasingly autonomous. Today, many of us use small groups of agents to iterate on code one PR at a time with Claude or Codex. Increasingly, we’re starting to hand agents long-running and open-ended research tasks that require hundreds of agents working over hundreds or thousands of hours that may unlock the next breakthrough in a sector.

As these use cases expand, a few things start to happen:

Agent needs evolve. As they go about their tasks, agents will need access to data stores, coding repos, ability to search the internet, and to execute detailed simulations and tests.

Human supervision stops scaling. At the scale these need to run, human supervision over all agents itself becomes impossible.

This raises a hard question: how can we guarantee that a group of agents working together—each with its own scoped policy—does not exceed the permissions granted to the overall system? Imagine one agent with write access to the internet, another with access to security tooling, or a group working under a broadly scoped charter like “do competitive research.” How do we keep the system within the intent of the human operator?

This requires a new set of controls and mechanisms that allow us to stop squinting at a list of sandbox permissions and to start thinking in a higher level and more declarative way. In this post, we’ll dive into some of the research we have been doing in this area on the OpenShell team, specifically around the use of formal methods, to build a “proof” of the capabilities of not just a single agent, but an entire agent system.

... continue reading