open-agents-ai 0.34.1 → 0.34.3

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.
Files changed (3) hide show
  1. package/README.md +73 -17
  2. package/dist/index.js +134 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -29,7 +29,7 @@ An autonomous multi-turn tool-calling agent that reads your code, makes changes,
29
29
 
30
30
  ## Features
31
31
 
32
- - **35+ autonomous tools** — file I/O, shell, grep, web search/fetch/crawl, memory, sub-agents, background tasks, image/OCR, git, diagnostics, vision, desktop automation, structured files, code sandbox
32
+ - **47 autonomous tools** — file I/O, shell, grep, web search/fetch/crawl, memory (read/write/search), sub-agents, background tasks, image/OCR/PDF, git, diagnostics, vision, desktop automation, structured files, code sandbox, transcription, skills
33
33
  - **Moondream vision** — see and interact with the desktop via Moondream VLM (caption, query, detect, point-and-click)
34
34
  - **Desktop automation** — vision-guided clicking: describe a UI element in natural language, the agent finds and clicks it
35
35
  - **Auto-install desktop deps** — screenshot, mouse, OCR, and image tools auto-install missing system packages (scrot, xdotool, tesseract, imagemagick) on first use
@@ -39,6 +39,7 @@ An autonomous multi-turn tool-calling agent that reads your code, makes changes,
39
39
  - **Dream Mode** — creative idle exploration modeled after real sleep architecture (NREM→REM cycles)
40
40
  - **Live Listen** — bidirectional voice communication with real-time Whisper transcription
41
41
  - **Neural TTS** — hear what the agent is doing via GLaDOS or Overwatch ONNX voices
42
+ - **Human expert speed ratio** — real-time `Exp: Nx` gauge comparing agent speed to a leading human expert, calibrated across 47 tool baselines
42
43
  - **Cost tracking** — real-time token cost estimation for 15+ cloud providers
43
44
  - **Work evaluation** — LLM-as-judge scoring with task-type-specific rubrics
44
45
  - **Session metrics** — track turns, tool calls, tokens, files modified, tasks completed per session
@@ -371,7 +372,7 @@ Launch without arguments to enter the interactive REPL:
371
372
  oa
372
373
  ```
373
374
 
374
- The TUI features an animated multilingual phrase carousel, live metrics bar with pastel-colored labels (token in/out, context window usage), rotating tips, syntax-highlighted tool output, and dynamic terminal-width cropping.
375
+ The TUI features an animated multilingual phrase carousel, live metrics bar with pastel-colored labels (token in/out, context window usage, human expert speed ratio, cost), rotating tips, syntax-highlighted tool output, and dynamic terminal-width cropping.
375
376
 
376
377
  ### Slash Commands
377
378
 
@@ -433,7 +434,7 @@ While the agent is working (shown by the `+` prompt), type to add context:
433
434
  ⎿ Edit: src/auth.ts
434
435
  ```
435
436
 
436
- ## Tools (37)
437
+ ## Tools (47)
437
438
 
438
439
  | Tool | Description |
439
440
  |------|-------------|
@@ -447,9 +448,9 @@ While the agent is working (shown by the `+` prompt), type to add context:
447
448
  | **Search & Navigation** | |
448
449
  | `grep_search` | Search file contents with regex (ripgrep with grep fallback) |
449
450
  | `find_files` | Find files by glob pattern (excludes node_modules/.git) |
450
- | `codebase_map` | High-level project structure overview with directory tree |
451
+ | `codebase_map` | High-level project structure overview with directory tree and language breakdown |
451
452
  | **Shell & Execution** | |
452
- | `shell` | Execute any shell command (non-interactive, CI=true) |
453
+ | `shell` | Execute any shell command (non-interactive, CI=true, sudo support) |
453
454
  | `code_sandbox` | Isolated code execution (JS, Python, Bash, TS) in subprocess or Docker |
454
455
  | `background_run` | Run shell command in background, returns task ID |
455
456
  | `task_status` | Check background task status |
