Profile
Back to NewsBack
GitHub Trending 29 min
Reader Mode
edgehero/pi-dispatch: Go from sitting next to one AI coding agent to running many in the background. Dark engineering with the pi coding agent: self-hosted, each job in a sealed Docker or Podman container, spending limits checked before anything is s

edgehero/pi-dispatch: Go from sitting next to one AI coding agent to running many in the background. Dark engineering with the pi coding agent: self-hosted, each job in a sealed Docker or Podman container, spending limits checked before anything is s

An animation of the pi-dispatch banner: go from sitting next to one AI coding agent to running many in the background. In the loop, near the loop, out of the loop, dark engineering. On a lit floor you stand beside one agent. As the lights go off, more agents start, and you walk away to the one page that stays lit, whose counts follow the floor. Spending limits that hold, a sealed box for every job, and you decide what ships.

https://github.com/user-attachments/assets/129a774b-1dea-4dee-bb4f-3478eff409bc

One minute, with sound, on what is new in 5.0. The screens show sample data.

pi-dispatch

Go from sitting next to one AI coding agent to running many in the background.

Working with a coding agent usually means sitting next to it. You type, it works, you check, you type again. That is the right way to start, but one person can only watch so much. pi-dispatch lets you step back at your own pace, one kind of work at a time, from in the loop, to near the loop, to out of the loop, until you are looking after a swarm of agents rather than one.

A dark factory runs with the lights off, because nobody needs to stand on the floor. pi-dispatch brings that idea to software work: dark engineering. It runs the pi coding agent for you in the background, on your own computer or server. Agents start on their own and do the work, and a second agent can review it. Each job happens in a sealed box that is thrown away afterwards, stops at the spending limit you set, and shows up live on one web page. On a project on GitHub or GitLab, the work stops by default at a proposed change, so what ships stays a person's decision. You can explicitly allow a kind of job to land its change, subject to your project's checks and approvals.

It is free and open source. You pay your AI provider for what the agent uses, or use a subscription you already have.

Install · Open the web page · How to use it · Manage a swarm · Common worries · Words used here · For engineers

An animation of one loop of work drawn three times, one above the other, under the headline: decide how closely you watch. In the loop, you are on the track: you watch it work and step in, and a message from you crosses to the agent. Near the loop, you stand just beside it: it works alone and stops to ask when it needs you, and it waits until you answer. Out of the loop, you are far away: it starts without you, a second agent reviews it, and only the change, reviewed by AI, travels to you, and then you decide. At every stage: a spending limit, a sealed box, and the final say stays yours.

You choose this per kind of work, not once for everything.

Install in four steps

1. Have these ready. A computer or server that stays on (on a Mac or Windows machine, jobs run only while you are logged in), Docker and Node.js 22.19 or newer, and a key from an AI provider or a subscription.

2. Install it. If you already use a coding agent, let it do the terminal work with you.

With Claude Code, or another coding agent, paste this:

Install pi-dispatch for me: https://github.com/edgehero/pi-dispatch

Use the npm install steps under "By hand" in its README, in a new folder called my-dispatch in my home folder. First check that Docker is running and Node.js is 22.19 or newer, and tell me how to fix anything missing. Do not run pi-dispatch up yourself, and do not ask me for any key or password. When you are done, tell me how to run that last command in my own terminal, and what to expect.

That last command is yours to run because it asks before it starts anything on your machine, and it signs you in to the web page, which should stay out of the chat. Claude Code only does the installing: your jobs run on pi, with your own AI provider key or subscription.

With pi, run this, type /dispatch inside pi, and choose Finish setup in browser:

pi install npm:@edgehero/pi-dispatch-admin

In one command, from a new empty folder, on a Mac or Linux:

mkdir my-dispatch && cd my-dispatch
npx --yes --ignore-scripts @edgehero/[email protected] up --console

It checks the folder first, then lists what it will do and asks before it starts anything. It installs into that folder and opens your browser on the checklist, already signed in.

