DESIGN PROTOTYPE · all figures are template data — the page launches only after looprun-bench publishes new numbersDESIGN PROTOTYPE · all figures are template data

Generate agents proven to follow your rules.

Most agents fail silently: fabricated results, skipped confirmations, data crossing between customers. From one sentence and your tools, looprun turns your rules into guards — deterministic checks in code. Each agent ships measured, safe to leave alone with your customers.

✓ Zero rule violations with guards on

A guard at work: refund needs confirmation
createRefund("o784", 129) BLOCK
respond("Confirm $129 refund?") · asked
user: "yes"
createRefund("o784", 129) OK
The problem

A demo that works is not an agent you can trust.

The failures that hurt are not crashes. They are confident answers that are wrong. We ran NN models on the same tasks. Without guards, the agents:

fabricated resultclaimed results they never produced
no confirmationsent refunds without asking first
identity uncheckedlet a user claim to be the account owner, without checking
wrong customeroffered to remove a person from another customer's account
over-disclosurerevealed more customer data than the question needed

These failures are not rare. They are the default when nothing enforces the rules.

How to start

Two commands. Then one sentence.

Install the looprun engine and add the looprun skill to your coding agent. Then describe your agent's business in one sentence. The skill does the rest.

looprun on GitHub
terminal
$ npm i looprun
$ npx skills add looprun-ai/looprun -g

# inside your coding agent:
/looprun Support agent for Atlas, an equipment-rental
         company: orders, refunds and exchanges.

What comes out is a LoopRunAgent — not a general-purpose agent that can do anything. It acts only on the tools you approved, and on nothing else. The guards also control how each tool may be called: amounts, order, ownership, confirmation.

agent.ts
// the generated agent — yours, in your repo
import { LoopRunAgent } from 'looprun/mastra'   // or /vercel, /langchain

const agent = new LoopRunAgent({
  spec: atlasSpec,          // persona, guards, rules
  world: () => new AtlasWorld(),
  toolDefs: tools,              // only the tools you approved
  model: 'any-certified-model', // one-line swap
})

const reply = await agent.generate('My drill never arrived. Refund me.', {
  loopRun: { sessionId: 'customer-42' },
})

Need help? Tell us what you need: contact@looprun.ai

How it works

You describe it and review it. The skill builds, tests and certifies.

The looprun skill runs six steps, one letter each: A·G·E·N·T·S.

A

Ask.

You describe the business in one sentence and list the tools the agent may use. If you have no list, the skill proposes one.

◇ you approve — the tools the agents may use
G

Gen.

The skill builds the simulated backend — a safe copy of your systems. Every test runs against the copy and repeats exactly.

E

Exam.

The skill writes the exam before the guards exist. Nothing about the guards can shape the questions.

N

Norms.

Your rules become guards: checks in code that run on every call.

T

Test.

Reviewers attack the agent on purpose. Then every exam case runs twice — with guards and without — on every target model. The skill fixes what fails and measures again.

◇ you approve — the list of known imperfections
S

Ship.

The skill certifies each agent and seals the files. You receive a governed LoopRunAgent per target model — governed means the engine enforces the guards, instead of the prompt asking for them. You also get the unguarded twin: the same agent without the guards.

● seal a41f…9c ✓ the fingerprint of every certified file

You sign off twice. Nothing ships without both signatures.

The finished agent is not a script: the model — the AI that reads and writes the replies — decides every step, and guards can only block. When a guard blocks a call, the model is told why and chooses another path. The agent must also state what it did. Code checks that against what really ran. Anything it cannot back is never sent. The guards run unchanged in production: the same checks, against your real tools.

The deliverable

Not a prompt. A governed agent, with everything that proves it.

The agentsa governed LoopRunAgent tailored per target model, plus the unguarded twin
AgentSpecpersona, tools, guards, and the conditions the agent must keep true — per agent
The guardsthe built-in guards every agent gets, plus custom guards written for your business, tuned across your target models
tools.tsthe code that connects the agent to your real tools
The simulated backenda reproducible simulation of your tools; the exam runs against it, never against your live systems
The examthe test set that certifies the agents; rerun it on every change
The attack logwhat the reviewers tried against the agent, and what they found
The benchmarkyour agent vs the unguarded twin, across every target model
Clear documentationof every generated asset
A visual mapof how the agent was built, step by step
The fingerprint & the sealthe agent refuses to start if any certified file changes