@@ -461,26 +462,34 @@ While the agent is working (shown by the `+` prompt), type to add context:
461
462
  | `web_crawl` | Multi-page web scraping with Crawlee/Playwright for deep documentation |
462
463
  | **Structured Data** | |
463
464
  | `structured_file` | Generate CSV, TSV, JSON, Markdown tables, Excel-compatible files |
464
- | `read_structured_file` | Parse CSV, TSV, JSON, Markdown tables with binary detection |
465
+ | `structured_read` | Parse CSV, TSV, JSON, Markdown tables with binary format detection |
465
466
  | **Vision & Desktop** | |
466
467
  | `vision` | Moondream VLM — caption, query, detect, point on any image |
467
468
  | `desktop_click` | Vision-guided clicking: describe a UI element, agent finds and clicks it |
468
469
  | `desktop_describe` | Screenshot + Moondream caption/query for desktop awareness |
469
- | `image_read` | Read images (base64 + OCR) |
470
+ | `image_read` | Read images (base64 + OCR metadata) |
470
471
  | `screenshot` | Capture screen/window/active window |
471
472
  | `ocr` | Extract text from images (Tesseract with multi-variant preprocessing) |
473
+ | `ocr_image_advanced` | Advanced multi-variant OCR pipeline with preprocessing, multi-PSM, and confidence scoring |
472
474
  | `ocr_pdf` | Add searchable text layer to scanned/image PDFs |
473
- | `pdf_to_text` | Extract text from PDF using pdftotext (Poppler) |
474
- | `transcribe_file` | Transcribe audio/video to text (Whisper) |
475
+ | `pdf_to_text` | Extract text from PDF using pdftotext (Poppler) with OCR fallback |
476
+ | **Transcription** | |
477
+ | `transcribe_file` | Transcribe local audio/video files to text (Whisper) |
478
+ | `transcribe_url` | Download and transcribe audio/video from URLs |
475
479
  | **Memory & Knowledge** | |
476
- | `memory_read` | Read from persistent memory store by topic |
480
+ | `memory_read` | Read from persistent memory store by topic and key |
477
481
  | `memory_write` | Store facts/patterns in persistent memory with provenance tracking |
482
+ | `memory_search` | Semantic search across all memory entries by query |
478
483
  | `memex_retrieve` | Recover full tool output archived during context compaction by hash ID |
479
484
  | **Git & Diagnostics** | |
480
485
  | `diagnostic` | Lint/typecheck/test/build validation pipeline in one call |
481
486
  | `git_info` | Structured git status, log, diff, branch, staged/unstaged files |
482
- | **Agents & Skills** | |
483
- | `create_tool` | Create reusable custom tools from workflow at runtime |
487
+ | **Agents & Delegation** | |
488
+ | `sub_agent` | Delegate subtasks to independent agent instances (foreground or background) |
489
+ | `explore_tools` | Meta-tool: discover and unlock additional tools on demand (for small models) |
490
+ | `task_complete` | Signal task completion with summary |
491
+ | **Custom Tools & Skills** | |
492
+ | `create_tool` | Create reusable custom tools from workflow patterns at runtime |
484
493
  | `manage_tools` | List, inspect, delete custom tools |
485
494
  | `skill_list` | Discover available AIWG skills |
486
495
  | `skill_execute` | Run an AIWG skill |
@@ -510,13 +519,13 @@ Open Agents classifies models into three tiers and adapts its behavior according
510
519
 
511
520
  | Tier | Parameters | Base Tools | System Prompt | Compaction |
512
521
  |------|-----------|------------|---------------|------------|
513
- | **Large** (≥30B) | 70B, 122B | All 37 tools | Full (344 lines) | 40K threshold |
522
+ | **Large** (≥30B) | 70B, 122B | All 47 tools | Full (344 lines) | 40K threshold |
514
523
  | **Medium** (8-29B) | 9B, 27B | 15 core tools | Condensed (100 lines) | 24K threshold |