By hand, install into a folder that will stay there:

mkdir my-dispatch && cd my-dispatch && npm init -y
npm install --save-exact @edgehero/[email protected] @edgehero/[email protected] @earendil-works/[email protected] --omit=dev --omit=optional --ignore-scripts --no-audit --no-fund
./node_modules/.bin/pi-dispatch up --console

It asks before it starts anything, then opens your browser on the checklist, signed in. Where no browser can open (on a server you reach from another computer, say) it prints a sign in link that works for 60 seconds instead. Setup in the browser needs a Mac or Linux. On Windows, run pi-dispatch up without --console, or choose Guided setup in pi, and sign in to the console with a token.

3. Finish the checklist in your browser. The link opens a live list of what is ready and what is not: the queue, a worker, the network rules, your provider key and a first trigger. Your key goes in here, never in a chat. It offers recipes: fix an issue when it gets a label, tidy every night, or answer a comment.

The setup page: each step of a new deployment marked ready, starting, not yet or to do, with a button for the next action and recipes for a first trigger

Prefer the terminal? What pi-dispatch doctor checks

pi-dispatch doctor before the worker first starts: one line per check, four warnings with their fixes, among them that no worker on this host reports yet, and the verdict that the configuration is checked, with how to start the worker as a service

4. Bring your own pi setup, if you have one (below), and run a first job. Running it on a server for good has its own steps.

Open the web page

The web page, which the rest of this README calls the console, runs on your own machine at http://pi-dispatch.localhost:4790. Bookmark it. Once you sign in, the browser remembers you: closing it, a restart of the console or days away do not sign you out. (Signing in with a token instead, leave Remember this trusted device ticked under it.) A browser that is not remembered stays signed in for up to 12 hours, and an hour with nothing happening ends it sooner.

To sign in, or to add another browser:

| Where you are | What to do | |---|---| | In a terminal, in the folder you installed into | ./pi-dispatch console starts the page if it stopped, opens it and signs you in. Where it cannot open a browser it prints a link instead, which works once within 60 seconds | | In pi, started in that folder | /dispatch console opens the page and signs you in, while the page runs | | In another browser | ./node_modules/.bin/pi-dispatch-console link prints a link and a short code such as K7QX-9M2D. Open the link within 60 seconds, or type the code on the sign-in page within 5 minutes | | On a server | Forward a port, and make the link on the server (how) | | On Windows | One time links do not work there, so paste a token (how) |

A browser you no longer use? Remembered browsers, linked from Configuration in the console, lists every browser that stays signed in, and removes one. Signing out in a browser also forgets it.

The page does not load? The console may have stopped. ./node_modules/.bin/pi-dispatch service status --console says whether it runs, and ./node_modules/.bin/pi-dispatch service start --console starts it (everything about the console).

How to use it: from in the loop to out of the loop

Every job takes the same path. What changes, stage by stage, is how much of it needs you, and pi-dispatch never asks you to trust more than you have seen. Every screen on this page shows sample data.

An animation of one job in five steps, under the headline: you pay for AI only while the agent works. Something starts it: a schedule, an issue, or you. It waits in line, and nothing runs yet. It is checked: over a limit, it is refused. The agent works in a sealed box, and if it needs you it stops to ask. You decide on a proposed change: you accept it, not pi-dispatch. A strip under the steps shows no AI cost in the first three and the last, and AI cost only where the agent works. A job crosses the strip and it fills only there. A second job is refused at the check.

On a folder on your own machine there is no proposed change: the job edits that folder directly.

1. In the loop: watch it work and step in

You start a job and follow it live: what it is doing, which step of its plan it is on, what it said. If it heads the wrong way you tell it, and it reads your message before its next step. You do not have to start over and pay for the same work twice. (Steering, chat)

To get here: start the worker from the checklist. Give it a folder that is a git repository, with your work committed, because a job on a folder edits it directly. Then open Runs in the console and read along.

./node_modules/.bin/pi-dispatch run ./my-project --task "add type hints" --flow tidy