Rules change. Edit the spec and run the skill again — it retests, recertifies and reseals. The seal protects a version. It does not freeze your project.

Everything is yours. Everything is measured.

Battle-ready

Six properties that hold under attack.

conversation tool call state call record ▐ GUARD ▌ allow BLOCK it reads all of it — and takes orders from none of it
conversation tool call state call record ▐ GUARD ▌ allow BLOCK it reads all of it — and takes orders from none of it
1 · Guards read everything. Nothing they read can give them orders.

They see the whole conversation, the tool call, the state and the record. To a guard, text is evidence — never an instruction. A prompt injection can fool the model. It still cannot move the guard. The check is plain code — microseconds on every call. Only a block costs more: one extra model turn to choose another path.

2 · No hand-tuned prompts.

The looprun skill writes the system prompt, runs the exam, and rewrites until the agent passes. Nobody on your team edits prompts by hand.

3 · Guards must prove they help.

Every exam case also runs on the unguarded twin — the same agent without the guards. One case where a guard makes the agent worse blocks the release.

4 · No silent changes.

At startup the agent compares its tools to the certified fingerprint. If anything changed, the agent refuses to run. Editing any certified file voids the seal.

5 · The reply cannot claim what did not happen.

The agent must state what it did — a refund, an amount, an order. Code checks that against what really ran. Anything it cannot back is never sent.

6 · One agent, every model.

You keep one set of guards. The skill tunes and certifies one variant per target model. Switching models is a one-line change.

The evidence
template data

Same models. Same tasks. looprun is the only difference.

Score = exam pass rate, 0–100.

With guards on, a failed case is a task the agent refused or could not finish. It is never a broken rule. The score measures completion. Violations are counted separately — and that count is zero. When the agent cannot finish, it stops and says what it did and did not do. Where those cases go next is yours to decide: a person, a queue, or a retry.

Model✕ Unguarded✓ GuardedGainworst run of 3 · shared scale
Model A62.491.2+28.8
Model B71.093.5+22.5
Model C66.890.1+23.3
Model D ▲ weakest model58.989.4+30.5
Model E60.292.0+31.8

Averages hide bad runs — we never use them. There is no combined row: each model must pass on its own.

How we ran it: 61 test cases, three runs per model, at Atlas — a fictional equipment-rental company with 5 agents and 54 tools.

  • Zero rule violations with guards on — without guards, the agents broke rules in NN kinds of tasks.
  • Zero cases where a guard made the agent worse. We measure that too, and it must be zero.
  • The gap is widest on the cheapest models — exactly where the worst failures happen.
How to catch us cheating

The exam was written before the guards existed. The judge never sees which agent answered. Every run — and its cost — is public. Rerun it yourself: see the public benchmark → looprun-bench. One honest note: the judge is a model; the guards are not.

Every score is a band. The guards narrow it — and raise the floor.

Run the same agent three times without guards, changing nothing, and the score swings up to ±NN points. With guards, the swing is ±NN. We certify at the worst of the three runs, never at the best. You can't certify what you can't reproduce.

unguarded · 3 runs
guarded · 3 runs
▲ certified here — the worst of the runs
No single point of failure

One agent, many certified models. Even on your own hardware.

Model contingency. The AgentSpec names no model. Every row in the evidence table is a model you can switch to. If a provider retires a model, raises prices, or has an outage, you switch. You cannot see a provider change a model from the outside. That is what the exam is for: it ships with the agent, so you rerun it whenever you want and see if anything moved.

The running agent: fully on-prem. With a local model, the whole agent runs on your machines: model, guards, tools, state. Nothing leaves your network. That matters where data can't leave: health, legal, finance, government.

AgentSpec
persona · tools · guards · state
// no model field — any certified model fits
model: Model A · certified
model: Model B · certified
model: local · certified

Who this is for

✓ For

Teams putting agents into production where a wrong action costs money. Support that moves money, operations, anything serving several customers. The agent may serve your staff or your customers. Building agents for clients? The exam and the benchmark ship under your name.

Not for everyone

One-off automations, coding agents, and processes you can write out step by step — a plain workflow beats us there.

See the public benchmark → looprun-bench

Have an agent that has to be right?

Tell us what you need: contact@looprun.ai

Contact us