ai-agentmanager 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +58 -3
- package/docs/architecture.md +1 -0
- package/package.json +1 -1
- package/public/app.js +398 -7
- package/public/index.html +90 -0
- package/public/style.css +42 -1
- package/src/cleanup.js +185 -0
- package/src/cli.js +164 -0
- package/src/config.js +4 -0
- package/src/engines/antigravity.js +1 -1
- package/src/engines/claude.js +8 -5
- package/src/engines/codex.js +1 -1
- package/src/manager.js +39 -8
- package/src/server.js +44 -2
- package/src/teams.js +984 -0
- package/src/tracker.js +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.0 (2026-10-30)
|
|
4
|
+
|
|
5
|
+
- **Teams:** give one problem to a team of agents in roles. An analyst writes the analysis and critics challenge it until they agree; an implementer builds it, a tester tests it, and a reviewer approves it or sends it back to the implementer. They hand off through files with a verdict line, which you can read in the team view. The team asks you only at the end (open a PR, keep the branch, or send it back) or when they can't agree within the round limits. **+ New agents → Team**, or `agentmgr team start`.
|
|
6
|
+
- **One lead session by default:** a team is one agent whose Claude Code sub-agents play the roles, so your list shows one agent instead of five. **Separate agents** (one per role, any engine) is still available: the form's "How the team runs", or `--separate`.
|
|
7
|
+
- **The lead decides:** it runs a whole request without asking you between steps, records its decisions in the handoff files, and stops only when the reviewer approves or it needs something only you can give. Sub-agents return their work as text and the lead saves it (Claude Code doesn't let sub-agents write report files).
|
|
8
|
+
- **The lead stays:** after a request is done, ask the lead for more in its terminal (or **New request** in the team view, `agentmgr team ask`), and it runs the same team flow again as the next quest. Earlier quests stay in the team view.
|
|
9
|
+
- **Gap rounds:** the reviewer also checks the work against the whole request and lists what isn't built yet. When good work still has gaps, the team shows them to you and asks: **Run a gap round** (`agentmgr team fix-gaps`) builds them in another round, from analysis to review. To let it run some rounds without asking: **Gap rounds without asking** in the form, `--gap-rounds`, `teams.gapRounds`. The form also sets the analysis and build round limits.
|
|
10
|
+
- **Clean up old agents:** close agents with no activity for a while (14 days by default) and delete ones that stayed closed long after that (14 more days), with their worktrees. Pick the strategy in **Clean up** (top bar) or `agentmgr cleanup --strategy`: close then delete automatically, close automatically and delete when you say (the default), manual, or off. Agents marked **Keep**, working agents, members of a running team, and agents with an open pull request or work found only in their worktree are left alone.
|
|
11
|
+
- **Only recent agents:** **Created in the last N days** above the agent list hides older agents (the open one stays). The list says how many it hides, with **Show all**. Remembered in this browser.
|
|
12
|
+
- **Agent counts per project:** each project in the list shows how many agents it has ("2 of 5 agents" while some are hidden), and how many are running.
|
|
13
|
+
- **Jira names:** an agent whose request starts with a Jira link is named after the issue (`OPS-7`), not the link.
|
|
14
|
+
- **Teams on a new project:** with no repository or folder, a team starts a new project: a folder with a git repository and an empty first commit, so it still gets its own branch. At the end, merge the branch into the local `main`, publish to a new private GitHub repository with a pull request, or keep the branch.
|
|
15
|
+
|
|
3
16
|
## 1.0.2 (2026-10-28)
|
|
4
17
|
|
|
5
18
|
- **Resize and expand:** drag the edge of the agent list, or the line between the brief and the terminal; double-click a line to reset it. **Expand** (Ctrl+Shift+E) fills the window with the terminal, shell or browser tab, and **Full screen** fills the screen.
|
package/README.md
CHANGED
|
@@ -53,6 +53,7 @@ New in 0.2, for running many agents at once:
|
|
|
53
53
|
- **Stuck detection.** Spots an agent going in circles (the same failure again and again, undoing its own edits, a long stretch with no file changed) and offers a ready-made nudge to send.
|
|
54
54
|
- **AI judge.** Rules only decide *when* to look; a fast model decides *what is going on*: whether a stuck-looking agent is really stuck (and a nudge specific to its problem), what an idle agent is asking when no known prompt matched, whether "done" work actually meets the intent, whether two agents' work will collide, what the backlog should start next, and which alerts are worth interrupting you for. It learns from how you react.
|
|
55
55
|
- **Checkpoints and forks.** The code (uncommitted work included) and the conversation are saved at the end of every turn. **Fork** starts a new agent from now or from any checkpoint, in its own worktree, to try another direction without losing the first.
|
|
56
|
+
- **Teams.** Give one problem to a team of agents in roles: an analyst writes the analysis, critics challenge it until they agree, then an implementer builds it, a tester tests it and a reviewer approves it or sends it back. You step in at the end, or when they can't agree.
|
|
56
57
|
- **Races.** Send one intent to several agents with different models or approaches. Compare their outcome, checks, size of change, cost and a test command run in each worktree, read their diffs side by side, then pick a winner and delete the rest.
|
|
57
58
|
|
|
58
59
|
## When to use it
|
|
@@ -75,13 +76,13 @@ Runs on macOS and Linux; on Windows, use WSL2. Requires Node 20+, `git`, and the
|
|
|
75
76
|
|
|
76
77
|
```sh
|
|
77
78
|
npm install -g ai-agentmanager # the latest release
|
|
78
|
-
npm install -g ai-agentmanager@1.0
|
|
79
|
+
npm install -g ai-agentmanager@1.1.0 # or a specific one
|
|
79
80
|
```
|
|
80
81
|
|
|
81
82
|
Or from the repository, at a release tag:
|
|
82
83
|
|
|
83
84
|
```sh
|
|
84
|
-
git clone --branch v1.0
|
|
85
|
+
git clone --branch v1.1.0 --depth 1 https://github.com/jdmunta/ai-agentmanager-core.git
|
|
85
86
|
cd ai-agentmanager-core
|
|
86
87
|
npm install
|
|
87
88
|
npm link # optional: puts `agentmgr` on your PATH
|
|
@@ -101,7 +102,7 @@ npm link
|
|
|
101
102
|
| Installed with | Update |
|
|
102
103
|
| --- | --- |
|
|
103
104
|
| npm | `npm install -g ai-agentmanager@latest` |
|
|
104
|
-
| A clone at a release tag | `git fetch --tags && git checkout v1.0
|
|
105
|
+
| A clone at a release tag | `git fetch --tags && git checkout v1.1.0 && npm install` (the tag you want) |
|
|
105
106
|
| A clone of `main` | `git pull && npm install` |
|
|
106
107
|
|
|
107
108
|
**Check your setup.** `agentmgr doctor` checks Node.js, Claude Code and its sign-in, git, `gh`, the data folder, the daemon's port and Chrome, and says how to fix anything missing.
|
|
@@ -171,6 +172,8 @@ agentmgr answer <agent> <question-id> "…" # answer a question from the inb
|
|
|
171
172
|
agentmgr tell <agent> "…" # send a message into the session (when it's idle)
|
|
172
173
|
agentmgr fork <agent> [-c 3] [-m "…"] # new agent from now (or checkpoint 3), its own worktree
|
|
173
174
|
agentmgr checkpoints <agent> # snapshots saved at the end of each turn
|
|
175
|
+
agentmgr team start "problem" [-r <repo> | -d <folder>] [-c 2] [--separate] [-t "npm test"] [--role-model reviewer=opus]
|
|
176
|
+
agentmgr team show [team] | ask <team> "…" | finalize <team> [--merge | --publish | --keep] | send-back <team> "…" | continue <team> ["note"] | skip <team> | stop <team>
|
|
174
177
|
agentmgr race start "intent" -v opus -v "sonnet|keep it small" -r <repo> -t "npm test"
|
|
175
178
|
agentmgr race show [race] | test <race> | pick <race> <agent> [--cleanup]
|
|
176
179
|
agentmgr flush # save session IDs, scrollback, usage and state now
|
|
@@ -537,6 +540,35 @@ At the end of each turn, AI Agent Manager snapshots the agent's working tree as
|
|
|
537
540
|
|
|
538
541
|
The source agent keeps running untouched.
|
|
539
542
|
|
|
543
|
+
## Teams
|
|
544
|
+
|
|
545
|
+
**+ New agents → Team** (or `agentmgr team start`) gives one problem to a team. By default the team is **one lead session**: one agent in your list, with one terminal, whose sub-agents (Claude Code's `--agents`) play the roles. The lead runs the steps and delegates each one to the right sub-agent. **Separate agents** (`--separate`) gives each role an agent of its own instead, with its own terminal, model and engine (for example a reviewer on Codex), and AI Agent Manager hands the work from one to the next.
|
|
546
|
+
|
|
547
|
+
```
|
|
548
|
+
Analyze ──► Discuss ──► Implement ──► Test ──► Review ──► you: PR, keep, or send back
|
|
549
|
+
analyst critics implementer tester reviewer
|
|
550
|
+
agree / changes / questions ▲ fail │ changes
|
|
551
|
+
(up to 3 rounds) └─────────┴─ (up to 3 rounds)
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
- **Analyst** studies the problem and the code and writes the analysis: findings, approach, files, risks, how to test. It doesn't change code.
|
|
555
|
+
- **Critics** (0–2, default 1) challenge the analysis, marking points *must*, *should* or *question*. The analyst answers every point, changing the analysis or saying why not, until the critics agree.
|
|
556
|
+
- **Implementer** builds the agreed analysis and commits on the team's branch.
|
|
557
|
+
- **Tester** runs the tests and tries the change; it may add tests, but failures go back to the implementer.
|
|
558
|
+
- **Reviewer** reviews the diff against the analysis and the test report, and approves it or sends it back. It also checks coverage: what the request asks for that isn't built yet goes in its review's **Gaps** section, with a `coverage: complete` or `coverage: partial` line.
|
|
559
|
+
|
|
560
|
+
**Gap rounds.** A big request rarely gets built in one pass. When the reviewer approves good work but lists gaps, the team stops and shows you the gaps. **Run a gap round** (`agentmgr team fix-gaps <team> ["note"]`) starts the next quest (`quest-2/`, …), from a new analysis, for just what is missing, on the same branch; or take the work as it is. You can run a gap round after merging too. Each round shows up under **Earlier requests**. To let the team run some gap rounds without asking, set **Gap rounds without asking** in the form (`--gap-rounds 2`); it asks you once those are used up.
|
|
561
|
+
|
|
562
|
+
Either way, the roles hand off through Markdown files in the team's folder (`~/.agentmanager/teams/<id>/`: `analysis-1.md`, `critique-1-1.md`, `test-1.md`, `review-1.md`, …), each ending with a `verdict:` line. AI Agent Manager reads each verdict to show where the team stands, and you can read every handoff in the team view. With separate agents it also tells the next agent what to read. The team works in one worktree and branch.
|
|
563
|
+
|
|
564
|
+
**You step in only at the end:** when the reviewer approves, the team shows up in your inbox. **Open a pull request** (the implementer pushes and opens it), **Keep the branch**, or **Send back** with what to change (it goes through test and review again).
|
|
565
|
+
|
|
566
|
+
**The lead stays.** When a quest ends, the lead keeps its session. Ask it for more work in its terminal (or in the team view's **New request**, or `agentmgr team ask <team> "…"`), and it runs that request through the team as the next quest, on the same branch, with its own folder (`quest-2/`, …) and its own stop for you at the end. A question about the work just gets an answer. Earlier quests and their handoffs stay in the team view.
|
|
567
|
+
|
|
568
|
+
**A new project, with no repository yet:** leave the repository and folder empty (or give a folder that doesn't exist yet). The team creates the folder (under `~/.agentmanager/projects/` by default; `teams.newProjectsDir` in config.json), starts a git repository with an empty first commit on `main`, and works on its own branch. At the end you choose **Merge into main** (a fast-forward of the local `main`), **Publish to GitHub** (the implementer creates a private repository with `gh`, pushes, and opens a pull request), or **Keep the branch**. If the analyst and the critics don't agree within 3 rounds, or the tester and reviewer still send the work back after 3, the team stops and asks you: one more round (with a note), or move on.
|
|
569
|
+
|
|
570
|
+
**Cost:** a team is up to six sessions on one problem, so expect several times the tokens of a single agent. Pick the model per role, for example a stronger model for the analyst and the reviewer: `analyst=opus reviewer=opus` in the form, or `--role-model` on the command line. Defaults go in config.json under `teams`: `critics`, `maxRounds`, `maxLoops`, `gapRounds`, `models`, `engines` (a critic or reviewer on another engine sees different things).
|
|
571
|
+
|
|
540
572
|
## Races
|
|
541
573
|
|
|
542
574
|
**+ New agents → Race variants** (or `agentmgr race start`) creates one agent per variant. Each runs in its own worktree. A variant is a model, an approach, or both: `opus`, `sonnet | keep the change minimal`, `| use a cache`. **Compare** opens the scoreboard:
|
|
@@ -689,6 +721,27 @@ agentmgr leave # the hub forgets this Mac
|
|
|
689
721
|
|
|
690
722
|
**On Railway.** `hub/Dockerfile` builds the hub alone, with no node-pty and no Claude. Set `RAILWAY_DOCKERFILE_PATH=hub/Dockerfile`, `AGENTMGR_HUB_TOKEN`, `AGENTMGR_HUB_URL` (its https address) and, for Google sign-in, the three variables above; add a volume at `/data` so enrollments survive redeploys, and join with the `https://…up.railway.app` address.
|
|
691
723
|
|
|
724
|
+
## Cleaning up old agents
|
|
725
|
+
|
|
726
|
+
Agents you no longer use keep a session open and a worktree on disk. **Clean up** (in the top bar, or `agentmgr cleanup`) closes agents with no activity for a while and deletes agents that stayed closed long after that. Pick a strategy:
|
|
727
|
+
|
|
728
|
+
| Strategy | What happens on its own (checked every few hours) |
|
|
729
|
+
|---|---|
|
|
730
|
+
| **Close, then delete** (`close-delete`) | Closes agents idle 14 days, and deletes agents closed for 14 more days. |
|
|
731
|
+
| **Close; delete when I say** (`close`, the default) | Closes idle agents. Deleting waits for **Close and delete due now** or `agentmgr cleanup --run`. |
|
|
732
|
+
| **Manual** (`manual`) | Nothing. Run it when you want. |
|
|
733
|
+
| **Off** (`off`) | Nothing. |
|
|
734
|
+
|
|
735
|
+
Both numbers of days are adjustable. Closing ends the session; resume the agent any time. Deleting removes the agent from your list along with the worktree AI Agent Manager created (Claude's own transcripts stay in `~/.claude`). Clean up never touches an agent marked **Keep** (the button on an agent), one that is working or still setting up, or a member of a team that is still going. It doesn't delete an agent with an open pull request, uncommitted changes, or commits that aren't on any other branch or remote: merge or push the work first. The dialog lists what is due, what is left alone and why, and the last run.
|
|
736
|
+
|
|
737
|
+
```bash
|
|
738
|
+
agentmgr cleanup # what is due, and what is left alone
|
|
739
|
+
agentmgr cleanup --run # close and delete what is due now (--close-only: just close)
|
|
740
|
+
agentmgr cleanup --strategy close-delete --close-after 14 --delete-after 14
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
Agents closed before clean up was turned on count as closed from the first check, so nothing is deleted the day you turn it on.
|
|
744
|
+
|
|
692
745
|
## Saving state: flush and restart
|
|
693
746
|
|
|
694
747
|
- **What's saved immediately.** Agent records (session IDs, settings, links) are written to `state.json` on every change, fsynced, then atomically replaced. Claude writes each conversation to its own transcript as it goes.
|
|
@@ -746,9 +799,11 @@ State lives in `~/.agentmanager/` (`state.json`, `daemon.log`, `repos/` for shar
|
|
|
746
799
|
"inbox": true,
|
|
747
800
|
"maxCheckpoints": 40,
|
|
748
801
|
"raceTestTimeoutSec": 900,
|
|
802
|
+
"teams": { "mode": "lead", "critics": 1, "maxRounds": 3, "maxLoops": 3, "gapRounds": 0, "newProjectsDir": "~/projects", "models": { "analyst": "opus", "reviewer": "opus" } },
|
|
749
803
|
"conflictRefreshSec": 60,
|
|
750
804
|
"stuck": { "repeatFailures": 3, "thrashReverts": 2, "thrashEdits": 10, "driftMinutes": 20, "driftActions": 25 },
|
|
751
805
|
"judge": { "enabled": true, "model": "haiku", "dailyCalls": 300 },
|
|
806
|
+
"cleanup": { "strategy": "close", "closeAfterDays": 14, "deleteAfterDays": 14 },
|
|
752
807
|
"hub": { "allow": ["view"], "projects": ["*"] }
|
|
753
808
|
}
|
|
754
809
|
```
|
package/docs/architecture.md
CHANGED
|
@@ -27,6 +27,7 @@ No build step: Node ES modules on the server, plain ES modules in the browser. S
|
|
|
27
27
|
| `src/inbox.js`, `src/stuck.js`, `src/conflicts.js` | The decision inbox (prompts and questions), stuck detection and the conflict radar: the rules that decide *when* to look. |
|
|
28
28
|
| `src/judge.js` | The AI judge: one-shot, tool-less model calls that decide *what is going on* (stuck, waiting, done, collisions, backlog order, alert triage), with a daily cap and feedback examples. Falls back to the rules. |
|
|
29
29
|
| `src/backlog.js`, `src/races.js` | Work orders picked up per project; several agents on one intent, compared. |
|
|
30
|
+
| `src/teams.js` | Agents in roles on one problem: handoff files with a verdict line move the team from analysis to review. |
|
|
30
31
|
| `src/notify.js` | Slack alerts, triaged by the judge. |
|
|
31
32
|
| `src/preview.js`, `src/livebrowser.js` | Browser tabs: HTTPS relays for remote devices, and a headless Chrome streamed over the Chrome DevTools Protocol (frames, input, sound). |
|
|
32
33
|
| `src/sessions.js` | Finds Claude Code sessions started in a terminal so they can be continued as agents. |
|
package/package.json
CHANGED