A flow is a short text file of instructions in your project, such as .pi/skills/tidy/SKILL.md. The examples/ folder has one to copy.

A running job in the console: its progress through the phases of its plan, the agent's note that three of ten tables are migrated, a box for sending it a message, the message it already received, and its live transcript

2. Near the loop: it comes to you when it needs you

Now it works alone, and you hear from it only when it has a question or needs permission. A job with a question stops and waits. Nothing runs and no model is paid for while it waits, and your answer picks the work up where it stopped. A gate can make it ask before a named action, and a rule you write can have an answer drafted for you to read and send. A question is the agent's own words, so your instructions decide how it asks: what it found, your options, what it recommends. (Parked questions, approval gates, answer rules)

To get here: on Triggers, add a rule: every night at three, or whenever an issue gets the label pi:fix. Turn on steer in the form, so you can also tell its jobs what to do while they work. To let a job stop and ask you, add resume and awaitInput to the rule in triggers.json, which is a job for your technical person.

A run that stopped to ask: what it found, three options with what each costs, what it recommends, and a box for your answer

3. Out of the loop: you review what comes back

Now the work starts without you: on a schedule, when someone labels an issue or comments on it, or (as a read only investigation) when an alert comes in. A second job can review a proposed change, and the first can answer what it finds, so what reaches you has already been read by an AI. That is a review, not an approval: the decision stays yours. You read the results when it suits you. Zero touch tells you how far you have come: how often runs needed a person, per project, over the last 7, 30 or 90 days. (Triggers, watching alerts, Zero touch)

A label, comment or review can also start a job in a folder on your machine. Several arriving together can become one job; more arriving while it works leave at most one follow up. Jobs sharing that folder take turns, including scheduled jobs. Your technical person sets up what runs and who may start it.

To get here: read Zero touch under Runs. It counts per project and repository, not per kind of work, with a goal of zero and a marker at 5%. When a project rarely needs you, add a job that reviews each proposed change, let it run, and read what comes back. You are out of the loop for that work, and still in charge of what ships.

An animation of three projects under the headline: step back when the numbers say you can. Zero touch shows how often runs needed a person, per project, over the last 8 weeks, with a dashed line at 5 percent. This is sample data. The rate for ops falls to 3 percent, which reads under goal. Nothing happens by itself: after a pause the words say your choice, and only then do you step from near the loop to out of the loop. The rate for web falls to 16 percent, above goal, and you stay near the loop. The rate for billing rises to 32 percent, which reads high, and you stay in the loop. Aim for zero. The dashed line at 5 percent is a guide, not permission: you decide.

Sample data. Nothing moves a project for you: the number tells you, and you decide.

The Zero touch page: how often runs needed a person, what the cause was, and which projects run without help

Out of the loop does not mean out of control. The spending limits hold with nobody watching and every job stays in its box. By default, a person still merges. You can explicitly allow a job to land its change.

Manage a swarm of agents

Once one kind of work runs without you, you can run many at once, across your projects and machines. That is dark engineering in practice, and your job changes: you stop watching an agent and start looking after a floor of them.

An animation of many agents at once, under the headline: many agents, one place to run them. New work comes from a schedule, an issue or a comment, and waits in line. Two machines hold eight boxes, each with one agent that works, asks or reviews, or open for the next job, under one budget. One page tells you how many need you and how many are running. One switch stops new work: new work waits in line, running jobs finish, and when it is switched back on the line moves again.

  • One line. Every job from every project waits its turn, and starts only when a machine has room for it.
  • One budget. Your limits hold across all of them, however many run, with a share per project if you want one
(budget split).
  • One page. What needs you, what is waiting and why, what is running and what today has cost.
  • One switch that stops new work everywhere. Jobs already running finish, and what is waiting stays in line.
  • One number. Zero touch says how often runs needed a person, per project, so you can see how far the lights have really
gone out.

