pi-agent-foreman
Pi extension that sends agents back to work when they stop early, using six Jev questions to decide if continuation is warranted.
Overview
Pi Agent Foreman targets a common failure: an agent says it will continue and then ends its turn. For replies with visible text, it first checks whether the latest user request contains an explicit command to do work; a question alone never activates it. After a direct command, it checks the final assistant reply against that request and bounded recent activity, asking six questions in one classifier request (default typesafe/jev-latest). Only an announced next action or explicitly unfinished work within the request can trigger continuation; blocking signals prevent intervention.
When continuation is allowed, a separate Pi agent writes a specific instruction within the user's scope. Empty replies are resumed directly without a classifier. Decisions are logged with all six probabilities. The README is clear about privacy: the request, reply and bounded activity, which may contain private data, are sent to the classifier and writer, but private thinking and earlier messages are not. It requires Pi 1.0.0+.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Does the latest user request contain an explicit command to do work? | yes · no |
| Yes / no | Does the final reply announce a next action it did not take? | yes · no |
| Yes / no | Does the reply report explicitly unfinished work within the request? | yes · no |
How it works
- After a run settles, check the user request for a work command.
- If present, ask six reply questions in one request.
- If signals allow and none block, a writer agent drafts a continuation instruction.
- Log decisions; resume empty replies directly.
Strengths
- Avoids nagging on questions or finished work.
- Six signals in one request.
- Transparent decision log.
Caveats
- Sends request, reply and activity excerpts to the classifier.
- Persistent errors can cause repeated retries until stopped.
Getting started
pi install npm:pi-agent-foreman, then run /agent-foreman to configure.At a glance
- Type
- Project
- Status
- beta
- Language
- TypeScript
- Runtime
- Pi extension
- Has code
- yes
Use cases and integrations
How curated lists describe it
Send Pi agents back to work when they stop before the job is done.
hellogumbo/awesome-jev
Frequently asked questions
When does Foreman intervene?
Only after an explicit work command, when the reply announces a next action or unfinished work and no blocking signal fires.
Which classifier does it use?
typesafe/jev-latest by default; another can be selected in Pi.
What data is sent?
The latest request, final reply and bounded activity; not private thinking or earlier messages.
Related projects
Pi extension that audits whether the rpiv-todo board matches visible work and nudges the agent when it drifts off-task.
PluginbetaTypeScriptMulti-agent Codex factory: Jev decides task shape, decomposition and routing, and failures are classified, not blindly retried.
ProjectprototypePythonSoftware-factory supervisor where Jev independently judges coding agents' completion, test sufficiency, progress and need for a human.
ProjectbetaPythonOh My Pi coding agent (a Pi fork with IDE wiring) with an optional TypeSafe judgment provider for bounded decisions.
ProjectproductionRustMCP server giving coding agents fast typed decisions (ship gates, risk checks, file triage, page checks) as accept, review or escalate.
MCP serverbetaTypeScriptAgent plugin that asks Jev whether the session is at a safe boundary to /compact and can trigger it on Pi and Claude Code.
PluginbetaTypeScript