Compose agents, humans, code, and services into long-running systems that outlive any agent, session, or machine.
Open source. Python first. Language neutral at the foundation.
From agent loops to agentic systems
We built agents to do the work. Then we buried them in bureaucracy.
Today
Today, agents run the loop
One context carries the state. One agent routes the work, waits, retries, hands off, checks status, and recovers when something breaks.
The longer the loop runs, the more intelligence it spends keeping itself alive. The work inherits the limits of that context, session, process, and machine.
With Petrus
With Petrus, agents run free
The graph carries the state, coordination, and history. Agents focus on the work they are good at. They reason, act, specialize, collaborate, leave, and return without holding the system together.
Deterministic work stays deterministic. Agentic work stays agentic. Human decisions can enter wherever they belong.
See Petrus at work
A pull request is not a task. It is a living system.
Code changes. New commits arrive. Checks finish. Reviews disagree. Agents act. Humans decide. Failed work returns with new information.
HamsterDan is the first demo application built on Petrus.
It coordinates review agents, coding agents, deterministic checks, GitHub, and human decisions through one durable graph.
One system. Two views.
Watch the graph run. See work become available, move between participants, wait for decisions, and continue from durable state.
Watch the pull request evolve. See the same system from the product side as the pull request changes throughout the process.
Run it yourself
Clone Petrus and run the credential-free PR readiness workflow locally:
uv run python -m examples.pr_readiness \
--root /tmp/petrus-pr-readiness
Go deeper
Real work waits, loops, reacts, and changes while it is running. Petrus makes that coordination explicit and durable.
Beyond the Loop
Subscribe to Beyond the Loop, Henrique Bastos's notes on agentic systems and the infrastructure they need.
Essays, experiments, Petrus demos, release notes, and invitations to help push beyond the loop.
Petrus is an open project created by Henrique Bastos.