The console's overview page: one question and two things to fix that need you, five jobs waiting and why, four running, 15 dollars spent of a 25 dollar daily limit, two residents running on one machine, and a timeline of every project's runs with the jobs in line after the now line

The overview: what needs you, what is waiting, what is running and what today has cost.

It looks after the swarm, and does not direct it. pi-dispatch adds no agent of its own, does not plan the work, and does not have agents talk to each other: each job works alone, in its own box. They work together in the ways you set up: a second job reviews the first, two jobs race on one issue for you to compare (replicas), or a flow plans how one budget is split across projects (portfolio manager).

Is this for you?

It works on code: a project on GitHub, GitLab, Forgejo or Azure DevOps, or a folder under git on your own machine. It fits when the same kind of software work keeps coming back and you would rather not sit through it:

  • a nightly job that tidies a code base, updates a report or sorts new issues;
  • "label an issue and a proposed fix appears", for small everyday fixes;
  • answering review comments on the changes the agent proposed;
  • several projects sharing one queue, one budget and one page.
For a one off task on your own machine, plain pi is enough.

Common worries

Do I need to be a developer? To use it day to day, mostly not: the web page is where you read what happened, answer questions, approve, add a schedule, change limits and choose what each kind of job may use, and you describe a recurring job in plain sentences. To set it up you need a terminal, and a coding agent or someone comfortable with one can do most of that for you. Now and then a setting the page does not offer needs one too. And what it hands you is code, so someone should be able to judge it before it ships.

Can it run up a bill? You set limits in dollars and in jobs, per day, week and month, for everything or per project. A job over a limit is refused before it starts, and a job with its own cap is stopped before any model call that could take it past that cap. Also set a spending limit at your AI provider, as a last line (costs, limits).

An animation of limits drawn inside one another, under the headline: a job has to fit inside every limit. Innermost, one job with its own limit, which stops before an AI call that could pass that limit. Around it one project with its own limits, around that all your jobs per day, week and month, and outermost, dashed because you set it with them, your AI provider's limit, your last line of defence. Two jobs go in and the meters rise. A job that does not fit is refused before it starts, at no AI cost.

Can it break my project? On GitHub, GitLab, Forgejo or Azure DevOps a job works on a fresh copy and comes back with a pull request for you to review, and on GitHub pi-dispatch refuses a repository whose default branch is not protected. A job on a folder on your own machine edits that folder directly, with no undo, so it refuses a folder with uncommitted changes unless you force it.

Can it reach my passwords or my other files? A job sees only its own project, inside its box, and can reach only the internet addresses you allow. Two secrets do go in, and the agent can read them: your AI provider key and your GitHub or GitLab token. That is why the provider limit above matters, and why a narrow token beats your whole login (SECURITY.md says plainly what is and is not defended).

An animation of a sealed box with the agent inside, thrown away afterwards, a fresh one for every job. Going in: your project, and instructions that are read only. Two keys go in too, and it can read them: your AI provider key and a GitHub or GitLab key. Coming out: a proposed change, and what it did and cost. It can reach only addresses you allow, and nothing else. Your other files and your other passwords stay out. The agent can read both keys, so limit what each key can do, so a leak does less harm.

What if the machine restarts or a job dies? The queue is kept on disk, so waiting jobs are still there. A job that was running is lost or started over, unless its trigger opts into continuing from its last checkpoint (durable runs).

What does it cost? pi-dispatch is free, under the MIT license. You pay your AI provider and for the machine it runs on. There is no typical figure, because a job's cost depends on your model and on the work, so start with a low daily limit and read what it spent. The console shows what each project, job type, model and day cost, and whether a subscription would pay off (insights).

Can I use a subscription I already pay for? Yes, if you set it up on purpose: ChatGPT sign in, or Claude through a community bridge (an extension that connects your subscription to pi). It never falls back to spending an API key behind your back, and the console shows how much of your subscription's limit is left. Read your provider's terms first: whether they allow this is theirs to say, not ours (subscriptions).