515
524
  | **Small** (≤7B) | 4B, 1.5B | 6 base tools + explore_tools | Minimal (15 lines) | 12K threshold |
516
525
 
517
526
  ### Tool Nesting for Small Models
518
527
 
519
- Small models use an **explore_tools** meta-tool pattern inspired by hierarchical API retrieval research (ToolLLM, arXiv:2307.16789). Instead of presenting all 37 tools (which overwhelms small context windows), only 6 core tools are loaded initially:
528
+ 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:
520
529
 
521
530
  - `file_read`, `file_write`, `file_edit`, `shell`, `task_complete`, `explore_tools`
522
531
 
@@ -549,6 +558,45 @@ All context-dependent values scale automatically with the actual context window
549
558
 
550
559
  Auto-downloads the ONNX voice model (~50MB) on first use. Install `espeak-ng` for best quality (`apt install espeak-ng` / `brew install espeak-ng`).
551
560
 
561
+ ## Human Expert Speed Ratio
562
+
563
+ The status bar displays a real-time `Exp: Nx` gauge estimating how fast the agent is working relative to a leading human expert performing equivalent tasks.
564
+
565
+ ```
566
+ In: 12,345 | Out: 4,567 | Ctx: 18,000/131,072 86% | Exp: 4.2x | Cost: $0.34
567
+ ^^^^^^^^
568
+ Agent is 4.2x faster
569
+ than a human expert
570
+ ```
571
+
572
+ ### How It Works
573
+
574
+ Each tool call maps to a calibrated expert baseline time — the estimated seconds a top-tier human developer would take to perform the equivalent operation manually:
575
+
576
+ | Operation | Expert Time | Agent Equivalent |
577
+ |-----------|-------------|-----------------|
578
+ | Read a file | 12s | `file_read` |
579
+ | Write a new file | 90s | `file_write` |
580
+ | Make a precise edit | 25s | `file_edit` |
581
+ | Grep search + scan results | 15s | `grep_search` |
582
+ | Run a shell command | 20s | `shell` |
583
+ | Web search + evaluate | 60s | `web_search` |
584
+ | Survey codebase structure | 180s | `codebase_map` |
585
+
586
+ Additional overhead per action:
587
+ - **+5s context-switch** per tool call (expert switching between tools)
588
+ - **+15s planning** per reasoning turn (expert thinking about next step)
589
+
590
+ The ratio accumulates across all tasks in the session:
591
+
592
+ ```
593
+ speedRatio = totalHumanExpertTime / totalAgentWallClockTime
594
+ ```
595
+
596
+ Color coding: green (2x+ faster), yellow (1-2x, comparable), red (<1x, slower than expert).
597
+
598
+ All 47 tools have calibrated baselines ranging from 3s (`task_stop`) to 180s (`codebase_map`). Unknown tools default to 20s.
599
+
552
600
  ## Cost Tracking & Session Metrics
553
601
 
554
602
  Real-time token cost estimation for cloud providers. The status bar shows running cost when using a paid endpoint.
