@zhixuan92/multi-model-agent 5.0.0 → 5.0.2
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/LICENSE +21 -0
- package/README.md +316 -0
- package/package.json +29 -10
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Zhang Zhixuan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
# @zhixuan92/multi-model-agent
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@zhixuan92/multi-model-agent)
|
|
4
|
+
|
|
5
|
+
**The horizontal harness for AI engineering** — a local HTTP daemon that routes the right agent to the right task, gets it done right with **cross-agent review**, and caps spend with **bounded execution**. One process serves Claude Code, Codex CLI, Gemini CLI, and Cursor via installable skills; bring your own keys.
|
|
6
|
+
|
|
7
|
+
**The bet:** a reviewed multi-agent harness matches or beats a single frontier model, at a fraction of the cost. **Models go deep; we connect them wide** — and the engineer always keeps the judgment.
|
|
8
|
+
|
|
9
|
+
*Renamed from `@zhixuan92/multi-model-agent-mcp` in 3.0.0 — the package no longer uses MCP. North star: [DIRECTION.md](https://github.com/zhixuan312/multi-model-agent/blob/master/DIRECTION.md). See [CHANGELOG](https://github.com/zhixuan312/multi-model-agent/blob/master/CHANGELOG.md).*
|
|
10
|
+
|
|
11
|
+
## Why
|
|
12
|
+
|
|
13
|
+
Your flagship model reasoning about architecture is money well spent. That same model grepping files, writing boilerplate, and running tests is waste.
|
|
14
|
+
|
|
15
|
+
| Project | MMA — MiniMax-M3 | MMA — DeepSeek V4 Pro | Flagship: Claude Opus 4.8 |
|
|
16
|
+
|---|---|---|---|
|
|
17
|
+
| Feature impl (30 files, ~50 tasks) | **$1.50** · **33× ROI** · ~35 min | **~$2.50** · **20× ROI** · ~15 min | $50 · 1× · *baseline* |
|
|
18
|
+
| Full web SPA (59 tasks) | **$5.65** · **12× ROI** · ~50 min | **~$9** · **7.5× ROI** · ~22 min | $68 · 1× · *baseline* |
|
|
19
|
+
| Backend microservice (91 tasks) | **$8.21** · **13× ROI** · ~1.5 hrs | **~$14** · **7.5× ROI** · ~40 min | $104 · 1× · *baseline* |
|
|
20
|
+
|
|
21
|
+
Plus structural quality: implementation and review run on **different** model families — different blind spots, catches what self-review can't.
|
|
22
|
+
|
|
23
|
+
## How it works
|
|
24
|
+
|
|
25
|
+
- **Three layers.** Your own agent keeps the judgment on top; beneath it sit two labor slots you configure — `complex` and `standard` (labor *categories*, not fixed intelligence tiers).
|
|
26
|
+
- **AIDLC + rods.** Each tool is a *rod* — a gate over one stage of the AI Development Life Cycle: `investigate` / `research` feed the front, `audit` gates the spec and plan, `delegate` / `execute-plan` build, `review` / `debug` guard the output, `retry` closes the loop, `journal` remembers. The harness instruments the lifecycle; the engineer authors it.
|
|
27
|
+
- **Reviewed by default.** Write tasks run implement → spec review → quality review → rework with implementer and reviewer on **different agents**; read-only rods return findings and skip review.
|
|
28
|
+
- **Built on the providers' own runtimes.** Claude work runs through the **Claude Agent SDK**, OpenAI/Codex work through the official **Codex CLI** — when a provider deepens its runtime the harness gets better for free, and a Claude Code task can run on Codex underneath (or vice versa).
|
|
29
|
+
|
|
30
|
+
## Initial setup
|
|
31
|
+
|
|
32
|
+
Four steps, in order.
|
|
33
|
+
|
|
34
|
+
### 1. Install CLI + skills
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm i -g @zhixuan92/multi-model-agent # standalone binary (Bun embedded) — npm uses Node ≥18 only to install; the daemon needs no Node/Bun
|
|
38
|
+
mmagent sync-skills # auto-detect all clients (idempotent install + update)
|
|
39
|
+
# or pin a specific target:
|
|
40
|
+
mmagent sync-skills --target=claude-code # claude-code | gemini-cli | codex-cli | cursor
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
| Client | Install location | Loaded |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| Claude Code | `~/.claude/skills/` | next session |
|
|
46
|
+
| Gemini CLI | Gemini CLI skill directory | next session (requires version with external-skill support) |
|
|
47
|
+
| Codex CLI | `~/.codex/skills/` | next session |
|
|
48
|
+
| Cursor | Cursor extension manifest | restart Cursor |
|
|
49
|
+
|
|
50
|
+
### 2. Choose your main model — intentionally
|
|
51
|
+
|
|
52
|
+
Your **main model** is **the model you'd use without mmagent** — the cost baseline for every per-task headline (`$X actual / $Y saved vs <mainModel> (Z× ROI)`).
|
|
53
|
+
|
|
54
|
+
- Heavy Claude Code user → `claude-opus-4-8`
|
|
55
|
+
- ChatGPT-led workflow → `gpt-5.5`
|
|
56
|
+
- Gemini-led workflow → `gemini-3.1-pro`
|
|
57
|
+
|
|
58
|
+
Both `X-MMA-Client` and `X-MMA-Main-Model` are required on tool routes (`400 client_required` / `400 main_model_required` if missing). The 4.3.0 auto-detect chain was reverted in 4.4.0 — the claude-agent-sdk used by claude-tier workers wrote JSONL files into the same `~/.claude/projects/<slug>/` the resolver was reading, so auto-detect could return a worker's model as the calling agent's "main". The calling client is the only reliable source.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
export MMAGENT_CLIENT=claude-code # or codex-cli, gemini-cli, cursor
|
|
62
|
+
export MMAGENT_MAIN_MODEL=claude-opus-4-8 # whatever your calling agent runs on
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 3. Write the config
|
|
66
|
+
|
|
67
|
+
Paste this into your shell — it creates `~/.multi-model/config.json` with the minimum-viable starter config (overwrites any existing file at that path):
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
mkdir -p ~/.multi-model && cat > ~/.multi-model/config.json <<'EOF'
|
|
71
|
+
{
|
|
72
|
+
"agents": {
|
|
73
|
+
"standard": {
|
|
74
|
+
"type": "claude-compatible",
|
|
75
|
+
"model": "deepseek-v4-pro",
|
|
76
|
+
"baseUrl": "https://api.deepseek.com/anthropic",
|
|
77
|
+
"apiKeyEnv": "DEEPSEEK_API_KEY"
|
|
78
|
+
},
|
|
79
|
+
"complex": {
|
|
80
|
+
"type": "codex",
|
|
81
|
+
"model": "gpt-5.5"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
EOF
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
That's the whole minimum-viable file. All other knobs (`server.*`, `defaults.timeoutMs`, `defaults.tools`, …) have sane built-in defaults — see [Configuration reference](#configuration-reference).
|
|
89
|
+
|
|
90
|
+
### 4. Start the daemon + verify
|
|
91
|
+
|
|
92
|
+
Two ways — pick one:
|
|
93
|
+
|
|
94
|
+
**Option A — let your AI client auto-spawn it.** Open your client (Claude Code / Codex CLI / etc.) and call any mma-* skill; the skill's preflight check spawns `mmagent serve` on `127.0.0.1:7337` and reuses it for every subsequent call.
|
|
95
|
+
|
|
96
|
+
**Option B — start it manually.** Useful when you want the daemon up before opening a client:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
mmagent serve # 127.0.0.1:7337 by default
|
|
100
|
+
curl -s http://localhost:7337/health # → {"status":"ok"}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
For an always-on background install (survives reboots): [launchd / systemd templates](./scripts/README.md).
|
|
104
|
+
|
|
105
|
+
## Updating
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npm install -g @zhixuan92/multi-model-agent@latest
|
|
109
|
+
pkill -f "mmagent serve" # stop the running daemon
|
|
110
|
+
mmagent sync-skills # reconcile installed skills with the new bundle
|
|
111
|
+
# next AI-client session respawns the daemon via the skill preflight
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
A drift warning prints on `mmagent serve` if installed skills are older than the daemon. To rotate the auth token: `rm ~/.multi-model/auth-token && mmagent serve`.
|
|
115
|
+
|
|
116
|
+
## Skills
|
|
117
|
+
|
|
118
|
+
Skills are the surface your AI client sees. `mmagent sync-skills` writes them to the client's skill directory and keeps them reconciled across upgrades; the client then picks the right one based on what you ask. You don't call them by hand — you describe the work, the client routes it to the matching skill, the skill calls the matching REST endpoint.
|
|
119
|
+
|
|
120
|
+
### Work-delegation skills
|
|
121
|
+
|
|
122
|
+
| Skill | Target endpoint | Use when |
|
|
123
|
+
|---|---|---|
|
|
124
|
+
| `mma-delegate` | `POST /delegate` | Ad-hoc implementation or research tasks **without** a plan file — run them in parallel on cheap workers. |
|
|
125
|
+
| `mma-execute-plan` | `POST /execute-plan` | A plan / spec markdown exists on disk with numbered task headings; implement one or more tasks from it. |
|
|
126
|
+
| `mma-investigate` | `POST /investigate` | Answer a question about *this* codebase ("how does X work", "where is Y called") without burning main-context tokens on grep + reads. |
|
|
127
|
+
| `mma-explore` | (orchestrator playbook — no dedicated route) | Fans out `mma-investigate` + `mma-research` + `mma-journal-recall` in parallel and synthesises 3–5 distinct directions. Run before `superpowers:brainstorming`. Not for "where is X" questions (use `mma-investigate`). |
|
|
128
|
+
| `mma-research` | `POST /research` | External multi-source research with citations — arxiv, semantic_scholar, github_search, brave-with-`site:`-filters — for a focused question. |
|
|
129
|
+
| `mma-debug` | `POST /debug` | A test fails, a build breaks, or behavior is unexpected — delegate the reproduce/trace, keep the hypothesis on the main agent. |
|
|
130
|
+
| `mma-review` | `POST /review` | Source-code review (pre-merge, post-implementation, security-focused). One worker per file, in parallel. |
|
|
131
|
+
| `mma-audit` | `POST /audit` | Audit a prose artifact against a named criteria set — pick the **subtype**: `default` (general prose-coherence), `spec` (requirements: testability, decision-trace), `plan` (a plan verified against the actual codebase), `skill` (a SKILL.md). Run `subtype=plan` before `mma-execute-plan`. |
|
|
132
|
+
| `mma-journal-record` | `POST /journal-record` | Record a durable project learning into the cross-agent journal — what was tried, what happened, the lesson — integrated into a graph of ADR "node" files under `.mmagent/journal/` (create / refine / supersede / merge with typed edges). |
|
|
133
|
+
| `mma-journal-recall` | `POST /journal-recall` | Recall relevant prior learnings from the journal for a question or situation — traverses the node graph rather than keyword-filtering. |
|
|
134
|
+
|
|
135
|
+
### Plumbing skills
|
|
136
|
+
|
|
137
|
+
| Skill | Target endpoint | Use when |
|
|
138
|
+
|---|---|---|
|
|
139
|
+
| `mma-context-blocks` | `POST/DELETE /context-blocks` | The same large doc (>~2 KB) will be referenced by 2+ subsequent mma-* calls — register once, pass the ID instead of re-uploading. |
|
|
140
|
+
| `mma-retry` | `POST /retry` | A previous batch came back partial — re-run only the failed indices without re-dispatching the whole batch. |
|
|
141
|
+
|
|
142
|
+
The `multi-model-agent` skill (no `mma-` prefix) is a top-level overview your client reads first to pick which `mma-*` skill applies.
|
|
143
|
+
|
|
144
|
+
### Two generic usage samples
|
|
145
|
+
|
|
146
|
+
**Sample 1 — implement a feature from a plan**
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
You: "Execute tasks 3, 4, and 5 from docs/plans/auth-rewrite.md"
|
|
150
|
+
↓
|
|
151
|
+
Client picks mma-execute-plan (plan file on disk, multiple independent tasks)
|
|
152
|
+
↓
|
|
153
|
+
mmagent dispatches 3 workers in parallel on the standard agent (e.g. MiniMax-M3),
|
|
154
|
+
each runs cross-agent review on the complex agent, returns a structured report.
|
|
155
|
+
↓
|
|
156
|
+
You see one consolidated headline: "$0.04 actual / $1.20 saved vs claude-opus-4-8 (30× ROI)"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Sample 2 — debug a failing test (multiple skills chained)**
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
You: "tests/auth/session.test.ts is failing intermittently after the token-refresh refactor — figure it out and fix it"
|
|
163
|
+
↓
|
|
164
|
+
Step 1 — mma-context-blocks
|
|
165
|
+
The failing test output + the refactor diff are ~8 KB and will be referenced by every
|
|
166
|
+
downstream call. Register once, get a contextBlockId, reuse it.
|
|
167
|
+
↓
|
|
168
|
+
Step 2 — mma-debug
|
|
169
|
+
Worker reproduces the failure, traces across session.ts + token-refresh.ts, returns a
|
|
170
|
+
root-cause hypothesis: "race between refresh-in-flight and session.invalidate()".
|
|
171
|
+
Main agent stays on the hypothesis, decides the fix shape.
|
|
172
|
+
↓
|
|
173
|
+
Step 3 — mma-delegate
|
|
174
|
+
Dispatch the actual code change as an ad-hoc task (no plan file). Worker writes the
|
|
175
|
+
fix, runs the failing test 20× to confirm the race is gone.
|
|
176
|
+
↓
|
|
177
|
+
Step 4 — mma-review (with the acceptance checklist in the brief)
|
|
178
|
+
Reviewer worker checks the diff against the acceptance criteria: (a) failing
|
|
179
|
+
test now passes, (b) no other auth tests regressed, (c) refresh path still
|
|
180
|
+
emits the expected telemetry.
|
|
181
|
+
↓
|
|
182
|
+
Total cost: ~$0.08. Main-context tokens consumed: just the hypotheses and the verdicts.
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Configuration reference
|
|
186
|
+
|
|
187
|
+
### Lookup order
|
|
188
|
+
|
|
189
|
+
`--config <path>` → `$MMAGENT_CONFIG` → `<cwd>/.multi-model-agent.json` → `~/.multi-model/config.json`.
|
|
190
|
+
|
|
191
|
+
### Agent types
|
|
192
|
+
|
|
193
|
+
| Type | Auth | When to pick |
|
|
194
|
+
|---|---|---|
|
|
195
|
+
| `claude` | Local Claude Code OAuth (`claude login`) | Stay on Claude end-to-end with subscription auth |
|
|
196
|
+
| `codex` | Codex CLI subscription (`codex login`) | OpenAI flagship work without juggling API keys |
|
|
197
|
+
| `openai-compatible` | `apiKey` or `apiKeyEnv` | Any OpenAI-compatible endpoint — MiniMax, Groq, Together, local vLLM, plus OpenAI direct |
|
|
198
|
+
| `claude-compatible` | `apiKey` or `apiKeyEnv` | Vendors exposing an Anthropic-format endpoint (DeepSeek's `/anthropic`, etc.) — preserves thinking content blocks across multi-turn tool use |
|
|
199
|
+
|
|
200
|
+
DeepSeek V4 Pro under `claude-compatible` keeps reasoning ON; under `openai-compatible` it works but auto-disables thinking.
|
|
201
|
+
|
|
202
|
+
### Tuning
|
|
203
|
+
|
|
204
|
+
Every `defaults` knob has a built-in. Override only when you need to.
|
|
205
|
+
|
|
206
|
+
| Field | Default | What it does |
|
|
207
|
+
|---|---|---|
|
|
208
|
+
| `defaults.timeoutMs` | `3600000` (60 min) | Hard task-level wall-clock cap (bumped from 30 min in 3.9.0) |
|
|
209
|
+
| `defaults.stallTimeoutMs` | `1200000` (20 min) | Aborts in-flight runs idle for this long (bumped from 10 min in 3.9.0) |
|
|
210
|
+
| `defaults.tools` | `"full"` | Tool surface: `none` / `readonly` / `no-shell` / `full` |
|
|
211
|
+
| `defaults.sandboxPolicy` | `"cwd-only"` | Path-traversal + symlink confinement to the request's `cwd` |
|
|
212
|
+
|
|
213
|
+
### Telemetry
|
|
214
|
+
|
|
215
|
+
**Off by default.** Opt in via `mmagent telemetry enable` (or `MMAGENT_TELEMETRY=1`), or set in config:
|
|
216
|
+
|
|
217
|
+
```json
|
|
218
|
+
{
|
|
219
|
+
"agents": { "...": "..." },
|
|
220
|
+
"telemetry": { "enabled": true }
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Every upload batch is signed with a per-install Ed25519 key (TOFU; lives at `~/.multi-model/identity.json`); receivers can verify it came from the install whose `installId` it claims. Full disclosure: [PRIVACY.md](https://github.com/zhixuan312/multi-model-agent/blob/master/PRIVACY.md).
|
|
225
|
+
|
|
226
|
+
### Verbose / diagnostics
|
|
227
|
+
|
|
228
|
+
```json
|
|
229
|
+
{
|
|
230
|
+
"agents": { "...": "..." },
|
|
231
|
+
"diagnostics": { "log": true, "verbose": true }
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Or per-run via `mmagent serve --verbose --log`. JSONL goes to `~/.multi-model/logs/mmagent-<date>.jsonl`; large request bodies (>16 KB UTF-8) spill to `~/.multi-model/logs/requests/<batchId>.json`.
|
|
236
|
+
|
|
237
|
+
> **Note:** verbose logs may include prompts, file paths, and other task content — disable for production servers handling sensitive data.
|
|
238
|
+
|
|
239
|
+
### Auth token
|
|
240
|
+
|
|
241
|
+
Generated on first `mmagent serve`. Retrieve with `mmagent print-token`, or set `MMAGENT_AUTH_TOKEN` to override.
|
|
242
|
+
|
|
243
|
+
## REST API
|
|
244
|
+
|
|
245
|
+
16 endpoints. All tool endpoints are async: they return `202 { batchId, statusUrl }` immediately and the executor runs in the background. Poll `GET /batch/:id` for the terminal envelope.
|
|
246
|
+
|
|
247
|
+
| Endpoint | Purpose |
|
|
248
|
+
|---|---|
|
|
249
|
+
| `POST /delegate?cwd=<abs>` | Fan out ad-hoc tasks to sub-agents |
|
|
250
|
+
| `POST /audit?cwd=<abs>` | Audit a document (or a code-execution plan via `subtype: 'plan'`) |
|
|
251
|
+
| `POST /review?cwd=<abs>` | Review code (pass acceptance checklists in the brief for verification-style checks) |
|
|
252
|
+
| `POST /debug?cwd=<abs>` | Debug a failure with a hypothesis |
|
|
253
|
+
| `POST /execute-plan?cwd=<abs>` | Implement from a plan file |
|
|
254
|
+
| `POST /retry?cwd=<abs>` | Re-run specific tasks from a previous batch |
|
|
255
|
+
| `POST /investigate?cwd=<abs>` | Codebase Q&A — structured answer with file:line citations + confidence |
|
|
256
|
+
| `POST /research?cwd=<abs>` | External multi-source research — arxiv, semantic_scholar, github_search, brave-with-`site:`-filters — for a focused question |
|
|
257
|
+
| `POST /journal-record?cwd=<abs>` | Record one learning into the project's cross-agent journal graph (`.mmagent/journal/`) — create / refine / supersede / merge |
|
|
258
|
+
| `POST /journal-recall?cwd=<abs>` | Recall relevant prior learnings from the journal graph for a question or situation |
|
|
259
|
+
| `GET /batch/:id[?taskIndex=N]` | Poll a batch: `202 text/plain` (pending) or `200 application/json` (terminal). `?taskIndex=N` slices on complete state |
|
|
260
|
+
| `POST /context-blocks?cwd=<abs>` | Register a reusable context block |
|
|
261
|
+
| `DELETE /context-blocks/:id?cwd=<abs>` | Delete a context block |
|
|
262
|
+
| `POST /control/batch-slice` | Slice an in-flight batch — return a subset of its tasks by index |
|
|
263
|
+
| `GET /health` | Liveness probe (unauthenticated, loopback-only) |
|
|
264
|
+
| `GET /status` | Server status (authenticated, loopback-only) |
|
|
265
|
+
|
|
266
|
+
All tool endpoints require bearer auth: `Authorization: Bearer <token>`.
|
|
267
|
+
|
|
268
|
+
## Operator commands
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
mmagent serve [--verbose] [--log] # start daemon
|
|
272
|
+
mmagent info [--json] # cliVersion, bind/port, token fingerprint, daemon identity
|
|
273
|
+
mmagent status [--json] # health + stats from a running daemon
|
|
274
|
+
mmagent logs [--follow] [--batch=<id>] # tail today's diagnostic log
|
|
275
|
+
mmagent print-token # print the current auth token
|
|
276
|
+
mmagent sync-skills [--target=<client>] [--all-targets] [--dry-run] [--json] # idempotent install + update + reconcile
|
|
277
|
+
mmagent disable [--target=<client>] [--all-targets] [--dry-run] [--json] # remove skills + pin off (survives upgrades)
|
|
278
|
+
mmagent enable [--target=<client>] [--all-targets] [--dry-run] [--json] # clear the pin + reinstall skills
|
|
279
|
+
mmagent telemetry status # show consent state + source
|
|
280
|
+
mmagent telemetry enable # opt in
|
|
281
|
+
mmagent telemetry disable # opt out + delete local queue
|
|
282
|
+
mmagent telemetry reset-id # rotate the local Ed25519 identity
|
|
283
|
+
mmagent telemetry dump-queue # print the locally-queued events as JSON
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Architecture
|
|
287
|
+
|
|
288
|
+
`mmagent serve` runs a loopback HTTP server. Each tool call dispatches to a labor agent (standard or complex), runs a cross-agent review cycle, and returns a structured report. Tasks run in parallel; each has a wall-clock timeout.
|
|
289
|
+
|
|
290
|
+
Full design rationale: [DIRECTION.md](https://github.com/zhixuan312/multi-model-agent/blob/master/DIRECTION.md). Layer map and request lifecycle: [docs/ARCHITECTURE.md](https://github.com/zhixuan312/multi-model-agent/blob/master/docs/ARCHITECTURE.md).
|
|
291
|
+
|
|
292
|
+
## Troubleshooting
|
|
293
|
+
|
|
294
|
+
| Symptom | Fix |
|
|
295
|
+
|---|---|
|
|
296
|
+
| Port 7337 already in use | `lsof -nP -i :7337` → kill the stale process |
|
|
297
|
+
| Daemon stale after upgrade | `pkill -f "mmagent serve"`; the skill preflight respawns it on next client session |
|
|
298
|
+
| Skill version mismatch | `mmagent sync-skills` and restart your client |
|
|
299
|
+
| `401 unauthorized` from a skill | `export MMAGENT_AUTH_TOKEN=$(mmagent print-token)` |
|
|
300
|
+
| `pkill` reports success but `mmagent info` still shows the old PID | The pattern didn't match — try `kill <pid-from-mmagent-info>` directly |
|
|
301
|
+
| TLS `handshake_failure` to a known-good telemetry endpoint | Local DNS cache is stale. `sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder` (macOS); restart the daemon so its process re-resolves |
|
|
302
|
+
| Local telemetry queue stops draining | Daemon's flusher is in exponential backoff after a transport failure (capped at 1 hr). Restart the daemon to force an immediate boot-flush |
|
|
303
|
+
|
|
304
|
+
## What's new in 5.0
|
|
305
|
+
|
|
306
|
+
- **Runtime migrated to Bun**, and this package now ships as **standalone per-platform binaries** with Bun embedded: `npm i -g @zhixuan92/multi-model-agent` resolves a native binary that needs neither Node nor Bun to run (npm uses Node ≥18 only for the install shim). Behavior is identical to 4.x.
|
|
307
|
+
|
|
308
|
+
Full history: [CHANGELOG](https://github.com/zhixuan312/multi-model-agent/blob/master/CHANGELOG.md).
|
|
309
|
+
|
|
310
|
+
## Full documentation
|
|
311
|
+
|
|
312
|
+
→ **[github.com/zhixuan312/multi-model-agent](https://github.com/zhixuan312/multi-model-agent)**
|
|
313
|
+
|
|
314
|
+
## License
|
|
315
|
+
|
|
316
|
+
[MIT](./LICENSE) — Copyright (c) 2026 Zhang Zhixuan
|
package/package.json
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhixuan92/multi-model-agent",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
|
+
"description": "Standalone HTTP server for multi-model-agent. Routes tool-invocation work to Claude, Codex, or OpenAI-compatible sub-agents with async-polling REST dispatch and installable skills for Claude Code, Gemini CLI, Codex CLI, and Cursor.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"llm",
|
|
7
|
+
"claude",
|
|
8
|
+
"codex",
|
|
9
|
+
"openai",
|
|
10
|
+
"agent",
|
|
11
|
+
"multi-model",
|
|
12
|
+
"delegation",
|
|
13
|
+
"http-server"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"homepage": "https://github.com/zhixuan312/multi-model-agent#readme",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/zhixuan312/multi-model-agent.git"
|
|
20
|
+
},
|
|
4
21
|
"bin": {
|
|
5
22
|
"mmagent": "bin/mmagent.mjs",
|
|
6
23
|
"multi-model-agent": "bin/mmagent.mjs"
|
|
@@ -9,18 +26,20 @@
|
|
|
9
26
|
"postinstall": "node postinstall.mjs"
|
|
10
27
|
},
|
|
11
28
|
"optionalDependencies": {
|
|
12
|
-
"@zhixuan92/mmagent-darwin-arm64": "5.0.
|
|
13
|
-
"@zhixuan92/mmagent-darwin-x64": "5.0.
|
|
14
|
-
"@zhixuan92/mmagent-linux-x64": "5.0.
|
|
15
|
-
"@zhixuan92/mmagent-linux-arm64": "5.0.
|
|
16
|
-
"@zhixuan92/mmagent-linux-x64-musl": "5.0.
|
|
17
|
-
"@zhixuan92/mmagent-linux-arm64-musl": "5.0.
|
|
18
|
-
"@zhixuan92/mmagent-windows-x64": "5.0.
|
|
19
|
-
"@zhixuan92/mmagent-windows-arm64": "5.0.
|
|
29
|
+
"@zhixuan92/mmagent-darwin-arm64": "5.0.2",
|
|
30
|
+
"@zhixuan92/mmagent-darwin-x64": "5.0.2",
|
|
31
|
+
"@zhixuan92/mmagent-linux-x64": "5.0.2",
|
|
32
|
+
"@zhixuan92/mmagent-linux-arm64": "5.0.2",
|
|
33
|
+
"@zhixuan92/mmagent-linux-x64-musl": "5.0.2",
|
|
34
|
+
"@zhixuan92/mmagent-linux-arm64-musl": "5.0.2",
|
|
35
|
+
"@zhixuan92/mmagent-windows-x64": "5.0.2",
|
|
36
|
+
"@zhixuan92/mmagent-windows-arm64": "5.0.2"
|
|
20
37
|
},
|
|
21
38
|
"files": [
|
|
22
39
|
"bin",
|
|
23
|
-
"postinstall.mjs"
|
|
40
|
+
"postinstall.mjs",
|
|
41
|
+
"README.md",
|
|
42
|
+
"LICENSE"
|
|
24
43
|
],
|
|
25
44
|
"engines": {
|
|
26
45
|
"node": ">=18"
|