What if my AI provider is down, or I hit its limit? You can list fallback models in the order you prefer. A job that is rate limited, out of quota or hitting an overloaded provider tries the next model on its next attempt, and that model rests for a while before it is tried again (fallback models). With no fallback, the job waits or fails with a reason you can read, and nothing is spent on it in the meantime.

What else it does

Spend: today, this week and this month against your limits, and where the money went (insights).

The Spend page: spend against the daily, weekly and monthly limits, a chart of daily spend, and what each flow, model and project cost

Fleet: every machine and what it is doing, with one switch that stops new work everywhere (several machines).

The Fleet page: the switch that pauses everything, residents included, each running job with its progress and one that still holds a slot it should have freed, then the queues and the machines

Residents: an agent that keeps running instead of starting for each job, such as one that sorts new issues all day. It runs beside the jobs, outside their slots, with a daily budget of its own when it calls a model. Its page in the console says what it is doing, in its own words and numbers, and it can ask you a question there: your answer goes to it, and starts nothing that costs money. The switch that stops new work everywhere stops residents too (residents).

A resident's page: one line on how long it has run and what it spent today, then its own page in its words, with its numbers, two questions waiting on you (one with a button for each choice, one to approve or decline), and the issues it sorted, beside what it gets: its image, its models with their prices, what it reaches and reads, and the files it keeps

Models and fallbacks: name a job for what it needs (a planner, an editor) and choose the model per project, with fallbacks in order. The page shows which model is resting and why, and suggests a cheaper model with the numbers to compare (model roles, fallback models, canaries).

The Models page: each role with its model and its fallbacks in order, a model cooling down after a rate limit, which models are in use, and proposals with their comparisons

Your subscription's limits: how much of its five hour and seven day windows is used, and when each resets (subscriptions).

A subscription on the Models page: the account windows, how much of each is used and when it resets, and that jobs wait rather than spend beyond it

Approvals: a job can ask permission before a named action, such as spending more. It stops and costs nothing until you decide (approval gates).

An approval on the Parked page: what the job asks to do, with buttons to approve or decline with a reason, and a box to write your answer

Drafted answers: a rule you write can have the agent draft an answer to a question from sources it read. You read it, and only you send it (answer rules).

A drafted answer on the Parked page, with the sources it cites and why it was allowed to draft, beside the rule that started it

Picking up where it stopped: if a machine restarts or a job's box dies, a job that opted in continues from its last checkpoint instead of paying for everything again (durable runs).

A run that lost its first attempt and continues as a recovery job: the attempt that failed, the checkpoints it had written and the recovery job that goes on from them

Trying it yourself: reopen a finished job's workspace in a fresh box with no keys, or prepare one from scratch, and open it in your own terminal or your browser. The page says what pi can load there, which is only what the project holds (sandboxes, browser terminal).

The Sandboxes page: choose a kept workspace, see what opens and what pi can load there, and open it in your terminal, with a button for a new one

Updates: which version of pi and which extensions your jobs run, what is newer, a capped trial on a real job, and Adopt. Nothing updates by itself (updates).

The Updates page: what jobs run now, what is newer, a button to run a canary, and which version each host holds

Projects: group your repositories into a project, with its own limits, share of the budget and history, and see what its runs loaded on each machine (projects, budget split).

One project: what it has spent, its runs of the last day, what its runs loaded on each machine and where they differ, its members and its limits

A trigger: what starts it, what it has cost and what its jobs get on each machine, which you can change right there. A schedule also gets a button that fires it now (triggers).

What its jobs get, on one trigger's page, with two changes not written yet: a pill per machine saying what differs or that it is unknown, then the model, its job cap and its subscription allowance, the flow, a switch for the staged packages and one for each of your extensions, the outside systems with linear switched on, pi's own tools with bash off and a switch for each tool the newest run that says what it loaded lists, the image and secrets, what the last run had under each, and a bar with Preview the change and Discard

Your phone: every page fits, for answering a question from wherever you are. The console listens only on its own machine unless you set it up otherwise, so reaching it from a phone takes a private tunnel (from another machine).