@@ -717,7 +765,7 @@ The agent auto-detects the provider, normalizes the URL (strips `/v1/chat/comple
717
765
 
718
766
  ## Evaluation Suite
719
767
 
720
- 33 evaluation tasks test the agent's autonomous capabilities across coding, web research, SDLC analysis, tool creation, and multi-file reasoning:
768
+ 40 evaluation tasks test the agent's autonomous capabilities across coding, web research, SDLC analysis, tool creation, multi-file reasoning, and memory systems:
721
769
 
722
770
  ```bash
723
771
  node eval/run-agentic.mjs # Run all tasks
@@ -754,15 +802,23 @@ node eval/run-agentic.mjs --model qwen2.5-coder:32b # Different model
754
802
  | 31 | Web extractor bug fixes (3 bugs) | Multi-Bug Fix |
755
803
  | 32 | CSV pipeline across 3 files | Multi-File Tracking |
756
804
  | 33 | FSM bug fixes + factory implementation | State Machine |
805
+ | 34 | Search pre-populated memories | Memory Search |
806
+ | 35 | Analyze code, write to memory, cross-reference | Memory Cross-Reference |
807
+ | 36 | Discover explore_tools, unlock grep_search | Explore Tools |
808
+ | 37 | Analyze code patterns, store and recall from memory | Memory Store & Recall |
809
+ | 38 | Read configs, write to multiple memory topics | Memory Multi-Topic |
810
+ | 39 | Search pre-loaded memories across 3 topics | Memory Pre-Loaded Search |
811
+ | 40 | Combined explore_tools + memory analysis pipeline | Explore + Memory |
757
812
 
758
- Tasks 31-33 are designed for small model (≤9B) evaluation using `file_edit` patterns instead of `file_write` to avoid JSON truncation issues with smaller models.
813
+ Tasks 31-33 are designed for small model (≤9B) evaluation using `file_edit` patterns. Tasks 34-40 test the memory system (read/write/search) and tool discovery.
759
814
 
760
815
  ### Benchmark Results
761
816
 
762
817
  ```
763
- Qwen3.5-122B: 100% pass rate (30/30 tasks)
818
+ Qwen3.5-122B: 100% pass rate (37/37 tasks, including memory tasks 34-40)
764
819
  Qwen3.5-27B: 100% pass rate (30/30 tasks)
765
820
  Qwen3.5-9B: 100% pass rate (tasks 31-33, file_edit-optimized)
821
+ 71% pass rate (5/7 memory tasks 34-40)
766
822
  ```
767
823
 
768
824
  The eval runner includes model-tier-aware features: automatic tool set filtering, HTTP 500 recovery with file_edit hints, loop detection with tool banning, and tier-based output truncation.
package/dist/index.js CHANGED
@@ -21970,12 +21970,113 @@ var init_braille_spinner = __esm({
21970
21970
  });
21971
21971
 
21972
21972
  // packages/cli/dist/tui/status-bar.js
21973
- var StatusBar;
21973
+ var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, HumanSpeedTracker, StatusBar;
21974
21974
  var init_status_bar = __esm({
21975
21975
  "packages/cli/dist/tui/status-bar.js"() {
21976
21976
  "use strict";
21977
21977
  init_render();
21978
21978
  init_braille_spinner();
21979
+ EXPERT_TOOL_BASELINES = {
21980
+ file_read: 12,
21981
+ structured_read: 15,
21982
+ file_write: 90,
21983
+ structured_file: 90,
21984
+ file_edit: 25,
21985
+ file_patch: 90,
21986
+ batch_edit: 90,
21987
+ grep_search: 15,
21988
+ glob_find: 8,
21989
+ shell: 20,
21990
+ web_fetch: 45,
21991
+ web_search: 60,
21992
+ web_crawl: 90,
21993
+ memory_read: 5,
21994
+ memory_write: 15,
21995
+ memory_search: 10,
21996
+ list_directory: 5,
21997
+ codebase_map: 180,
21998
+ git_info: 8,
21999
+ diagnostic: 10,
22000
+ explore_tools: 10,
22001
+ image_read: 8,
22002
+ screenshot: 15,
22003
+ ocr: 20,
22004
+ ocr_pdf: 30,
22005
+ pdf_to_text: 20,
22006
+ ocr_image_advanced: 30,
22007
+ transcribe_file: 60,
22008
+ transcribe_url: 60,
22009
+ vision: 15,
22010
+ desktop_click: 5,
22011
+ desktop_describe: 10,
22012
+ code_sandbox: 45,
22013
+ skill_list: 5,
22014
+ skill_execute: 30,
22015
+ create_tool: 120,
22016
+ manage_tools: 15,
22017
+ aiwg_setup: 30,
22018
+ aiwg_health: 10,
22019
+ aiwg_workflow: 30,
22020
+ background_run: 30,
22021
+ task_status: 5,
22022
+ task_output: 5,
22023
+ task_stop: 3,
22024
+ task_complete: 0
22025
+ };
22026
+ CONTEXT_SWITCH_OVERHEAD = 5;
22027
+ TURN_PLANNING_OVERHEAD = 15;
22028
+ DEFAULT_TOOL_BASELINE = 20;
22029
+ HumanSpeedTracker = class {
22030
+ /** Accumulated estimated human-expert time in seconds */
22031
+ humanTimeS = 0;
22032
+ /** Accumulated agent wall-clock time in milliseconds */
22033
+ agentTimeMs = 0;
22034
+ /** Timestamp when current task started (0 = no active task) */
22035
+ taskStartMs = 0;
22036
+ /** Number of tool calls in current session */
22037
+ toolCalls = 0;
22038
+ /** Number of turns in current session */
22039
+ turns = 0;
22040
+ /** Record a tool call — adds the expert baseline time */
22041
+ recordToolCall(toolName) {
22042
+ const baseline = EXPERT_TOOL_BASELINES[toolName] ?? DEFAULT_TOOL_BASELINE;
22043
+ this.humanTimeS += baseline + CONTEXT_SWITCH_OVERHEAD;
22044
+ this.toolCalls++;
22045
+ }
22046
+ /** Record a turn (assistant reasoning cycle) */
22047
+ recordTurn() {
22048
+ this.humanTimeS += TURN_PLANNING_OVERHEAD;
22049
+ this.turns++;
22050
+ }
22051
+ /** Mark the start of a task (for wall-clock tracking) */
22052
+ taskStart() {
22053
+ this.taskStartMs = Date.now();
22054
+ }
22055
+ /** Mark the end of a task — accumulates elapsed wall-clock time */
22056
+ taskEnd() {
22057
+ if (this.taskStartMs > 0) {
22058
+ this.agentTimeMs += Date.now() - this.taskStartMs;
22059
+ this.taskStartMs = 0;
22060
+ }
22061
+ }
22062
+ /**
22063
+ * Get the current speed ratio (human expert time / agent time).
22064
+ * Returns 0 if no work has been done yet.
22065
+ * During an active task, includes in-flight elapsed time.
22066
+ */
22067
+ getSpeedRatio() {
22068
+ if (this.humanTimeS === 0)
22069
+ return 0;
22070
+ const totalAgentMs = this.agentTimeMs + (this.taskStartMs > 0 ? Date.now() - this.taskStartMs : 0);
22071
+ if (totalAgentMs <= 0)
22072
+ return 0;
22073
+ return this.humanTimeS * 1e3 / totalAgentMs;
22074
+ }
22075
+ /** Whether any work has been recorded */
22076
+ get hasData() {
22077
+ return this.toolCalls > 0;
22078
+ }
22079
+ };
21979
22080
  StatusBar = class {
21980
22081
  metrics = {
21981
22082
  promptTokens: 0,
@@ -22114,6 +22215,24 @@ var init_status_bar = __esm({
22114
22215
  setContextWindowSize(size) {
22115
22216
  this.metrics.contextWindowSize = size;
22116
22217
  }
22218
+ /** Human expert speed ratio tracker */
22219
+ _speedTracker = new HumanSpeedTracker();
22220
+ /** Record a tool call for speed ratio tracking */
22221
+ recordSpeedToolCall(toolName) {
22222
+ this._speedTracker.recordToolCall(toolName);
22223
+ }
22224
+ /** Record a turn for speed ratio tracking */
22225
+ recordSpeedTurn() {
22226
+ this._speedTracker.recordTurn();
22227
+ }
22228
+ /** Mark task start for speed ratio wall-clock tracking */
22229
+ recordSpeedTaskStart() {
22230
+ this._speedTracker.taskStart();
22231
+ }
22232
+ /** Mark task end for speed ratio wall-clock tracking */
22233
+ recordSpeedTaskEnd() {
22234
+ this._speedTracker.taskEnd();
22235
+ }
22117
22236
  /** Model capabilities — shown as emoji indicators on the status bar */
22118
22237
  _caps = {
22119
22238
  vision: false,
@@ -22320,6 +22439,15 @@ var init_status_bar = __esm({
22320
22439
  const costStr = m.estimatedCost < 0.01 ? `$${m.estimatedCost.toFixed(4)}` : m.estimatedCost < 1 ? `$${m.estimatedCost.toFixed(3)}` : `$${m.estimatedCost.toFixed(2)}`;
22321
22440
  costLabel = pipe + pastel2(222, "Cost: ") + c2.bold(costStr);
22322
22441
  }
22442
+ let speedLabel = "";
22443
+ if (this._speedTracker.hasData) {
22444
+ const ratio = this._speedTracker.getSpeedRatio();
22445
+ if (ratio > 0) {
22446
+ const ratioStr = ratio >= 10 ? `${Math.round(ratio)}x` : `${ratio.toFixed(1)}x`;
22447
+ const ratioColor = ratio >= 2 ? c2.green : ratio >= 1 ? c2.yellow : c2.red;
22448
+ speedLabel = pipe + pastel2(218, "Exp: ") + ratioColor(c2.bold(ratioStr));
22449
+ }
22450
+ }
22323
22451
  let recordingLabel = "";
22324
22452
  if (this._recording) {
22325
22453
  const dot = this._recBlink ? pastel2(210, "\u25CF") : " ";
@@ -22334,7 +22462,7 @@ var init_status_bar = __esm({
22334
22462
  if (this._caps.thinking)
22335
22463
  capParts.push("\u{1F9E0}");
22336
22464
  const capsLabel = capParts.length > 0 ? pipe + pastel2(183, capParts.join(" ")) : "";
22337
- return ` ${tokInLabel}${pipe}${tokOutLabel}${pipe}${ctxLabel}${costLabel}${capsLabel}${recordingLabel}`;
22465
+ return ` ${tokInLabel}${pipe}${tokOutLabel}${pipe}${ctxLabel}${speedLabel}${costLabel}${capsLabel}${recordingLabel}`;
22338
22466
  }
22339
22467
  // -------------------------------------------------------------------------
22340
22468
  // Private
@@ -22939,6 +23067,7 @@ ${entry.fullContent}`
22939
23067
  }
22940
23068
  }
22941
23069
  lastToolCall = { name: event.toolName ?? "unknown", args: event.toolArgs ?? {} };
23070
+ statusBar?.recordSpeedToolCall(event.toolName ?? "unknown");
22942
23071
  statusBar?.setActiveTool(event.toolName ?? null);
22943
23072
  contentWrite(() => {
22944
23073
  if (voice?.enabled) {
@@ -22967,6 +23096,7 @@ ${entry.fullContent}`
22967
23096
  });
22968
23097
  break;
22969
23098
  case "model_response":
23099
+ statusBar?.recordSpeedTurn();
22970
23100
  if (config.verbose && !stream?.enabled && event.content) {
22971
23101
  contentWrite(() => renderAssistantText(event.content));
22972
23102
  }
@@ -24002,6 +24132,7 @@ NEW TASK: ${fullInput}`;
24002
24132
  }
24003
24133
  try {
24004
24134
  statusBar.setProcessing(true);
24135
+ statusBar.recordSpeedTaskStart();
24005
24136
  const task = startTask(taskInput, currentConfig, repoRoot, voiceEngine, {
24006
24137
  enabled: streamEnabled,
24007
24138
  renderer: streamRenderer
@@ -24040,6 +24171,7 @@ NEW TASK: ${fullInput}`;
24040
24171
  }
24041
24172
  } finally {
24042
24173
  statusBar.setProcessing(false);
24174
+ statusBar.recordSpeedTaskEnd();
24043
24175
  if (activeTask) {
24044
24176
  sessionFilesTouched = Array.from(activeTask.filesTouched);
24045
24177
  sessionToolCallCount = activeTask.toolCallCount;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.34.1",
3
+ "version": "0.34.3",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",