Retrieved article excerpt
Open article · Retrieved 2026-11-12T19:21:57.758670+00:00
[agent.run()](https://agentrun.ai)
**Run smarter agents. Use fewer tokens.**
[npm](https://www.npmjs.com/package/@parcha/agentrun)
[Package checks](https://github.com/Parcha-ai/agentrun/actions/workflows/ci.yml?query=branch%3Amain)
[License: Apache-2.0](https://github.com/Parcha-ai/agentrun/blob/main/LICENSE)
[Docs](https://agentrun.ai/docs)
[Deploy to Render](https://render.com/deploy?repo=https://github.com/Parcha-ai/agentrun)
[npx @parcha/agentrun](https://github.com/Parcha-ai/agentrun/blob/main/README.md#start-in-three-steps)
[Quickstart](https://github.com/Parcha-ai/agentrun/blob/main/README.md#start-in-three-steps) ·
[Tour](https://github.com/Parcha-ai/agentrun/blob/main/README.md#take-the-tour) ·
[Templates](https://github.com/Parcha-ai/agentrun/blob/main/README.md#templates) ·
[Deploy](https://github.com/Parcha-ai/agentrun/blob/main/README.md#deploy-it) ·
[Docs](https://agentrun.ai/docs)
AgentRun is an open-source platform that supercharges your agents. It adds self-improvement, durable execution and a
control plane on top of your favorite agent harness. Your agents become smarter, more fault tolerant and use fewer
tokens with every run.
[An agent's Learning tab in the AgentRun console: since it learned, answers take 2 seconds instead of 10 and a run costs $0.0077 instead of $0.05, with the two notes it kept](https://agentrun.ai)
An agent's Learning tab: what it kept, and what changed since. Demo data from the console's recorded fixtures.
## Why AgentRun
Agents are great at figuring things out. The problem is they figure out the same things over and over. Give an agent
a job it has done a hundred times and it rediscovers the same API, rereads the same docs and rebuilds the same plan, and
you pay for every token of it.
Bring your agent on the harness it runs best on: Claude Code, Codex, OpenCode or pi. AgentRun does everything around it:
- **It learns the work.** After each run, the agent keeps what will help next time: a note, a skill, or a workflow
that does the job without the loop. The next run starts from there.
- **It never loses a run.** Every run lives in one store. Kill the server mid-run, start it again, and the run carries
on. Give each agent the computer the job needs: a sandbox, a Linux desktop, an Android phone or a browser.
- **You stay in control.** Approvals, spend caps and one console for every agent: what needs you, what failed, what's
running and what it cost.
You don't build the plumbing: provider integrations, recovery, run tracking and learning are all here. Run it on your
laptop with one command, in one container, or as a server with runners. Apache-2.0.
## Start in three steps
You need Node 24.22.3 or newer, on macOS or Linux.
1. **Start it.**
```
npx @parcha/agentrun
```
It starts the server and one runner on port 7340 (or the next free one), keeps everything in `~/.agentrun`, and
opens the console in your browser.
2. **Add one model key.** In the console, set a password, then add a key under **Settings → Model keys**. One
`OPENROUTER_API_KEY` gives every harness a model. An Anthropic key runs pi and Claude Code; an OpenAI key runs pi,
Codex and OpenCode.
3. **Run your first agent.** Open **Templates**, apply **KYB due diligence**, and start a run with a company's name and
website. It needs nothing but your model key. When it finishes, the run's **Report** tab has a due diligence report
with a verdict and every claim cited. Then open the agent's **Learning** tab to see what it kept for next time.
Rather have your coding agent do it? Tell it: `Read agentrun.ai/SKILL.md and set up AgentRun for me`.
Docker, sandboxes and running it on a server
If Docker is running on your machine, new agents get a Docker sandbox with a shell. Its image builds on first use,
which takes a few minutes, and the console says when it's ready. Without Docker, agents still read and write files,
but get no shell.
Want your own server with a URL? [Deploy it to Render](https://github.com/Parcha-ai/agentrun/blob/main/README.md#deploy-it) in one click.
## Take the tour
**Workflows that make the call.** A step can ask a fast typed question, see how sure the answer is, and pick a route.
Here the model leans approve at 0.61, below the workflow's 0.75 bar, so the case goes to review.
[A KYB onboarding workflow in the AgentRun console: registry and certificate checks in parallel, a cross-check, and a Jev decision with approve 0.61, review 0.33 and reject 0.06, sent to review under the 0.75 rule](https://github.com/Parcha-ai/agentrun/blob/main/docs/assets/readme/workflow-decision.png)
**Every agent in one place.** Mission Control opens first: what needs you, what failed, what's running and what it
cost, by day, by harness and by tool.
[Mission Control in the AgentRun console: agents, runs, tokens, run time, success rate and cost, per day, by harness and by tool](https://github.com/Parcha-ai/agentrun/blob/main/docs/assets/readme/mission-control.png)
**Every agent is an API.** Start a run from the Playground, then copy the same request into your code.
[The AgentRun Playground: a form to start a run on the left, and the same request as curl on the right](https://github.com/Parcha-ai/agentrun/blob/main/docs/assets/readme/api.png)
**You stay in control.** An agent can stop and ask you, and the run waits until you answer.
[A run waiting on a person in the AgentRun console: the agent asks which currency an invoice's amounts are in](https://github.com/Parcha-ai/agentrun/blob/main/docs/assets/readme/input-required.png)
## Agents that learn the work
Turn it on with `"learning": true` in an agent's definition. At the end of every run, the agent gets one more turn to
say what it would keep. AgentRun checks it, grades it, and commits the keepers to the agent's own git folder. The next
run starts from there.
```
flowchart LR
start["Run starts from<br/>the agent's main"] --> work["Run does the job"]
work --> propose["Last turn proposes<br/>notes, a skill, a workflow"]
propose --> check["Code checks,<br/>then one grader"]
check -->|kept| commit["Commit to main"]
commit --> start
```
Loading
- **Notes** are short markdown files, one fact each, in Claude Code's memory format.
- **Skills** are how to do a job again, and only a run that finished the job can write one.
- **Learned workflows** run as one tool call on any harness, under the run's own cap and tool permissions. Once a
learned skill has served 3 runs, the next run is asked for that job as a workflow draft, and a draft is dry-run
before it's kept: no model is asked and no tool runs.
The agent's **Learning** tab shows every note, skill and workflow and the log of changes, and each run shows which
notes it was given and opened. Retire anything there, or with `npx @parcha/agentrun learning retire` and the note's
ETag. Git keeps the history, so a retired note can come back.
What gets kept, and what gets dropped
Each agent has a learning folder: plain git with one branch, `main`. A run reads the index of active notes in its
instructions and gets the learned skills beside its own. Code checks every proposal first. An item that breaks a rule of
its own (a size or count limit, its name, its shape) is left out and the rest goes on. A secret or a hidden character
anywhere in the answer, a file outside the folder, a deletion or a full index drops the whole answer, since no item of
it can be trusted. Then one grader judges what it says, and AgentRun commits what passes. A risky rule waits for your
OK. A rule the run found in a page or a pasted email, or a note that holds an account number, is dropped.
Once an agent's notes outgrow the learning budget, each run gets the ones that bear on its first message, whole, and a
line for each of the rest. A run that only ran a learned workflow isn't asked what to keep.
## Workflows
A lot of agents don't need to be agents. Write repeatable work as a typed workflow: tool calls, model steps and fast
typed decisions (yes or no, pick one, a score, each with its confidence), with an agent to fall back on when a case is
unclear. AgentRun runs it as an agent's revision, under the agent's tool permissions and a cap like any run, and a
trigger can start one.
[Support workflow: search for an answer, check it with Jev, and return it or ask an agent to investigate](https://github.com/Parcha-ai/agentrun/blob/main/docs/assets/support-workflow.gif)
An illustration of the control flow in `examples/support-answer.mjs`, not a recording of a model run.
Watch any workflow run node by node, pause it and resume it, and read every decision and why it was made:
[A batch workflow mid-run in the AgentRun console: 20 certificates fan out, a Jev judge inspects each one, live counts and a pause button at the top](https://github.com/Parcha-ai/agentrun/blob/main/docs/assets/readme/workflow-run.png)
What a workflow looks like
A workflow is a JSON document of typed steps:
```
{
"v": 2, "name": "read-site",
"schemas": {
"In": { "type": "object", "required": ["website"], "properties": { "website": { "type": "string" } } },
"Page": { "type": "object", "required": ["ok"], "properties": { "ok": { "type": "boolean" } } }
},
"input": { "schemaId": "In" },
"output": { "schemaId": "Page", "path": "home" },
"root": { "node": "chain", "steps": [
{ "node": "call", "label": "Read the home page", "via": "tool", "tool": "web_fetch",
"args": { "url": "{website}" }, "out": "Page", "as": "home", "deadline_s": 60 }
] }
}
```
Steps can call tools, run a model, ask a fast typed question, branch on the answer, map over a list in parallel, loop a
bounded number of times, call other workflows, or hand the hard case to an agent. Save one as an agent's `workflow`
field; `npx @parcha/agentrun workflows validate` checks it first. The [workflow language](https://github.com/Parcha-ai/agentrun/blob/main/packages/dsl/README.md) also
runs on its own inside your app, with a [TypeScript builder](https://github.com/Parcha-ai/agentrun/blob/main/docs/authoring.md).
## Runs that survive
Every agent, revision, run and step lives in one store. Stop the server mid-run and start it again, and the run carries
on. With several runners, another runner picks up a dead runner's runs once their 30-second lease runs out. A finished
step is never run again; a write a crash cut off mid-call is marked interrupted rather than retried, so you can check it.
## You stay in control
- **Approvals.** Each tool is allowed, asks you first, or is denied. A call that asks waits on the run's page until you
answer. "Never ask" lets an agent run unattended, and a deny set on the server still holds over it.
- **Spend caps.** Give a run a cap and it pauses there instead of failing, and tells you the least it needs to go on.
A cost AgentRun can't price reads "unknown", never $0.
- **Questions.** An agent can stop and ask you, and the run waits until you answer.
- **One console.** Each run has a live Timeline, its files and, for a browser, a screen you can take over.
## Templates
Five ready-made agents. Apply one in one screen, make it yours, and measure it with its own eval cases. Each template is
one folder: the agent's instructions, its skills, its rules and its eval cases. **Templates → Apply** grants nothing
until you tick each MCP tool yourself.
| Template | What it does |
| --- | --- |
| `code-review` | Reviews a pull request or a diff, checks each finding against the code, and returns the findings as JSON. It sets up its own GitHub trigger |
| `kyb` | Due diligence on one company: registries, owners, sanctions lists, dated adverse media, and a verdict with every claim cited |
| `market-monitor` | Every Monday, a digest of what changed at the companies you watch, each item dated and linked |
| `inbound-lead` | Researches each lead a webhook sends and scores it 0 to 100 against your ideal customer profile |
| `release-notes` | Turns the pull request