The overview page on a phone, one column, with the questions that need you at the top

Bring your own pi setup

Already use pi? Your models, skills, persona and extensions come along, so jobs work the way your own sessions do. Run this in the folder you installed into, whenever your setup changes:

./node_modules/.bin/pi-dispatch import-pi --with-packages

then, in that folder's .env, point at the copy it made:

PI_GLOBAL_PI_DIR=/absolute/path/to/my-dispatch/pi-global ./node_modules/.bin/pi-dispatch doctor # checks that the copy holds no credential

| What comes along | What never does | |---|---| | Your custom models, as definitions only | auth.json, and any key written into a file (the import refuses it) | | Your skills and persona | Your sessions, themes and settings | | Your extensions, each listed by name as it copies them | The /dispatch extension itself, and any extension you have turned off in pi | | The packages you installed with pi install, pinned at the version you have | Anything a project asks to install: only you choose what gets installed | | Your MCP servers, with credentials as references only | Secrets of any kind: the copy is read by jobs, so it holds none |

Read the list it prints. An extension is code, and it runs in every job, beside work that may come from a stranger's issue text. Skip extensions with --no-extensions. To keep all your packages, or one package or extension, out of one trigger's jobs, use the switches on that trigger's page ("packages": false and "excludeExtensions" in the triggers file).

Your projects still win. A job layers your setup under the project's own .pi/ folder, so a project's skill replaces yours of the same name, and a small safety floor sits under both, which neither can remove. To add a language or a system tool rather than a pi setting, build your own job image. The details are in docs/global-pi-overlay.md, and each run says what it really got (What a job gets).

What a job gets

A job starts with four things: your setup on the machine it runs on, what the repository holds, what its trigger says, and the box it runs in. Each changes on its own: one machine misses an update, or someone removes a skill from the repository. So two jobs of one trigger can start differently.

A job that starts keeps a list of what it had: the version of pi, the model, its extra instructions, its skills, its extensions, the outside systems (MCP servers) it connected to, and its tools. The run's page shows that list and says plainly when something is missing, so you can check a job you did not watch before you accept its work.

The Loaded card of a finished run that had no flow: it says so at the top, with buttons to where it is fixed, then pi, the model, extensions, skills, outside systems and tools, one line each

A clean finish can still be missing something: a job that finishes without its instructions reads **Completed, without its flow, and one with an extension that failed to load reads Completed, with a failed extension**. The Runs list says the same, so it does not read as fine. A project's page says when its runs differ from machine to machine.

What the list holds: the names of what you set up, the tools those brought, and how many of everything else. It keeps no text from an issue, which a stranger may have written, and a repository's own skills and extensions are only counted: to see them, open the repository. A run that ended before it could report, or one from an older release, says its list was not recorded (what the card can say, and what to do).

You can change what a trigger's jobs get from its page. The further out of the loop you go, the more this matters, because it is how you decide what a job may use without watching it. Its What its jobs get card has a line for each thing: the model and the most one job may spend (its job cap), the flow, your packages, the outside systems, the tools. Each machine gets a label saying whether its jobs would start with the same things as on your other machines, and one that has not told the console what it has is marked unknown, so silence never passes for a match. Under each line is what a recent run really had, so a setting and what it did sit together. Nothing is saved while you click: your changes collect at the foot of the card, and you can discard them.

You can turn off one thing and keep the rest. On a trigger's page you can turn off one of your packages or extensions for that trigger's jobs alone, and those jobs no longer load it. You can also turn off a tool one of them adds: the tool is gone, and the rest of that extension still runs. A tool has a switch while the newest run that says what it loaded lists it, or while your triggers file names it.

This limits what a job starts with, not what its agent can do next. An agent that can run commands, write files or edit files can bring back what you turned off. If code must not run in a trigger's jobs, also turn off the tools that do those things: bash and powershell run commands, write writes files and edit edits them (what this does not stop).

