@open-multi-agent/core 1.4.1 → 1.5.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/README.md +103 -51
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/agent.js +5 -0
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/runner.d.ts +12 -0
- package/dist/agent/runner.d.ts.map +1 -1
- package/dist/agent/runner.js +48 -12
- package/dist/agent/runner.js.map +1 -1
- package/dist/cli/oma.d.ts +10 -2
- package/dist/cli/oma.d.ts.map +1 -1
- package/dist/cli/oma.js +10 -5
- package/dist/cli/oma.js.map +1 -1
- package/dist/dashboard/render-team-run-dashboard.d.ts.map +1 -1
- package/dist/dashboard/render-team-run-dashboard.js +177 -84
- package/dist/dashboard/render-team-run-dashboard.js.map +1 -1
- package/dist/llm/adapter.d.ts +3 -1
- package/dist/llm/adapter.d.ts.map +1 -1
- package/dist/llm/adapter.js +10 -0
- package/dist/llm/adapter.js.map +1 -1
- package/dist/llm/ai-sdk.d.ts +5 -1
- package/dist/llm/ai-sdk.d.ts.map +1 -1
- package/dist/llm/ai-sdk.js +50 -9
- package/dist/llm/ai-sdk.js.map +1 -1
- package/dist/llm/anthropic.d.ts +3 -0
- package/dist/llm/anthropic.d.ts.map +1 -1
- package/dist/llm/anthropic.js +29 -13
- package/dist/llm/anthropic.js.map +1 -1
- package/dist/llm/azure-openai.d.ts +3 -0
- package/dist/llm/azure-openai.d.ts.map +1 -1
- package/dist/llm/azure-openai.js +8 -3
- package/dist/llm/azure-openai.js.map +1 -1
- package/dist/llm/bedrock.d.ts +3 -0
- package/dist/llm/bedrock.d.ts.map +1 -1
- package/dist/llm/bedrock.js +49 -21
- package/dist/llm/bedrock.js.map +1 -1
- package/dist/llm/copilot.d.ts +3 -0
- package/dist/llm/copilot.d.ts.map +1 -1
- package/dist/llm/copilot.js +8 -3
- package/dist/llm/copilot.js.map +1 -1
- package/dist/llm/deepseek.d.ts +9 -2
- package/dist/llm/deepseek.d.ts.map +1 -1
- package/dist/llm/deepseek.js +21 -2
- package/dist/llm/deepseek.js.map +1 -1
- package/dist/llm/doubao.d.ts +21 -0
- package/dist/llm/doubao.d.ts.map +1 -0
- package/dist/llm/doubao.js +24 -0
- package/dist/llm/doubao.js.map +1 -0
- package/dist/llm/gemini.d.ts +3 -0
- package/dist/llm/gemini.d.ts.map +1 -1
- package/dist/llm/gemini.js +40 -19
- package/dist/llm/gemini.js.map +1 -1
- package/dist/llm/mimo.d.ts +24 -0
- package/dist/llm/mimo.d.ts.map +1 -0
- package/dist/llm/mimo.js +30 -0
- package/dist/llm/mimo.js.map +1 -0
- package/dist/llm/openai-common.d.ts +10 -3
- package/dist/llm/openai-common.d.ts.map +1 -1
- package/dist/llm/openai-common.js +95 -8
- package/dist/llm/openai-common.js.map +1 -1
- package/dist/llm/openai.d.ts +24 -0
- package/dist/llm/openai.d.ts.map +1 -1
- package/dist/llm/openai.js +49 -4
- package/dist/llm/openai.js.map +1 -1
- package/dist/llm/reasoning-fallback.d.ts +132 -0
- package/dist/llm/reasoning-fallback.d.ts.map +1 -0
- package/dist/llm/reasoning-fallback.js +128 -0
- package/dist/llm/reasoning-fallback.js.map +1 -0
- package/dist/orchestrator/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator/orchestrator.js +72 -10
- package/dist/orchestrator/orchestrator.js.map +1 -1
- package/dist/tool/built-in/bash.d.ts +1 -1
- package/dist/tool/built-in/bash.d.ts.map +1 -1
- package/dist/tool/built-in/bash.js +60 -7
- package/dist/tool/built-in/bash.js.map +1 -1
- package/dist/tool/built-in/file-edit.d.ts.map +1 -1
- package/dist/tool/built-in/file-edit.js +13 -8
- package/dist/tool/built-in/file-edit.js.map +1 -1
- package/dist/tool/built-in/file-read.d.ts.map +1 -1
- package/dist/tool/built-in/file-read.js +9 -4
- package/dist/tool/built-in/file-read.js.map +1 -1
- package/dist/tool/built-in/file-write.d.ts.map +1 -1
- package/dist/tool/built-in/file-write.js +11 -6
- package/dist/tool/built-in/file-write.js.map +1 -1
- package/dist/tool/built-in/fs-walk.d.ts.map +1 -1
- package/dist/tool/built-in/fs-walk.js +6 -3
- package/dist/tool/built-in/fs-walk.js.map +1 -1
- package/dist/tool/built-in/glob.d.ts.map +1 -1
- package/dist/tool/built-in/glob.js +10 -4
- package/dist/tool/built-in/glob.js.map +1 -1
- package/dist/tool/built-in/grep.d.ts.map +1 -1
- package/dist/tool/built-in/grep.js +15 -6
- package/dist/tool/built-in/grep.js.map +1 -1
- package/dist/tool/built-in/path-safety.d.ts +30 -0
- package/dist/tool/built-in/path-safety.d.ts.map +1 -0
- package/dist/tool/built-in/path-safety.js +106 -0
- package/dist/tool/built-in/path-safety.js.map +1 -0
- package/dist/tool/mcp.d.ts.map +1 -1
- package/dist/tool/mcp.js +58 -33
- package/dist/tool/mcp.js.map +1 -1
- package/dist/types.d.ts +159 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/redaction.d.ts +4 -0
- package/dist/utils/redaction.d.ts.map +1 -0
- package/dist/utils/redaction.js +78 -0
- package/dist/utils/redaction.js.map +1 -0
- package/package.json +1 -2
- package/docs/DECISIONS.md +0 -49
- package/docs/cli.md +0 -265
- package/docs/context-management.md +0 -24
- package/docs/featured-partner.md +0 -28
- package/docs/observability.md +0 -56
- package/docs/providers/minimax.md +0 -75
- package/docs/providers.md +0 -78
- package/docs/shared-memory.md +0 -27
- package/docs/tool-configuration.md +0 -152
package/README.md
CHANGED
|
@@ -44,12 +44,16 @@
|
|
|
44
44
|
|
|
45
45
|
> **Your engineers describe the goal, not the graph.**
|
|
46
46
|
|
|
47
|
+
Graph-first frameworks make you enumerate every node and edge up front. `open-multi-agent` is goal-first: you describe the outcome and the coordinator builds the task DAG at runtime, so the orchestration adapts to the goal instead of being hand-wired for one.
|
|
48
|
+
|
|
49
|
+
## Contents
|
|
50
|
+
|
|
51
|
+
[Quick Start](#quick-start) · [Three Ways to Run](#three-ways-to-run) · [Features](#features) · [Orchestration Controls](#orchestration-controls) · [Examples](#examples) · [How Is This Different?](#how-is-this-different-from-x) · [Ecosystem](#ecosystem) · [Architecture](#architecture) · [Supported Providers](#supported-providers) · [Production Checklist](#production-checklist) · [Documentation](#documentation) · [Contributing](#contributing)
|
|
52
|
+
|
|
47
53
|
## Quick Start
|
|
48
54
|
|
|
49
55
|
Requires Node.js >= 18.
|
|
50
56
|
|
|
51
|
-
### Use it in your project
|
|
52
|
-
|
|
53
57
|
```bash
|
|
54
58
|
npm install @open-multi-agent/core
|
|
55
59
|
```
|
|
@@ -71,7 +75,13 @@ const orchestrator = new OpenMultiAgent({
|
|
|
71
75
|
})
|
|
72
76
|
|
|
73
77
|
const team = orchestrator.createTeam('api-team', { name: 'api-team', agents, sharedMemory: true })
|
|
74
|
-
|
|
78
|
+
|
|
79
|
+
// Built-in filesystem tools default to a `<cwd>/.agent-workspace` sandbox.
|
|
80
|
+
// Point the agent at an absolute path inside that root.
|
|
81
|
+
const result = await orchestrator.runTeam(
|
|
82
|
+
team,
|
|
83
|
+
`Create a REST API for a todo list in ${process.cwd()}/.agent-workspace/todo-api/`,
|
|
84
|
+
)
|
|
75
85
|
|
|
76
86
|
console.log(result.success, result.totalTokenUsage.output_tokens)
|
|
77
87
|
```
|
|
@@ -104,7 +114,7 @@ Tokens: 12847 output tokens
|
|
|
104
114
|
|
|
105
115
|
Local models via Ollama need no API key, see [`providers/ollama`](examples/providers/ollama.ts). For hosted providers (`OPENAI_API_KEY`, `GEMINI_API_KEY`, etc.), see [Supported Providers](#supported-providers).
|
|
106
116
|
|
|
107
|
-
|
|
117
|
+
## Three Ways to Run
|
|
108
118
|
|
|
109
119
|
| Mode | Method | When to use | Example |
|
|
110
120
|
|------|--------|-------------|---------|
|
|
@@ -118,26 +128,66 @@ Preview the coordinator's task DAG without executing agents:
|
|
|
118
128
|
const plan = await orchestrator.runTeam(team, goal, { planOnly: true })
|
|
119
129
|
```
|
|
120
130
|
|
|
121
|
-
For MapReduce-style fan-out without task dependencies, use `AgentPool.runParallel()` directly. See [`patterns/fan-out-aggregate`](examples/patterns/fan-out-aggregate.ts).
|
|
122
|
-
|
|
123
|
-
For shell and CI, use the JSON-first `oma` binary. See [docs/cli.md](./docs/cli.md).
|
|
124
|
-
|
|
125
131
|
## Features
|
|
126
132
|
|
|
127
133
|
| Capability | What you get |
|
|
128
134
|
|------------|--------------|
|
|
129
|
-
| **Goal-driven coordinator** | One `runTeam(team, goal)` call
|
|
130
|
-
| **Mix providers in one team** |
|
|
131
|
-
| **
|
|
132
|
-
| **
|
|
133
|
-
| **
|
|
134
|
-
| **
|
|
135
|
+
| **Goal-driven coordinator** | One `runTeam(team, goal)` call decomposes the goal into a task DAG, parallelizes independents, and synthesizes the result. Unassigned tasks are auto-scheduled — `dependency-first` (default), `round-robin`, `least-busy`, or `capability-match`. |
|
|
136
|
+
| **Mix providers in one team** | 12 built-in providers plus any OpenAI-compatible endpoint (Ollama, vLLM, LM Studio, OpenRouter, Groq), mixed freely in one team. Local servers that emit tool calls as plain text are recovered by a fallback parser. ([full list](#supported-providers) · [setup](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/providers.md)) |
|
|
137
|
+
| **Extended thinking / reasoning** | One `thinking` config maps to Anthropic thinking, Gemini `thinkingConfig`, and OpenAI `reasoning_effort`; reasoning is streamed as events, with opt-in preservation across a provider switch. ([`cross-provider-reasoning`](examples/patterns/cross-provider-reasoning.ts)) |
|
|
138
|
+
| **Tools + MCP** | 6 built-in (`bash`, `file_*`, `grep`, `glob`), opt-in `delegate_to_agent` (cycle + depth guards), custom tools via `defineTool()` + Zod, stdio MCP servers via `connectMCPTools()`. ([tool config](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/tool-configuration.md)) |
|
|
139
|
+
| **Streaming + structured output** | Token-by-token streaming on every adapter (per-agent during team runs via `onAgentStream`); Zod-validated final answer with auto-retry on parse failure. ([`structured-output`](examples/patterns/structured-output.ts)) |
|
|
140
|
+
| **Human-in-the-loop** | Gate execution with `onPlanReady` (approve the plan before any agent runs) and `onApproval` (approve between task rounds), or inspect first with `planOnly`. |
|
|
141
|
+
| **Lifecycle hooks + cancellation** | `beforeRun` rewrites the prompt, `afterRun` post-processes or rejects the result; pass an `AbortSignal` to cancel a run in flight. |
|
|
142
|
+
| **Configurable coordinator** | Override the coordinator's model, provider, adapter, system prompt, or tools via `runTeam(team, goal, { coordinator })`. |
|
|
143
|
+
| **Observability** | `onProgress` events, `onTrace` spans, post-run HTML dashboard rendering the executed task DAG. API keys and tokens are redacted from traces, bash output, and the dashboard. ([observability guide](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/observability.md)) |
|
|
144
|
+
| **Pluggable shared memory** | Default in-process KV; swap in Redis / Postgres / your own backend by implementing `MemoryStore`. ([shared memory](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/shared-memory.md)) |
|
|
145
|
+
| **Sandboxed filesystem workspace** | Built-in filesystem tools are sandboxed to `<cwd>/.agent-workspace` by default; agents sharing the default configuration share this root. For per-agent isolation, set `AgentConfig.cwd`; for a different shared root, set `OrchestratorConfig.defaultCwd`; pass `null` to disable. ([sandbox config](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/tool-configuration.md)) |
|
|
146
|
+
|
|
147
|
+
Production controls ([context strategies](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/context-management.md), task retry with backoff, loop detection, tool output truncation/compression) are covered in the [Production Checklist](#production-checklist).
|
|
148
|
+
|
|
149
|
+
## Orchestration Controls
|
|
150
|
+
|
|
151
|
+
Fine-grained control over a `runTeam` run. All optional; defaults keep behavior unchanged.
|
|
152
|
+
|
|
153
|
+
**Inject team context.** Prepend the goal, roster, and this worker's role to every worker prompt — helps workers stay aligned and makes multi-step runs easier to debug. Off by default; worker prompts stay byte-identical when omitted.
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
await orchestrator.runTeam(team, goal, { revealCoordinator: true })
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Approve before running.** Inspect the coordinator's plan before any agent executes, and again between task rounds. These live on the orchestrator. Returning `false` aborts; remaining tasks are marked `skipped`.
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
const orchestrator = new OpenMultiAgent({
|
|
163
|
+
onPlanReady: async (tasks) => tasks.length <= 10, // gate the whole plan
|
|
164
|
+
onApproval: async (completed, next) => next.length > 0, // gate each round
|
|
165
|
+
})
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Cancel a run.** Pass an `AbortSignal`; aborting stops the run in flight.
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
const controller = new AbortController()
|
|
172
|
+
const run = orchestrator.runTeam(team, goal, { abortSignal: controller.signal })
|
|
173
|
+
// controller.abort() from elsewhere to cancel
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Configure the coordinator.** Give the planner its own model, adapter, or extra instructions without touching the worker agents.
|
|
135
177
|
|
|
136
|
-
|
|
178
|
+
```ts
|
|
179
|
+
await orchestrator.runTeam(team, goal, {
|
|
180
|
+
coordinator: { model: 'claude-opus-4-6', instructions: 'Prefer fewer, larger tasks.' },
|
|
181
|
+
})
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Fan-out without dependencies.** For MapReduce-style parallelism, use `AgentPool.runParallel()` directly. See [`patterns/fan-out-aggregate`](examples/patterns/fan-out-aggregate.ts).
|
|
185
|
+
|
|
186
|
+
**Shell & CI.** Use the JSON-first `oma` binary. See [docs/cli.md](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/cli.md).
|
|
137
187
|
|
|
138
188
|
## Examples
|
|
139
189
|
|
|
140
|
-
[`examples/`](./examples/) is organized by category: basics, cookbook, patterns, providers,
|
|
190
|
+
[`examples/`](./examples/) is organized by category: basics, cookbook, patterns, providers, and integrations. See [`examples/README.md`](./examples/README.md) for the full index. ([`production/`](./examples/production/README.md) is open for contributions — see the acceptance criteria.)
|
|
141
191
|
|
|
142
192
|
### Real-world workflows ([`cookbook/`](./examples/cookbook/))
|
|
143
193
|
|
|
@@ -147,11 +197,16 @@ End-to-end scenarios you can run today. Each one is a complete, opinionated work
|
|
|
147
197
|
- [`meeting-summarizer`](examples/cookbook/meeting-summarizer.ts): three specialised agents fan out on a transcript, an aggregator merges them into one Markdown report with action items and sentiment.
|
|
148
198
|
- [`competitive-monitoring`](examples/cookbook/competitive-monitoring.ts): three parallel source agents extract claims from feeds; an aggregator cross-checks them and flags contradictions.
|
|
149
199
|
- [`translation-backtranslation`](examples/cookbook/translation-backtranslation.ts): translate EN to target with one provider, back-translate with another, flag semantic drift.
|
|
200
|
+
- [`incident-postmortem-dag`](examples/cookbook/incident-postmortem-dag.ts): three independent root tasks fan out at t=0, then a root-cause hypothesizer and postmortem writer synthesize them into one document.
|
|
201
|
+
- [`personalized-interview-simulator`](examples/cookbook/personalized-interview-simulator.ts): a stateful interviewer (`Agent.prompt()` across turns) plus a transcript-reading observer, with `readline` human input and a Zod-validated debrief.
|
|
150
202
|
|
|
151
203
|
### Patterns and integrations
|
|
152
204
|
|
|
153
205
|
- [`basics/team-collaboration`](examples/basics/team-collaboration.ts): `runTeam()` coordinator pattern.
|
|
154
206
|
- [`patterns/structured-output`](examples/patterns/structured-output.ts): any agent returns Zod-validated JSON.
|
|
207
|
+
- [`patterns/multi-perspective-code-review`](examples/patterns/multi-perspective-code-review.ts): a generator feeds security, performance, and style reviewers running in parallel, then a synthesizer returns Zod-validated findings.
|
|
208
|
+
- [`patterns/cross-provider-reasoning`](examples/patterns/cross-provider-reasoning.ts): preserve a reasoning model's thought stream across a provider switch via `preserveReasoningAsText`.
|
|
209
|
+
- [`patterns/cost-tiered-pipeline`](examples/patterns/cost-tiered-pipeline.ts): assign a different model per stage and estimate per-model USD cost from `onTrace` token counts.
|
|
155
210
|
- [`patterns/fan-out-aggregate`](examples/patterns/fan-out-aggregate.ts): MapReduce-style fan-out via `AgentPool.runParallel()`.
|
|
156
211
|
- [`patterns/agent-handoff`](examples/patterns/agent-handoff.ts): synchronous sub-agent delegation via `delegate_to_agent`.
|
|
157
212
|
- [`integrations/trace-observability`](examples/integrations/trace-observability.ts): `onTrace` spans for LLM calls, tools, and tasks.
|
|
@@ -188,7 +243,6 @@ A quick router. Mechanism breakdown follows.
|
|
|
188
243
|
### In production
|
|
189
244
|
|
|
190
245
|
- **[temodar-agent](https://github.com/xeloxa/temodar-agent)** (~60 stars). WordPress security analysis platform by [Ali Sünbül](https://github.com/xeloxa). Uses our built-in tools (`bash`, `file_*`, `grep`) directly inside a Docker runtime. Confirmed production use.
|
|
191
|
-
- **Cybersecurity SOC (home lab).** A private setup running Qwen 2.5 + DeepSeek Coder entirely offline via Ollama, building an autonomous SOC pipeline on Wazuh + Proxmox. Early user, not yet public.
|
|
192
246
|
|
|
193
247
|
Using `open-multi-agent` in production or a side project? [Open a discussion](https://github.com/open-multi-agent/open-multi-agent/discussions) and we will list it here.
|
|
194
248
|
|
|
@@ -197,17 +251,17 @@ Using `open-multi-agent` in production or a side project? [Open a discussion](ht
|
|
|
197
251
|
- **[Engram](https://www.engram-memory.com)** — "Git for AI memory." Syncs knowledge across agents instantly and flags conflicts. ([repo](https://github.com/Agentscreator/engram-memory))
|
|
198
252
|
- **[@agentsonar/oma](https://github.com/agentsonar/agentsonar-oma)** — Sidecar detecting cross-run delegation cycles, repetition, and rate bursts.
|
|
199
253
|
|
|
200
|
-
Built an integration? [
|
|
254
|
+
Built an integration? See the [integration guide](examples/integrations/README.md) for how to submit a reference or vendor example and get your product listed.
|
|
201
255
|
|
|
202
256
|
### Provider community offers
|
|
203
257
|
|
|
204
258
|
Limited-time provider offers for `open-multi-agent` users. Listings are not paid endorsements.
|
|
205
259
|
|
|
206
|
-
- **[MiniMax](https://platform.minimax.io/subscribe/coding-plan?code=6ZoOY13DDV&source=link)** — Use MiniMax M2.7 in OMA's TypeScript multi-agent workflows. OMA users get 12% off the MiniMax Token Plan until 2026-06-30. See the [MiniMax setup guide](
|
|
260
|
+
- **[MiniMax](https://platform.minimax.io/subscribe/coding-plan?code=6ZoOY13DDV&source=link)** — Use MiniMax M2.7 in OMA's TypeScript multi-agent workflows. OMA users get 12% off the MiniMax Token Plan until 2026-06-30. See the [MiniMax setup guide](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/providers/minimax.md).
|
|
207
261
|
|
|
208
262
|
### Featured partner
|
|
209
263
|
|
|
210
|
-
For products and platforms with a deep `open-multi-agent` integration. See the [Featured partner program](
|
|
264
|
+
For products and platforms with a deep `open-multi-agent` integration. See the [Featured partner program](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/featured-partner.md) for terms and how to apply.
|
|
211
265
|
|
|
212
266
|
## Architecture
|
|
213
267
|
|
|
@@ -238,16 +292,10 @@ For products and platforms with a deep `open-multi-agent` integration. See the [
|
|
|
238
292
|
│ Agent │
|
|
239
293
|
│ - run() │ ┌────────────────────────┐
|
|
240
294
|
│ - prompt() │───►│ LLMAdapter │
|
|
241
|
-
│ - stream() │ │ -
|
|
242
|
-
└────────┬──────────┘ │
|
|
243
|
-
│ │ -
|
|
244
|
-
│ │ -
|
|
245
|
-
│ │ - CopilotAdapter │
|
|
246
|
-
│ │ - GeminiAdapter │
|
|
247
|
-
│ │ - GrokAdapter │
|
|
248
|
-
│ │ - MiniMaxAdapter │
|
|
249
|
-
│ │ - DeepSeekAdapter │
|
|
250
|
-
│ │ - QiniuAdapter │
|
|
295
|
+
│ - stream() │ │ - 12 built-in │
|
|
296
|
+
└────────┬──────────┘ │ providers │
|
|
297
|
+
│ │ - OpenAI-compatible │
|
|
298
|
+
│ │ - AI SDK bridge │
|
|
251
299
|
│ └────────────────────────┘
|
|
252
300
|
┌────────▼──────────┐
|
|
253
301
|
│ AgentRunner │ ┌──────────────────────┐
|
|
@@ -258,13 +306,6 @@ For products and platforms with a deep `open-multi-agent` integration. See the [
|
|
|
258
306
|
└──────────────────────┘
|
|
259
307
|
```
|
|
260
308
|
|
|
261
|
-
## Core Concepts
|
|
262
|
-
|
|
263
|
-
- **Tools + MCP.** Built-ins cover `bash`, `file_read`, `file_write`, `file_edit`, `grep`, and `glob`; custom tools use `defineTool()` + Zod; stdio MCP servers connect through `connectMCPTools()`. See [tool configuration](./docs/tool-configuration.md).
|
|
264
|
-
- **Observability.** Wire `onProgress` for live lifecycle events, `onTrace` for structured spans, and `renderTeamRunDashboard(result)` for a static DAG dashboard. See [observability](./docs/observability.md).
|
|
265
|
-
- **Shared memory.** Use the default in-process KV or bring Redis, Postgres, Engram, or any `MemoryStore`. See [shared memory](./docs/shared-memory.md).
|
|
266
|
-
- **Context management.** Use sliding windows, summarization, rule-based compaction, or a custom compressor for long-running agents. See [context management](./docs/context-management.md).
|
|
267
|
-
|
|
268
309
|
## Supported Providers
|
|
269
310
|
|
|
270
311
|
Change `provider`, `model`, and set the env var. The agent config shape stays the same.
|
|
@@ -280,11 +321,11 @@ const agent: AgentConfig = {
|
|
|
280
321
|
|
|
281
322
|
| Kind | How to configure | Services |
|
|
282
323
|
|------|------------------|----------|
|
|
283
|
-
| Built-in shortcuts | Set `provider` to `anthropic`, `gemini`, `openai`, `azure-openai`, `copilot`, `grok`, `deepseek`, `minimax`, `qiniu`, or `bedrock`; the framework supplies the endpoint. | Anthropic, Gemini, OpenAI, Azure OpenAI, GitHub Copilot, xAI Grok, DeepSeek, MiniMax, Qiniu, AWS Bedrock |
|
|
284
|
-
| OpenAI-compatible endpoints | Set `provider: 'openai'` plus `baseURL` and, when needed, `apiKey`. | Ollama, vLLM, LM Studio, llama.cpp server, OpenRouter, Groq, Mistral |
|
|
324
|
+
| Built-in shortcuts | Set `provider` to `anthropic`, `gemini`, `openai`, `azure-openai`, `copilot`, `grok`, `deepseek`, `doubao`, `minimax`, `mimo`, `qiniu`, or `bedrock`; the framework supplies the endpoint. | Anthropic, Gemini, OpenAI, Azure OpenAI, GitHub Copilot, xAI Grok, DeepSeek, Doubao (Volcengine), MiniMax, MiMo, Qiniu, AWS Bedrock |
|
|
325
|
+
| OpenAI-compatible endpoints | Set `provider: 'openai'` plus `baseURL` and, when needed, `apiKey`. | Ollama, vLLM, LM Studio, llama.cpp server, OpenRouter, Groq, Mistral, Moonshot (Kimi), Qwen, Zhipu |
|
|
285
326
|
| Vercel AI SDK | Import `AISdkAdapter` from `@open-multi-agent/core/ai-sdk`; install optional peer `ai` plus an `@ai-sdk/*` provider. | [Any AI SDK provider](https://ai-sdk.dev/providers) (60+ models and hosts) |
|
|
286
327
|
|
|
287
|
-
See [docs/providers.md](
|
|
328
|
+
See [docs/providers.md](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/providers.md) for env vars, model examples, local tool-calling, timeouts, and troubleshooting.
|
|
288
329
|
|
|
289
330
|
### Vercel AI SDK (optional)
|
|
290
331
|
|
|
@@ -316,11 +357,23 @@ Before going live, wire up the controls that protect token spend, recover from f
|
|
|
316
357
|
| Concern | Knob | Where it lives |
|
|
317
358
|
|---------|------|----------------|
|
|
318
359
|
| Bound the conversation | `maxTurns` per agent + `contextStrategy` (`sliding-window` / `summarize` / `compact` / `custom`) | `AgentConfig` |
|
|
360
|
+
| Bound wall-clock time | `timeoutMs` per agent (aborts a run that hangs, common with local models) | `AgentConfig` |
|
|
319
361
|
| Cap tool output | `maxToolOutputChars` (or per-tool `maxOutputChars`) + `compressToolResults: true` | `AgentConfig` and `defineTool()` |
|
|
320
362
|
| Recover from failure | Per-task `maxRetries`, `retryDelayMs`, `retryBackoff` (exponential multiplier) | Task config used via `runTasks()` |
|
|
321
363
|
| Hard-cap spend | `maxTokenBudget` on the orchestrator | `OrchestratorConfig` |
|
|
322
364
|
| Catch stuck agents | `loopDetection` with `onLoopDetected: 'terminate'` (or a custom handler) | `AgentConfig` |
|
|
323
365
|
| Trace and audit | `onTrace` to your tracing backend; persist `renderTeamRunDashboard(result)` | `OrchestratorConfig` |
|
|
366
|
+
| Redact secrets | Automatic — API keys, tokens, and Authorization headers stripped from traces, bash output, and dashboard payloads | built-in (on by default) |
|
|
367
|
+
| Bound filesystem reach | `cwd` / `defaultCwd` (default `.agent-workspace` subdir; widen with `process.cwd()`, disable with `null`) | `AgentConfig` / `OrchestratorConfig` |
|
|
368
|
+
|
|
369
|
+
## Documentation
|
|
370
|
+
|
|
371
|
+
- [Providers](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/providers.md) — env vars, model examples, local tool-calling, timeouts, troubleshooting.
|
|
372
|
+
- [Tool configuration](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/tool-configuration.md) — tool presets, custom tools, the filesystem sandbox, and MCP.
|
|
373
|
+
- [Observability](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/observability.md) — `onProgress` events, `onTrace` spans, and the post-run dashboard.
|
|
374
|
+
- [Shared memory](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/shared-memory.md) — the default store and custom `MemoryStore` backends.
|
|
375
|
+
- [Context management](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/context-management.md) — sliding window, summarization, compaction, and custom compressors.
|
|
376
|
+
- [CLI](https://github.com/open-multi-agent/open-multi-agent/blob/main/docs/cli.md) — the JSON-first `oma` binary for shell and CI.
|
|
324
377
|
|
|
325
378
|
## Contributing
|
|
326
379
|
|
|
@@ -333,7 +386,7 @@ Issues, feature requests, and PRs are welcome. Some areas where contributions wo
|
|
|
333
386
|
## Contributors
|
|
334
387
|
|
|
335
388
|
<a href="https://github.com/open-multi-agent/open-multi-agent/graphs/contributors">
|
|
336
|
-
<img src="https://contrib.rocks/image?repo=open-multi-agent/open-multi-agent&max=100&v=
|
|
389
|
+
<img src="https://contrib.rocks/image?repo=open-multi-agent/open-multi-agent&max=100&v=20260529" />
|
|
337
390
|
</a>
|
|
338
391
|
|
|
339
392
|
<details>
|
|
@@ -352,6 +405,8 @@ Issues, feature requests, and PRs are welcome. Some areas where contributions wo
|
|
|
352
405
|
- [@NamelessNATM](https://github.com/NamelessNATM) (agent delegation base implementation)
|
|
353
406
|
- [@MyPrototypeWhat](https://github.com/MyPrototypeWhat) (reasoning blocks, reasoning_effort, sampling parity, trace input/output)
|
|
354
407
|
- [@SiMinus](https://github.com/SiMinus) (streaming reasoning events)
|
|
408
|
+
- [@matthewYang08](https://github.com/matthewYang08) (OpenAI reasoning-to-text fallback)
|
|
409
|
+
- [@dvirarad](https://github.com/dvirarad) (OpenAI-family adapter hardening)
|
|
355
410
|
|
|
356
411
|
**Provider integrations**
|
|
357
412
|
|
|
@@ -362,6 +417,7 @@ Issues, feature requests, and PRs are welcome. Some areas where contributions wo
|
|
|
362
417
|
- [@Deathwing](https://github.com/Deathwing) (GitHub Copilot)
|
|
363
418
|
- [@JackChiang233](https://github.com/JackChiang233) (Qiniu)
|
|
364
419
|
- [@CodingBangboo](https://github.com/CodingBangboo) (AWS Bedrock)
|
|
420
|
+
- [@kidoom](https://github.com/kidoom) (MiMo, Doubao)
|
|
365
421
|
|
|
366
422
|
**Examples & cookbook**
|
|
367
423
|
|
|
@@ -378,25 +434,21 @@ Issues, feature requests, and PRs are welcome. Some areas where contributions wo
|
|
|
378
434
|
- [@DaiMao-UT](https://github.com/DaiMao-UT) (paper replication triage)
|
|
379
435
|
- [@oooooowoooooo](https://github.com/oooooowoooooo) (rare disease information triage)
|
|
380
436
|
- [@CodingBangboo](https://github.com/CodingBangboo) (Express customer support pipeline)
|
|
437
|
+
- [@nuthalapativarun](https://github.com/nuthalapativarun) (Doubao and Zhipu provider examples)
|
|
438
|
+
- [@goodneamtakenbydogs](https://github.com/goodneamtakenbydogs) (Moonshot and Qwen provider examples)
|
|
439
|
+
- [@suans4746-del](https://github.com/suans4746-del) (narrative puzzle hint arbitration)
|
|
440
|
+
- [@gregkonush](https://github.com/gregkonush) (Bilig WorkPaper MCP integration)
|
|
381
441
|
|
|
382
442
|
**Docs & tests**
|
|
383
443
|
|
|
384
444
|
- [@tmchow](https://github.com/tmchow) (llama.cpp docs)
|
|
385
445
|
- [@kenrogers](https://github.com/kenrogers) (OpenRouter docs)
|
|
386
446
|
- [@jadegold55](https://github.com/jadegold55) (LLM adapter test coverage)
|
|
447
|
+
- [@btroops](https://github.com/btroops) (DeepSeek tool-calling tests)
|
|
448
|
+
- [@nuthalapativarun](https://github.com/nuthalapativarun) (context-management docs)
|
|
387
449
|
|
|
388
450
|
</details>
|
|
389
451
|
|
|
390
|
-
## Star History
|
|
391
|
-
|
|
392
|
-
<a href="https://star-history.com/#open-multi-agent/open-multi-agent&Date">
|
|
393
|
-
<picture>
|
|
394
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=open-multi-agent/open-multi-agent&type=Date&theme=dark&v=20260425" />
|
|
395
|
-
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=open-multi-agent/open-multi-agent&type=Date&v=20260425" />
|
|
396
|
-
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=open-multi-agent/open-multi-agent&type=Date&v=20260425" />
|
|
397
|
-
</picture>
|
|
398
|
-
</a>
|
|
399
|
-
|
|
400
452
|
## License
|
|
401
453
|
|
|
402
454
|
MIT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,cAAc,EAEd,UAAU,EACV,WAAW,EAEX,cAAc,EACf,MAAM,aAAa,CAAA;AAEpB,OAAO,KAAK,EAAE,cAAc,IAAI,uBAAuB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,cAAc,EAEd,UAAU,EACV,WAAW,EAEX,cAAc,EACf,MAAM,aAAa,C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I;IAI9B,0DAA0D;IAC1D,QAAQ,IAAI,MAAM,EAAE;IAQpB;;;OAGG;YACW,UAAU;IAiGxB,4DAA4D;IAC5D,OAAO,CAAC,cAAc;IAqBtB;;;OAGG;YACW,wBAAwB;IAiFtC;;;OAGG;YACY,aAAa;IAwD5B,gFAAgF;IAChF,OAAO,CAAC,yBAAyB;IAgBjC;;;;;;;OAOG;IACH,OAAO,CAAC,gBAAgB;IAmBxB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,gBAAgB;IAqBxB;;;OAGG;IACH,gBAAgB,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,cAAc;CAW5D"}
|
package/dist/agent/agent.js
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
38
|
import { emitTrace, generateRunId } from '../utils/trace.js';
|
|
39
|
+
import { defaultWorkspaceDir } from '../tool/built-in/path-safety.js';
|
|
39
40
|
import { createAdapter } from '../llm/adapter.js';
|
|
40
41
|
import { AgentRunner } from './runner.js';
|
|
41
42
|
import { buildStructuredOutputInstruction, extractJSON, validateOutput, } from './structured-output.js';
|
|
@@ -139,12 +140,15 @@ export class Agent {
|
|
|
139
140
|
toolPreset: this.config.toolPreset,
|
|
140
141
|
allowedTools: this.config.tools,
|
|
141
142
|
disallowedTools: this.config.disallowedTools,
|
|
143
|
+
cwd: this.config.cwd,
|
|
142
144
|
agentName: this.name,
|
|
143
145
|
agentRole: this.config.systemPrompt?.slice(0, 50) ?? 'assistant',
|
|
144
146
|
loopDetection: this.config.loopDetection,
|
|
145
147
|
maxTokenBudget: this.config.maxTokenBudget,
|
|
146
148
|
contextStrategy: this.config.contextStrategy,
|
|
147
149
|
compressToolResults: this.config.compressToolResults,
|
|
150
|
+
preserveReasoningAsText: this.config.preserveReasoningAsText,
|
|
151
|
+
compressReasoningText: this.config.compressReasoningText,
|
|
148
152
|
};
|
|
149
153
|
this.runner = new AgentRunner(adapter, this._toolRegistry, this._toolExecutor, runnerOptions);
|
|
150
154
|
return this.runner;
|
|
@@ -554,6 +558,7 @@ export class Agent {
|
|
|
554
558
|
model: this.config.model,
|
|
555
559
|
},
|
|
556
560
|
abortSignal,
|
|
561
|
+
cwd: this.config.cwd === undefined ? defaultWorkspaceDir() : this.config.cwd,
|
|
557
562
|
};
|
|
558
563
|
}
|
|
559
564
|
}
|
package/dist/agent/agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/agent/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAYH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAG5D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAuD,MAAM,aAAa,CAAA;AAC9F,OAAO,EACL,gCAAgC,EAChC,WAAW,EACX,cAAc,GACf,MAAM,wBAAwB,CAAA;AAE/B,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,MAAM,UAAU,GAAe,EAAE,YAAY,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAA;AAEpE;;;GAGG;AACH,SAAS,iBAAiB,CAAC,CAAc,EAAE,CAAc;IACvD,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAA;IACxC,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QAAC,OAAO,UAAU,CAAC,MAAM,CAAA;IAAC,CAAC;IAC5E,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;IACtC,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA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AAC,YAAY,EAAE,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,WAAW;gBAC3D,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;aACzB;YACD,WAAW;YACX,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG;SAC7E,CAAA;IACH,CAAC;CACF"}
|
package/dist/agent/runner.d.ts
CHANGED
|
@@ -87,6 +87,12 @@ export interface RunnerOptions {
|
|
|
87
87
|
readonly toolPreset?: 'readonly' | 'readwrite' | 'full';
|
|
88
88
|
readonly allowedTools?: readonly string[];
|
|
89
89
|
readonly disallowedTools?: readonly string[];
|
|
90
|
+
/**
|
|
91
|
+
* Root directory passed to built-in filesystem tools via `ToolUseContext.cwd`.
|
|
92
|
+
* `null` disables the sandbox; `undefined` falls back to
|
|
93
|
+
* `<process.cwd()>/.agent-workspace`.
|
|
94
|
+
*/
|
|
95
|
+
readonly cwd?: string | null;
|
|
90
96
|
/** Display name of the agent driving this runner (used in tool context). */
|
|
91
97
|
readonly agentName?: string;
|
|
92
98
|
/** Short role description of the agent (used in tool context). */
|
|
@@ -104,6 +110,12 @@ export interface RunnerOptions {
|
|
|
104
110
|
readonly compressToolResults?: boolean | {
|
|
105
111
|
readonly minChars?: number;
|
|
106
112
|
};
|
|
113
|
+
/** See {@link AgentConfig.preserveReasoningAsText}. */
|
|
114
|
+
readonly preserveReasoningAsText?: boolean;
|
|
115
|
+
/** See {@link AgentConfig.compressReasoningText}. */
|
|
116
|
+
readonly compressReasoningText?: boolean | {
|
|
117
|
+
readonly minChars?: number;
|
|
118
|
+
};
|
|
107
119
|
}
|
|
108
120
|
/**
|
|
109
121
|
* Per-call callbacks for observing tool execution in real time.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/agent/runner.ts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,CAAC,gBAAgB;CAYzB"}
|
package/dist/agent/runner.js
CHANGED
|
@@ -15,6 +15,8 @@ import { TokenBudgetExceededError } from '../errors.js';
|
|
|
15
15
|
import { LoopDetector } from './loop-detector.js';
|
|
16
16
|
import { emitTrace } from '../utils/trace.js';
|
|
17
17
|
import { estimateTokens } from '../utils/tokens.js';
|
|
18
|
+
import { redactSensitiveObject, redactSensitiveText } from '../utils/redaction.js';
|
|
19
|
+
import { defaultWorkspaceDir } from '../tool/built-in/path-safety.js';
|
|
18
20
|
// ---------------------------------------------------------------------------
|
|
19
21
|
// Tool presets
|
|
20
22
|
// ---------------------------------------------------------------------------
|
|
@@ -138,6 +140,15 @@ function prependSyntheticPrefixToFirstUser(messages, prefix) {
|
|
|
138
140
|
};
|
|
139
141
|
return [...messages.slice(0, userIdx), merged, ...messages.slice(userIdx + 1)];
|
|
140
142
|
}
|
|
143
|
+
function loopWarningText(kind) {
|
|
144
|
+
return kind === 'text_repetition'
|
|
145
|
+
? 'WARNING: You appear to be generating the same response repeatedly. ' +
|
|
146
|
+
'This suggests you are stuck in a loop. Please try a different approach ' +
|
|
147
|
+
'or provide new information.'
|
|
148
|
+
: 'WARNING: You appear to be repeating the same tool calls with identical arguments. ' +
|
|
149
|
+
'This suggests you are stuck in a loop. Please try a different approach, use different ' +
|
|
150
|
+
'parameters, or explain what you are trying to accomplish.';
|
|
151
|
+
}
|
|
141
152
|
// ---------------------------------------------------------------------------
|
|
142
153
|
// AgentRunner
|
|
143
154
|
// ---------------------------------------------------------------------------
|
|
@@ -434,6 +445,8 @@ export class AgentRunner {
|
|
|
434
445
|
presencePenalty: this.options.presencePenalty,
|
|
435
446
|
extraBody: this.options.extraBody,
|
|
436
447
|
thinking: this.options.thinking,
|
|
448
|
+
preserveReasoningAsText: this.options.preserveReasoningAsText,
|
|
449
|
+
compressReasoningText: this.options.compressReasoningText,
|
|
437
450
|
systemPrompt: this.options.systemPrompt,
|
|
438
451
|
abortSignal: effectiveAbortSignal,
|
|
439
452
|
};
|
|
@@ -441,6 +454,20 @@ export class AgentRunner {
|
|
|
441
454
|
const detector = this.options.loopDetection
|
|
442
455
|
? new LoopDetector(this.options.loopDetection)
|
|
443
456
|
: null;
|
|
457
|
+
if (detector !== null) {
|
|
458
|
+
for (const message of conversationMessages) {
|
|
459
|
+
if (message.role !== 'assistant')
|
|
460
|
+
continue;
|
|
461
|
+
const historicalToolUseBlocks = extractToolUseBlocks(message.content);
|
|
462
|
+
if (historicalToolUseBlocks.length > 0) {
|
|
463
|
+
detector.recordToolCalls(historicalToolUseBlocks);
|
|
464
|
+
}
|
|
465
|
+
const historicalText = extractText(message.content);
|
|
466
|
+
if (historicalText.length > 0) {
|
|
467
|
+
detector.recordText(historicalText);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
444
471
|
let loopDetected = false;
|
|
445
472
|
let loopWarned = false;
|
|
446
473
|
const loopAction = this.options.loopDetection?.onLoopDetected ?? 'warn';
|
|
@@ -529,8 +556,10 @@ export class AgentRunner {
|
|
|
529
556
|
// ------------------------------------------------------------------
|
|
530
557
|
let injectWarning = false;
|
|
531
558
|
let injectWarningKind = 'tool_repetition';
|
|
532
|
-
if (detector
|
|
533
|
-
const toolInfo =
|
|
559
|
+
if (detector) {
|
|
560
|
+
const toolInfo = toolUseBlocks.length > 0
|
|
561
|
+
? detector.recordToolCalls(toolUseBlocks)
|
|
562
|
+
: null;
|
|
534
563
|
const textInfo = turnText.length > 0 ? detector.recordText(turnText) : null;
|
|
535
564
|
const info = toolInfo ?? textInfo;
|
|
536
565
|
if (info) {
|
|
@@ -568,6 +597,19 @@ export class AgentRunner {
|
|
|
568
597
|
// Step 3: Decide whether to continue looping.
|
|
569
598
|
// ------------------------------------------------------------------
|
|
570
599
|
if (toolUseBlocks.length === 0) {
|
|
600
|
+
if (pendingBudgetExceeded) {
|
|
601
|
+
break;
|
|
602
|
+
}
|
|
603
|
+
if (injectWarning) {
|
|
604
|
+
const warningMessage = {
|
|
605
|
+
role: 'user',
|
|
606
|
+
content: [{ type: 'text', text: loopWarningText(injectWarningKind) }],
|
|
607
|
+
};
|
|
608
|
+
conversationMessages.push(warningMessage);
|
|
609
|
+
newMessages.push(warningMessage);
|
|
610
|
+
options.onMessage?.(warningMessage);
|
|
611
|
+
continue;
|
|
612
|
+
}
|
|
571
613
|
// Warn on first turn if tools were provided but model didn't use them.
|
|
572
614
|
if (turns === 1 && toolDefs.length > 0 && options.onWarning) {
|
|
573
615
|
const agentName = this.options.agentName ?? 'unknown';
|
|
@@ -614,8 +656,8 @@ export class AgentRunner {
|
|
|
614
656
|
agent: options.traceAgent ?? this.options.agentName ?? 'unknown',
|
|
615
657
|
tool: block.name,
|
|
616
658
|
isError: result.isError ?? false,
|
|
617
|
-
input: block.input,
|
|
618
|
-
output: result.data,
|
|
659
|
+
input: redactSensitiveObject(block.input),
|
|
660
|
+
output: redactSensitiveText(result.data),
|
|
619
661
|
startMs: startTime,
|
|
620
662
|
endMs: endTime,
|
|
621
663
|
durationMs: duration,
|
|
@@ -667,14 +709,7 @@ export class AgentRunner {
|
|
|
667
709
|
// the LLM sees it alongside the results (avoids two consecutive user
|
|
668
710
|
// messages which violates the alternating-role constraint).
|
|
669
711
|
if (injectWarning) {
|
|
670
|
-
|
|
671
|
-
? 'WARNING: You appear to be generating the same response repeatedly. ' +
|
|
672
|
-
'This suggests you are stuck in a loop. Please try a different approach ' +
|
|
673
|
-
'or provide new information.'
|
|
674
|
-
: 'WARNING: You appear to be repeating the same tool calls with identical arguments. ' +
|
|
675
|
-
'This suggests you are stuck in a loop. Please try a different approach, use different ' +
|
|
676
|
-
'parameters, or explain what you are trying to accomplish.';
|
|
677
|
-
toolResultBlocks.push({ type: 'text', text: warningText });
|
|
712
|
+
toolResultBlocks.push({ type: 'text', text: loopWarningText(injectWarningKind) });
|
|
678
713
|
}
|
|
679
714
|
const toolResultMessage = {
|
|
680
715
|
role: 'user',
|
|
@@ -943,6 +978,7 @@ export class AgentRunner {
|
|
|
943
978
|
model: this.options.model,
|
|
944
979
|
},
|
|
945
980
|
abortSignal: options.abortSignal ?? this.options.abortSignal,
|
|
981
|
+
cwd: this.options.cwd === undefined ? defaultWorkspaceDir() : this.options.cwd,
|
|
946
982
|
...(options.team !== undefined ? { team: options.team } : {}),
|
|
947
983
|
};
|
|
948
984
|
}
|