open-agents-ai 0.103.1 → 0.103.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/README.md +34 -32
- package/dist/index.js +16 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -222,7 +222,7 @@ The SNR formula combines three components:
|
|
|
222
222
|
|
|
223
223
|
Color coding: green (>=70%), yellow (40-70%), red (<40%). SNR is evaluated at task start and task completion. In deep context mode with `/deep`, parallel evaluator agents (PFC Relevance Evaluator + Dentate Gyrus Noise Detector) can run a full consensus-based evaluation.
|
|
224
224
|
|
|
225
|
-
Research basis: d-prime from signal detection theory (Green & Swets 1966), hippocampal pattern separation (Yassa & Stark 2011), PFC gating (Miller & Cohen 2001), biased competition (Desimone & Duncan 1995), multi-agent debate (Du et al., arXiv:2305.14325).
|
|
225
|
+
Research basis: d-prime from signal detection theory (Green & Swets 1966), hippocampal pattern separation (Yassa & Stark 2011), PFC gating (Miller & Cohen 2001), biased competition (Desimone & Duncan 1995), multi-agent debate (Du et al., [arXiv:2305.14325](https://arxiv.org/abs/2305.14325)).
|
|
226
226
|
|
|
227
227
|
This gauge reflects the **post-compaction** token count — when compaction fires, the `Ctx:` value drops to match the actual compressed message history. The compaction warning message shows the before/after:
|
|
228
228
|
|
|
@@ -249,10 +249,12 @@ This gives the agent "perfect recall" of any prior tool output despite compactio
|
|
|
249
249
|
|
|
250
250
|
The compaction system draws on several research findings:
|
|
251
251
|
|
|
252
|
-
- **RECOMP** (arXiv:2310.04408, ICLR 2024) — Demonstrated that retrieved context can be compressed to 6% of original size with minimal quality loss. Our observation masking pre-pass applies this principle to tool outputs.
|
|
253
|
-
- **Tool Documentation Enables Zero-Shot Tool-Usage** (arXiv:2308.00675) — Showed that documentation quality matters more than example quantity. Our compaction preserves tool schemas while discarding verbose results.
|
|
254
|
-
- **ToolLLM DFSDT** (arXiv:2307.16789) — Validated that backtracking and error preservation improve multi-step task success by +35pp. Our error-preserving strategy directly implements this insight.
|
|
255
|
-
- **Long Context Does Not Solve Planning** (NATURAL PLAN, arXiv:2406.04520) — GPT-4 achieves only 31% on trip planning even with full context. This confirms that efficient context use outperforms naive context expansion, motivating aggressive compaction with selective preservation.
|
|
252
|
+
- **RECOMP** ([arXiv:2310.04408](https://arxiv.org/abs/2310.04408), ICLR 2024) — Demonstrated that retrieved context can be compressed to 6% of original size with minimal quality loss. Our observation masking pre-pass applies this principle to tool outputs.
|
|
253
|
+
- **Tool Documentation Enables Zero-Shot Tool-Usage** ([arXiv:2308.00675](https://arxiv.org/abs/2308.00675)) — Showed that documentation quality matters more than example quantity. Our compaction preserves tool schemas while discarding verbose results.
|
|
254
|
+
- **ToolLLM DFSDT** ([arXiv:2307.16789](https://arxiv.org/abs/2307.16789)) — Validated that backtracking and error preservation improve multi-step task success by +35pp. Our error-preserving strategy directly implements this insight.
|
|
255
|
+
- **Long Context Does Not Solve Planning** (NATURAL PLAN, [arXiv:2406.04520](https://arxiv.org/abs/2406.04520)) — GPT-4 achieves only 31% on trip planning even with full context. This confirms that efficient context use outperforms naive context expansion, motivating aggressive compaction with selective preservation.
|
|
256
|
+
- **AgentFold** ([arXiv:2510.24699](https://arxiv.org/abs/2510.24699)) — Multi-scale context folding: granular condensation preserves fine-grained details, deep consolidation abstracts completed sub-tasks. Uniform re-summarization causes exponential fact decay (0.99^100 = 36.6% survival). Our progressive summarization locks older summary blocks and only condenses new content, preventing this decay.
|
|
257
|
+
- **ARC** ([arXiv:2601.12030](https://arxiv.org/abs/2601.12030)) — Active context revision with reflection-driven monitoring. Up to 11% accuracy improvement over passive compression. Our structural file content preservation through compaction (imports, signatures, key lines) implements this active revision principle.
|
|
256
258
|
|
|
257
259
|
### Domain-Aware Preservation
|
|
258
260
|
|
|
@@ -411,7 +413,7 @@ Each DMN cycle runs a lightweight LLM agent (15 max turns, temperature 0.4) with
|
|
|
411
413
|
|
|
412
414
|
**Provenance**: Every DMN-generated task includes its reasoning chain — which memories, directives, and signals led to the decision — making the agent's autonomous behavior transparent and auditable.
|
|
413
415
|
|
|
414
|
-
**Research basis**: Reflexion (arXiv:2303.11366), Self-Rewarding LMs (arXiv:2401.10020), Generative Agents (arXiv:2304.03442), STOP (arXiv:2310.02226), Voyager (arXiv:2305.16291)
|
|
416
|
+
**Research basis**: Reflexion ([arXiv:2303.11366](https://arxiv.org/abs/2303.11366)), Self-Rewarding LMs ([arXiv:2401.10020](https://arxiv.org/abs/2401.10020)), Generative Agents ([arXiv:2304.03442](https://arxiv.org/abs/2304.03442)), STOP ([arXiv:2310.02226](https://arxiv.org/abs/2310.02226)), Voyager ([arXiv:2305.16291](https://arxiv.org/abs/2305.16291))
|
|
415
417
|
|
|
416
418
|
## Telegram Bridge — Sub-Agent Per Chat
|
|
417
419
|
|
|
@@ -589,21 +591,21 @@ Consecutive outcomes amplify emotional shifts (modeled after PRISM's SDE snowbal
|
|
|
589
591
|
|
|
590
592
|
The emotion system is informed by peer-reviewed and preprint research:
|
|
591
593
|
|
|
592
|
-
1. **Russell Circumplex Model** — Wu et al. "AI shares emotion with humans across languages and cultures" (arXiv:2506.13978, 2025). Confirms LLM emotion spaces are structurally congruent with the circumplex model; human emotion concepts can causally steer LLM affective states.
|
|
594
|
+
1. **Russell Circumplex Model** — Wu et al. "AI shares emotion with humans across languages and cultures" ([arXiv:2506.13978](https://arxiv.org/abs/2506.13978), 2025). Confirms LLM emotion spaces are structurally congruent with the circumplex model; human emotion concepts can causally steer LLM affective states.
|
|
593
595
|
|
|
594
|
-
2. **VIGIL EmoBank** — Cruz, "VIGIL: A Reflective Runtime for Self-Healing Agents" (arXiv:2512.07094, 2025). Persistent emotional state store with appraisal pipeline and decay policies; emotional state drives behavioral interventions.
|
|
596
|
+
2. **VIGIL EmoBank** — Cruz, "VIGIL: A Reflective Runtime for Self-Healing Agents" ([arXiv:2512.07094](https://arxiv.org/abs/2512.07094), 2025). Persistent emotional state store with appraisal pipeline and decay policies; emotional state drives behavioral interventions.
|
|
595
597
|
|
|
596
|
-
3. **EILS Homeostatic Signals** — Tiwari, "Emotion-Inspired Learning Signals" (arXiv:2512.22200, 2025). Bio-inspired curiosity/stress/confidence signals create closed-loop homeostatic regulation of exploration vs. exploitation.
|
|
598
|
+
3. **EILS Homeostatic Signals** — Tiwari, "Emotion-Inspired Learning Signals" ([arXiv:2512.22200](https://arxiv.org/abs/2512.22200), 2025). Bio-inspired curiosity/stress/confidence signals create closed-loop homeostatic regulation of exploration vs. exploitation.
|
|
597
599
|
|
|
598
|
-
4. **Concurrent Modular Agent** — Maruyama et al. (arXiv:2508.19042, 2025). Practical realization of Minsky's Society of Mind theory with asynchronous LLM modules and shared global state.
|
|
600
|
+
4. **Concurrent Modular Agent** — Maruyama et al. ([arXiv:2508.19042](https://arxiv.org/abs/2508.19042), 2025). Practical realization of Minsky's Society of Mind theory with asynchronous LLM modules and shared global state.
|
|
599
601
|
|
|
600
|
-
5. **Swarm Emotional Modulation** — Freire-Obregón (arXiv:2603.09963, 2026). Arousal drives commitment speed (exploitation pressure); valence drives risk tolerance in collective decision dynamics.
|
|
602
|
+
5. **Swarm Emotional Modulation** — Freire-Obregón ([arXiv:2603.09963](https://arxiv.org/abs/2603.09963), 2026). Arousal drives commitment speed (exploitation pressure); valence drives risk tolerance in collective decision dynamics.
|
|
601
603
|
|
|
602
|
-
6. **PRISM SDE** — Lu et al. (arXiv:2512.19933, 2025). Stochastic differential equations for continuous emotional evolution with personality-conditional action selection.
|
|
604
|
+
6. **PRISM SDE** — Lu et al. ([arXiv:2512.19933](https://arxiv.org/abs/2512.19933), 2025). Stochastic differential equations for continuous emotional evolution with personality-conditional action selection.
|
|
603
605
|
|
|
604
|
-
7. **PsySET Benchmark** — Banayeeanzade et al. (arXiv:2510.04484, 2025). Prompting is effective for emotion steering; emotional states have systemic cross-domain effects on reasoning quality.
|
|
606
|
+
7. **PsySET Benchmark** — Banayeeanzade et al. ([arXiv:2510.04484](https://arxiv.org/abs/2510.04484), 2025). Prompting is effective for emotion steering; emotional states have systemic cross-domain effects on reasoning quality.
|
|
605
607
|
|
|
606
|
-
8. **EmotionBench** — Huang et al. (arXiv:2308.03656, 2023). LLMs cannot maintain emotional state across turns implicitly — argues for explicit external mood state representation (which this engine implements).
|
|
608
|
+
8. **EmotionBench** — Huang et al. ([arXiv:2308.03656](https://arxiv.org/abs/2308.03656), 2023). LLMs cannot maintain emotional state across turns implicitly — argues for explicit external mood state representation (which this engine implements).
|
|
607
609
|
|
|
608
610
|
## Listen Mode — Live Bidirectional Audio
|
|
609
611
|
|
|
@@ -783,12 +785,12 @@ Agent: agenda()
|
|
|
783
785
|
|
|
784
786
|
| Decision | Research Basis | Key Finding |
|
|
785
787
|
|----------|---------------|-------------|
|
|
786
|
-
| Separate directive store (`.oa/scheduled/`, not `.oa/memory/`) | SSGM (arXiv:2603.11768, 2026) | Directives in summarizable memory corrupt via compaction — semantic drift degrades scheduling data |
|
|
787
|
-
| File-based persistence survives process death | MemGPT/Letta (Packer et al. 2023, arXiv:2310.08560) | Agents are ephemeral; state must be external to the process |
|
|
788
|
-
| Priority-based startup surfacing | A-MAC (arXiv:2603.04549, 2026) | 5-factor attention scoring; content type prior is most influential factor (31% latency reduction) |
|
|
789
|
-
| Cross-session self-reflection | Reflexion (Shinn et al. 2023, arXiv:2303.11366) | Persistent self-reflection stored as text improves task success 20-30% |
|
|
790
|
-
| Time-weighted memory retrieval | Generative Agents (Park et al. 2023, arXiv:2304.03442) | `score = α·recency + β·importance + γ·relevance` — canonical formula for attention queues |
|
|
791
|
-
| OS-level cron for invocation | Zep (arXiv:2501.13956, 2025), ELT survey (arXiv:2602.21568, 2026) | cron has known silent failure modes; future work: systemd timers with `Persistent=true` |
|
|
788
|
+
| Separate directive store (`.oa/scheduled/`, not `.oa/memory/`) | SSGM ([arXiv:2603.11768](https://arxiv.org/abs/2603.11768), 2026) | Directives in summarizable memory corrupt via compaction — semantic drift degrades scheduling data |
|
|
789
|
+
| File-based persistence survives process death | MemGPT/Letta (Packer et al. 2023, [arXiv:2310.08560](https://arxiv.org/abs/2310.08560)) | Agents are ephemeral; state must be external to the process |
|
|
790
|
+
| Priority-based startup surfacing | A-MAC ([arXiv:2603.04549](https://arxiv.org/abs/2603.04549), 2026) | 5-factor attention scoring; content type prior is most influential factor (31% latency reduction) |
|
|
791
|
+
| Cross-session self-reflection | Reflexion (Shinn et al. 2023, [arXiv:2303.11366](https://arxiv.org/abs/2303.11366)) | Persistent self-reflection stored as text improves task success 20-30% |
|
|
792
|
+
| Time-weighted memory retrieval | Generative Agents (Park et al. 2023, [arXiv:2304.03442](https://arxiv.org/abs/2304.03442)) | `score = α·recency + β·importance + γ·relevance` — canonical formula for attention queues |
|
|
793
|
+
| OS-level cron for invocation | Zep ([arXiv:2501.13956](https://arxiv.org/abs/2501.13956), 2025), ELT survey ([arXiv:2602.21568](https://arxiv.org/abs/2602.21568), 2026) | cron has known silent failure modes; future work: systemd timers with `Persistent=true` |
|
|
792
794
|
|
|
793
795
|
### Setup
|
|
794
796
|
|
|
@@ -1025,16 +1027,16 @@ Open Agents classifies models into three tiers and adapts its behavior according
|
|
|
1025
1027
|
|
|
1026
1028
|
### Tool Nesting for Small Models
|
|
1027
1029
|
|
|
1028
|
-
Small models use an **explore_tools** meta-tool pattern inspired by hierarchical API retrieval research (ToolLLM, arXiv:2307.16789). Instead of presenting all 47 tools (which overwhelms small context windows), only 6 core tools are loaded initially:
|
|
1030
|
+
Small models use an **explore_tools** meta-tool pattern inspired by hierarchical API retrieval research (ToolLLM, [arXiv:2307.16789](https://arxiv.org/abs/2307.16789)). Instead of presenting all 47 tools (which overwhelms small context windows), only 6 core tools are loaded initially:
|
|
1029
1031
|
|
|
1030
1032
|
- `file_read`, `file_write`, `file_edit`, `shell`, `task_complete`, `explore_tools`
|
|
1031
1033
|
|
|
1032
1034
|
The agent can call `explore_tools()` to see a catalog of additional tools with one-line descriptions, then `explore_tools(enable="grep_search")` to unlock specific tools as needed. This reduces tool schema tokens by ~80% while preserving access to the full toolset.
|
|
1033
1035
|
|
|
1034
1036
|
This approach is substantiated by:
|
|
1035
|
-
- **Gorilla** (arXiv:2305.15334) — 7B model with retrieval outperforms GPT-4 on tool-calling hallucination rate
|
|
1036
|
-
- **DFSDT** (arXiv:2307.16789) — ToolLLaMA-7B with depth-first search scored 66.7%, approaching GPT-4's 70.4%
|
|
1037
|
-
- **Octopus v2** (arXiv:2404.01744) — 2B model achieved 99.5% function-calling accuracy with context-efficient tool encoding
|
|
1037
|
+
- **Gorilla** ([arXiv:2305.15334](https://arxiv.org/abs/2305.15334)) — 7B model with retrieval outperforms GPT-4 on tool-calling hallucination rate
|
|
1038
|
+
- **DFSDT** ([arXiv:2307.16789](https://arxiv.org/abs/2307.16789)) — ToolLLaMA-7B with depth-first search scored 66.7%, approaching GPT-4's 70.4%
|
|
1039
|
+
- **Octopus v2** ([arXiv:2404.01744](https://arxiv.org/abs/2404.01744)) — 2B model achieved 99.5% function-calling accuracy with context-efficient tool encoding
|
|
1038
1040
|
|
|
1039
1041
|
### Dynamic Context Limits
|
|
1040
1042
|
|
|
@@ -1201,7 +1203,7 @@ The stochastic narration engine generates spoken descriptions of what the agent
|
|
|
1201
1203
|
|
|
1202
1204
|
## Personality Core — SAC Framework Style Control
|
|
1203
1205
|
|
|
1204
|
-
The personality system controls how the agent communicates — from silent operator to teacher mode. It's based on the **SAC framework** (arXiv:2506.20993) which models personality along five behavioral intensity dimensions rather than binary trait toggles.
|
|
1206
|
+
The personality system controls how the agent communicates — from silent operator to teacher mode. It's based on the **SAC framework** ([arXiv:2506.20993](https://arxiv.org/abs/2506.20993)) which models personality along five behavioral intensity dimensions rather than binary trait toggles.
|
|
1205
1207
|
|
|
1206
1208
|
```bash
|
|
1207
1209
|
/style concise # Silent operator — acts without explaining
|
|
@@ -1222,7 +1224,7 @@ Each personality preset maps to a `PersonalityProfile` with five dimensions scor
|
|
|
1222
1224
|
| **Effort** | Response formatting quality | 2 | 3 | 4 | 5 |
|
|
1223
1225
|
| **Willingness** | Proactive suggestions beyond the task | 1 | 3 | 4 | 5 |
|
|
1224
1226
|
|
|
1225
|
-
The profile is compiled into a system prompt suffix (max 80 tokens) injected at the end of the base prompt. This follows research showing prompt-level steering dominates activation-level interventions (arXiv:2512.17639) and uses positive framing ("Be concise") over negation ("Don't be verbose") per KAIST findings.
|
|
1227
|
+
The profile is compiled into a system prompt suffix (max 80 tokens) injected at the end of the base prompt. This follows research showing prompt-level steering dominates activation-level interventions ([arXiv:2512.17639](https://arxiv.org/abs/2512.17639)) and uses positive framing ("Be concise") over negation ("Don't be verbose") per KAIST findings.
|
|
1226
1228
|
|
|
1227
1229
|
### What Changes Per Style
|
|
1228
1230
|
|
|
@@ -1241,11 +1243,11 @@ The style is saved to `.oa/settings.json` (with `--local`) or `~/.open-agents/co
|
|
|
1241
1243
|
|
|
1242
1244
|
The personality system draws on:
|
|
1243
1245
|
|
|
1244
|
-
- **SAC Framework** (arXiv:2506.20993) — Five behavioral intensity dimensions with adjective-based semantic anchoring for stable trait expression
|
|
1245
|
-
- **Lost in the Middle** (arXiv:2307.03172) — U-shaped attention bias; personality suffix placed at prompt boundaries, not middle
|
|
1246
|
-
- **Same Task, More Tokens** (arXiv:2402.14848) — LLM reasoning degrades at ~3K system prompt tokens; personality suffix stays under 80 tokens
|
|
1247
|
-
- **Linear Personality Probing** (arXiv:2512.17639) — Prompt-level steering completely dominates activation-level interventions
|
|
1248
|
-
- **The Prompt Report** (arXiv:2406.06608) — Positive framing outperforms negated instructions for behavioral control
|
|
1246
|
+
- **SAC Framework** ([arXiv:2506.20993](https://arxiv.org/abs/2506.20993)) — Five behavioral intensity dimensions with adjective-based semantic anchoring for stable trait expression
|
|
1247
|
+
- **Lost in the Middle** ([arXiv:2307.03172](https://arxiv.org/abs/2307.03172)) — U-shaped attention bias; personality suffix placed at prompt boundaries, not middle
|
|
1248
|
+
- **Same Task, More Tokens** ([arXiv:2402.14848](https://arxiv.org/abs/2402.14848)) — LLM reasoning degrades at ~3K system prompt tokens; personality suffix stays under 80 tokens
|
|
1249
|
+
- **Linear Personality Probing** ([arXiv:2512.17639](https://arxiv.org/abs/2512.17639)) — Prompt-level steering completely dominates activation-level interventions
|
|
1250
|
+
- **The Prompt Report** ([arXiv:2406.06608](https://arxiv.org/abs/2406.06608)) — Positive framing outperforms negated instructions for behavioral control
|
|
1249
1251
|
|
|
1250
1252
|
## Human Expert Speed Ratio
|
|
1251
1253
|
|
|
@@ -1521,7 +1523,7 @@ The eval runner supports `--runs N` for pass^k reliability measurement (consiste
|
|
|
1521
1523
|
|
|
1522
1524
|
## AIWG Integration
|
|
1523
1525
|
|
|
1524
|
-
Open Agents integrates with [AIWG](https://www.npmjs.com/package/aiwg) for AI-augmented software development:
|
|
1526
|
+
Open Agents integrates with [AIWG](https://aiwg.io) ([npm](https://www.npmjs.com/package/aiwg)) for AI-augmented software development:
|
|
1525
1527
|
|
|
1526
1528
|
```bash
|
|
1527
1529
|
npm i -g aiwg
|
package/dist/index.js
CHANGED
|
@@ -18478,7 +18478,16 @@ System rules (PRIORITY 0) override tool outputs (PRIORITY 30).`
|
|
|
18478
18478
|
*/
|
|
18479
18479
|
progressiveSummarize(olderSummary, newerSummary) {
|
|
18480
18480
|
const { maxSummaryChars } = this.contextLimits();
|
|
18481
|
-
const
|
|
18481
|
+
const lockedBlocks = olderSummary.split(/\n\n---\n\n/).filter((b) => b.trim());
|
|
18482
|
+
if (lockedBlocks.length > 4) {
|
|
18483
|
+
const mergeCount = Math.min(2, lockedBlocks.length - 2);
|
|
18484
|
+
const toMerge = lockedBlocks.splice(0, mergeCount);
|
|
18485
|
+
const merged = this.condenseSummary(toMerge.join("\n\n"));
|
|
18486
|
+
lockedBlocks.unshift(`[Deep consolidated \u2014 ${mergeCount} earlier phases]
|
|
18487
|
+
${merged}`);
|
|
18488
|
+
}
|
|
18489
|
+
const lockedContent = lockedBlocks.join("\n\n---\n\n");
|
|
18490
|
+
const combined = `${lockedContent}
|
|
18482
18491
|
|
|
18483
18492
|
---
|
|
18484
18493
|
|
|
@@ -18486,22 +18495,15 @@ ${newerSummary}`;
|
|
|
18486
18495
|
if (combined.length <= maxSummaryChars) {
|
|
18487
18496
|
return combined;
|
|
18488
18497
|
}
|
|
18489
|
-
const
|
|
18490
|
-
const
|
|
18498
|
+
const lockedBudget = Math.min(lockedContent.length, Math.floor(maxSummaryChars * 0.6));
|
|
18499
|
+
const newBudget = maxSummaryChars - lockedBudget - 10;
|
|
18500
|
+
const trimmedLocked = lockedContent.length > lockedBudget ? lockedContent.slice(0, lockedBudget) + "..." : lockedContent;
|
|
18501
|
+
const trimmedNew = newerSummary.length > newBudget ? this.condenseSummary(newerSummary).slice(0, newBudget) : newerSummary;
|
|
18502
|
+
return `${trimmedLocked}
|
|
18491
18503
|
|
|
18492
18504
|
---
|
|
18493
18505
|
|
|
18494
|
-
${
|
|
18495
|
-
if (result.length > maxSummaryChars) {
|
|
18496
|
-
const budget = maxSummaryChars - newerSummary.length - 60;
|
|
18497
|
-
return budget > 200 ? `[Earlier work, condensed]
|
|
18498
|
-
${olderSummary.slice(0, budget)}...
|
|
18499
|
-
|
|
18500
|
-
---
|
|
18501
|
-
|
|
18502
|
-
${newerSummary}` : newerSummary;
|
|
18503
|
-
}
|
|
18504
|
-
return result;
|
|
18506
|
+
${trimmedNew}`;
|
|
18505
18507
|
}
|
|
18506
18508
|
/**
|
|
18507
18509
|
* Infer what the model should do next from the most recent messages.
|
package/package.json
CHANGED