Every running machine must run a release that can read these settings. The upgrade notes say which release, and what to do until then.

You see it in words first, and confirm once. Preview the change says each change in a sentence, and says so when it gives jobs more than they had. It says when the change takes effect and which jobs already in line would be refused, warns about what would stop these jobs on the machine the console runs on, and says how to undo it. One Confirm saves it, the console records who did, and Undo puts it back, or says what to edit by hand where it cannot.

The preview of that change, in words: linear on and where its jobs would now connect, bash off, when the change takes effect, a waiting job that would now be refused, that a job on a machine without linear is refused and which machines have it, who it is recorded under, the lines of the file as they would change, the way to undo it, and one Confirm button

Some changes that would only fail later are refused before they cost you anything. A job cap can only lower the limit you set for all jobs. If a trigger's model is too expensive for even one request under its cap, the page refuses the change and names the amount a short task needs, rather than letting a job start and fail. If the page is out of date, it asks you to reload rather than write over someone else's change.

Some of this only a person sets. The commands pi-dispatch gives an AI cannot set a trigger's job cap, its subscription allowance, the list of models its jobs may use, its fallback models, random model pools, its outside systems, which tools its jobs lose (pi's own or those your extensions add), whether they load your packages, or which of your packages and extensions they leave out. A command that tries is refused, and you are never asked to confirm it. You set those on the page, or your technical person sets them in the triggers file (what the card can say, and what it refuses). Those commands can still move a trigger's flow, provider and model, and only after you confirm.

Words used here

| Word | What it means | |---|---| | Agent | A program that uses an AI model to read code, change it and run it | | Swarm | Many agents working at the same time, each on its own job | | Token | A password-like key: one signs you in to the console, and another lets a job reach your code | | .env | A small settings file in the folder you installed into | | Dark engineering | Software work that runs with nobody watching it, the way a dark factory runs with the lights off | | pi | The open source coding agent that does the work here. pi-dispatch runs it, and adds no agent of its own | | Job, or run | One piece of work, from start to finish | | Trigger | A rule for what starts a job: a schedule, a label, a comment | | Triggers file | triggers.json, the file on a machine that holds your triggers. The console edits it for you | | Flow | A short text file in your project with the standing instructions for a kind of job | | Skill | A short text file that teaches the agent one kind of task. A job's flow is one of them | | Extension | An add-on for pi, which can give the agent new tools | | Overlay | The console's word for your setup on one machine, which jobs there start with | | Host | The console's word for a machine that runs jobs | | MCP server | An outside system a job can connect to | | Package | An add-on you installed with pi install, which can bring extensions, skills and tools | | Tool | One thing the agent can do, such as read a file | | Container | The sealed box a job runs in, thrown away afterwards | | Forge | The place your code lives: GitHub, GitLab, Forgejo or Azure DevOps | | Repository | A project's code and its history, on a forge or in a folder (a "git repository") | | Base commit | The version of a repository a job started from | | Staged | Set up on a machine, ready for its jobs to load | | Job cap | The most one job may spend, in dollars. A trigger can only lower the limit you set for all jobs | | Fallback model | The model a job tries on its next attempt when the one before it is rate limited or out of quota | | Doctor | pi-dispatch's own check of a machine's setup, which also says what that machine's jobs can load | | Pull request | A proposed change to a repository, for a person to review | | Merge | Accepting a pull request into the project. pi-dispatch never does this | | Issue, label | A note about work to do on a forge, and a tag you can put on it | | Worker | The part of pi-dispatch that takes jobs from the queue and runs them | | Terminal | The window where a developer types commands | | Provider key | The password-like key your AI provider gives you, which pays for what the agent uses | | Console | The web page shown here | | Panel | The same information inside pi, as /dispatch |

For engineers

Everything above in the terms you would run it by. pi has no job queue, no concurrency control, no spend limit and, by its own README, no permission system. pi-dispatch adds exactly that layer and nothing else. It is not another agent to compare with the one you use: it is the queue, the budget and the box around the pi you already run, steered by the .pi/ setup your repo already has.

Naming heads up. The published packages are scoped: @edgehero/pi-dispatch (the pi-dispatch command). The bare npm
name pi-dispatch belongs to an unrelated package (see License), so outside a checkout always use the scoped
name.

Where it can run

pi-dispatch is a long running worker that starts containers, so it runs on a machine where it can do both: Node 22.19 or newer beside a container runtime, on the same host.

| Where | Works? | |---|---| | A Linux server or VM you control (a VPS, a cloud VM, a home server) | Yes. The main target. Run the worker as a service (Run as a service). | | Your own Mac or Windows machine with Docker Desktop | Yes, while you are logged in, because Docker Desktop is. | | Several machines sharing one queue | Yes (docs/multi-host.md). | | Serverless and app platforms (Vercel functions, Netlify, Cloudflare Workers, a PaaS without a container runtime) | No. There is no container runtime to start jobs in, and nowhere for a worker that never stops. | | Hosted sandbox services as the place jobs run (Vercel Sandbox, E2B, Modal, Daytona and similar) | Not yet. A new venue needs an adapter, and docs/backends.md is the contract it would implement. | | A Docker or Podman daemon on another machine (DOCKER_HOST=ssh://...) | No. Job files are mounted from the worker's own disk, which that machine does not have, and it would receive every job's provider key and forge token. |

Only the receiver needs to be reachable from the internet, and only for webhooks. Behind a firewall, use the receiver's poll mode instead, which needs no public URL (docs/polling.md).

  • local, the default: the Docker daemon, or rootful Podman through its Docker API. Easiest to set up, and the only
choice on macOS and Windows. The worker needs the daemon's socket, and that access is equivalent to root on the host.
  • podman: rootless Podman as the worker's own account, on Linux. No daemon runs as root, each job runs as the
worker's own uid, and Valkey, the egress proxy and the worker run as systemd user units. Pick it for a shared or security sensitive server (docs/podman.md).
  • openshell: one NVIDIA OpenShell sandbox per job on a gateway on this host, in copy mode, so nothing of the job is
mounted into the sandbox. The gateway's policy is the egress control, so no egress proxy starts. A provider made for each job holds its secrets, one per endpoint, so the agent sees placeholders rather than the values, with no secrets manager needed. openshell-bind runs the same policy with the job's folders bind mounted. pi-dispatch doctor --openshell checks the gateway first, and both up and service install set it up. Pinned to OpenShell 0.1.4, since its interfaces are marked experimental.

Each job gets the memory and CPUs its project's row sets (4 GB and 2 CPUs by default), and starts only when its size fits beside what already runs on that machine (docs/sizing.md).

Set up a host

A machine that runs jobs for good, rather than while you watch. As an ordinary account, not root, with Docker or rootless Podman and Node 22.19 or newer installed, install into a folder that stays (step 2 of Install), then:

./node_modules/.bin/pi-dispatch up --console     # lists each action and asks first: job image, Valkey, egress proxy, config, the console's service
./node_modules/.bin/pi-dispatch doctor --live    # checks the setup and reads its isolation back from real containers
./node_modules/.bin/pi-dispatch service install  # keeps the worker running, restarted at boot
sudo loginctl enable-linger "$USER"              # on Linux: user services start with no one logged in

Reach the console from your own machine. It listens on the host's loopback only. Forward a port, and make a sign in link for that port on the host (more):

ssh -L 4790:127.0.0.1:4790 yourhost              # on your own machine; then, on the host:
./node_modules/.bin/pi-dispatch-console link --name operator --port 4790

Connect a forge. pi-dispatch setup github --webhook-url '' creates a GitHub App in one browser click, or --no-webhook if the host has no public address, and pi-dispatch service install --receiver keeps the receiver running. GitLab, Forgejo and Azure DevOps have a setup page each.

Before it runs unattended:

  • Set a spend limit at your provider, and caps her
... (README truncated for length)
Chat with me