open-agents-ai 0.16.5 → 0.18.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 +211 -13
- package/dist/index.js +2883 -319
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -29,13 +29,23 @@ An autonomous multi-turn tool-calling agent that reads your code, makes changes,
|
|
|
29
29
|
|
|
30
30
|
## Features
|
|
31
31
|
|
|
32
|
-
- **
|
|
32
|
+
- **35 autonomous tools** — file I/O, shell, grep, web search/fetch, memory, sub-agents, background tasks, image/OCR, git, diagnostics, vision, desktop automation, structured files, code sandbox
|
|
33
|
+
- **Moondream vision** — see and interact with the desktop via Moondream VLM (caption, query, detect, point-and-click)
|
|
34
|
+
- **Desktop automation** — vision-guided clicking: describe a UI element in natural language, the agent finds and clicks it
|
|
33
35
|
- **Parallel tool execution** — read-only tools run concurrently via `Promise.allSettled`
|
|
34
36
|
- **Sub-agent delegation** — spawn independent agents for parallel workstreams
|
|
35
37
|
- **Ralph Loop** — iterative task execution that keeps retrying until completion criteria are met
|
|
36
38
|
- **Dream Mode** — creative idle exploration modeled after real sleep architecture (NREM→REM cycles)
|
|
37
39
|
- **Live Listen** — bidirectional voice communication with real-time Whisper transcription
|
|
38
40
|
- **Neural TTS** — hear what the agent is doing via GLaDOS or Overwatch ONNX voices
|
|
41
|
+
- **Cost tracking** — real-time token cost estimation for 15+ cloud providers
|
|
42
|
+
- **Work evaluation** — LLM-as-judge scoring with task-type-specific rubrics
|
|
43
|
+
- **Session metrics** — track turns, tool calls, tokens, files modified, tasks completed per session
|
|
44
|
+
- **Structured file generation** — create CSV, TSV, JSON, Markdown tables, and Excel-compatible files
|
|
45
|
+
- **Code sandbox** — isolated code execution in subprocess or Docker (JS, Python, Bash, TypeScript)
|
|
46
|
+
- **Structured file reading** — parse CSV, TSV, JSON, Markdown tables with binary format detection
|
|
47
|
+
- **Multi-provider web search** — DuckDuckGo (free), Tavily (structured), Jina AI (markdown) with auto-detection
|
|
48
|
+
- **Task templates** — specialized system prompts and tool recommendations for code, document, analysis, plan tasks
|
|
39
49
|
- **Auto-expanding context** — detects RAM/VRAM and creates an optimized model variant on first run
|
|
40
50
|
- **Mid-task steering** — type while the agent works to add context without interrupting
|
|
41
51
|
- **Smart compaction** — long conversations compressed preserving files, commands, errors, decisions
|
|
@@ -139,6 +149,88 @@ The `transcribe-cli` dependency auto-installs in the background on first use.
|
|
|
139
149
|
|
|
140
150
|
**File transcription**: Drag-and-drop audio/video files (`.mp3`, `.wav`, `.mp4`, `.mkv`, etc.) onto the terminal to transcribe them. Results are saved to `.oa/transcripts/`.
|
|
141
151
|
|
|
152
|
+
## Vision & Desktop Automation (Moondream)
|
|
153
|
+
|
|
154
|
+
Open Agents can see your screen, understand UI elements, and interact with desktop applications through natural language — powered by the Moondream vision language model running entirely locally.
|
|
155
|
+
|
|
156
|
+
### Desktop Awareness
|
|
157
|
+
|
|
158
|
+
The agent can take a screenshot and describe what's on screen:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
You: what's on my desktop right now?
|
|
162
|
+
|
|
163
|
+
Agent: [Turn 1] desktop_describe()
|
|
164
|
+
→ "A Linux desktop showing three terminal windows with code editors,
|
|
165
|
+
a file manager in the background, and a taskbar at the bottom
|
|
166
|
+
with Firefox, Files, and Terminal icons."
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Ask specific questions about the screen:
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
Agent: [Turn 1] desktop_describe(question="What application is in focus?")
|
|
173
|
+
→ "The focused application is a terminal running vim with a Python file open."
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Vision Analysis
|
|
177
|
+
|
|
178
|
+
Analyze any image with four actions:
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
Agent: vision(image="screenshot.png", action="caption")
|
|
182
|
+
→ "A terminal window displaying code with syntax highlighting"
|
|
183
|
+
|
|
184
|
+
Agent: vision(image="ui.png", action="query", prompt="How many buttons are visible?")
|
|
185
|
+
→ "There are 4 buttons visible: Save, Cancel, Help, and Close"
|
|
186
|
+
|
|
187
|
+
Agent: vision(image="ui.png", action="detect", prompt="button")
|
|
188
|
+
→ Detected 4 "button" in ui.png:
|
|
189
|
+
1. bbox: [0.10, 0.85, 0.25, 0.95]
|
|
190
|
+
2. bbox: [0.30, 0.85, 0.45, 0.95]
|
|
191
|
+
...
|
|
192
|
+
|
|
193
|
+
Agent: vision(image="ui.png", action="point", prompt="close button")
|
|
194
|
+
→ Found 1 "close button" at (0.95, 0.02) — pixel (1824, 22)
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Point-and-Click
|
|
198
|
+
|
|
199
|
+
Describe what to click in plain English — the agent screenshots, finds the element with Moondream, and clicks it:
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
Agent: desktop_click(target="the Save button")
|
|
203
|
+
→ Clicked "Save button" at (480, 920)
|
|
204
|
+
|
|
205
|
+
Agent: desktop_click(target="File menu", button="left")
|
|
206
|
+
→ Clicked "File menu" at (45, 12)
|
|
207
|
+
|
|
208
|
+
Agent: desktop_click(target="terminal icon", click_type="double")
|
|
209
|
+
→ Clicked "terminal icon" at (1850, 540)
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Supports left/right/middle click, single/double click, multi-match selection by index, dry-run mode for verification, and configurable delay for UI transitions.
|
|
213
|
+
|
|
214
|
+
### Setup
|
|
215
|
+
|
|
216
|
+
Moondream runs locally — no API keys, no cloud, your screen data never leaves your machine:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
# Create a Python venv and install Moondream Station
|
|
220
|
+
python3 -m venv .moondream-venv
|
|
221
|
+
.moondream-venv/bin/pip install moondream-station pydantic uvicorn fastapi packaging
|
|
222
|
+
|
|
223
|
+
# Start the vision server (downloads model on first run, ~1.7GB)
|
|
224
|
+
.moondream-venv/bin/python packages/execution/scripts/start-moondream.py
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
The vision tools auto-detect a running Moondream Station on `localhost:2020`. For cloud inference, set `MOONDREAM_API_KEY` instead.
|
|
228
|
+
|
|
229
|
+
**System requirements for desktop interaction:**
|
|
230
|
+
- Screenshot: `scrot`, `gnome-screenshot`, or Python PIL (auto-detected)
|
|
231
|
+
- Mouse control: `xdotool` or `python-xlib` (auto-detected)
|
|
232
|
+
- Vision: Moondream Station (local) or Moondream Cloud API
|
|
233
|
+
|
|
142
234
|
## Interactive TUI
|
|
143
235
|
|
|
144
236
|
Launch without arguments to enter the interactive REPL:
|
|
@@ -164,6 +256,10 @@ The TUI features an animated multilingual phrase carousel, live metrics bar with
|
|
|
164
256
|
| `/tools` | List available tools |
|
|
165
257
|
| `/skills` | List/search available skills |
|
|
166
258
|
| `/update` | Check for and install updates (seamless reload) |
|
|
259
|
+
| `/cost` | Show token cost breakdown for the current session |
|
|
260
|
+
| `/evaluate` | Score the last completed task with LLM-as-judge |
|
|
261
|
+
| `/stats` | Show session metrics (turns, tools, tokens, files) |
|
|
262
|
+
| `/task-type <type>` | Set task type for specialized prompts (code, document, analysis, plan) |
|
|
167
263
|
| `/config` | Show current configuration |
|
|
168
264
|
| `/clear` | Clear the screen |
|
|
169
265
|
| `/exit` | Quit |
|
|
@@ -181,33 +277,53 @@ While the agent is working (shown by the `+` prompt), type to add context:
|
|
|
181
277
|
⎿ Edit: src/auth.ts
|
|
182
278
|
```
|
|
183
279
|
|
|
184
|
-
## Tools (
|
|
280
|
+
## Tools (35)
|
|
185
281
|
|
|
186
282
|
| Tool | Description |
|
|
187
283
|
|------|-------------|
|
|
284
|
+
| **File Operations** | |
|
|
188
285
|
| `file_read` | Read file contents with line numbers (offset/limit) |
|
|
189
286
|
| `file_write` | Create or overwrite files |
|
|
190
287
|
| `file_edit` | Precise string replacement in files |
|
|
191
|
-
| `
|
|
288
|
+
| `batch_edit` | Multiple edits across files in one call |
|
|
289
|
+
| `list_directory` | List directory contents |
|
|
290
|
+
| **Search & Navigation** | |
|
|
192
291
|
| `grep_search` | Search file contents with regex (ripgrep) |
|
|
193
292
|
| `find_files` | Find files by glob pattern |
|
|
194
|
-
| `list_directory` | List directory contents |
|
|
195
|
-
| `web_search` | Search the web via DuckDuckGo |
|
|
196
|
-
| `web_fetch` | Fetch and extract text from web pages |
|
|
197
|
-
| `memory_read` | Read from persistent memory store |
|
|
198
|
-
| `memory_write` | Store patterns for future sessions |
|
|
199
|
-
| `batch_edit` | Multiple edits across files in one call |
|
|
200
293
|
| `codebase_map` | High-level project structure overview |
|
|
201
|
-
|
|
|
202
|
-
| `
|
|
294
|
+
| **Shell & Execution** | |
|
|
295
|
+
| `shell` | Execute any shell command |
|
|
296
|
+
| `code_sandbox` | Isolated code execution (JS, Python, Bash, TS) in subprocess or Docker |
|
|
203
297
|
| `background_run` | Run shell command in background |
|
|
204
298
|
| `task_status` | Check background task status |
|
|
205
299
|
| `task_output` | Read background task output |
|
|
206
300
|
| `task_stop` | Stop a background task |
|
|
207
|
-
|
|
|
301
|
+
| **Web** | |
|
|
302
|
+
| `web_search` | Search the web (DuckDuckGo, Tavily, Jina AI — auto-detected) |
|
|
303
|
+
| `web_fetch` | Fetch and extract text from web pages |
|
|
304
|
+
| **Structured Data** | |
|
|
305
|
+
| `structured_file` | Generate CSV, TSV, JSON, Markdown tables, Excel-compatible files |
|
|
306
|
+
| `read_structured_file` | Parse CSV, TSV, JSON, Markdown tables with binary detection |
|
|
307
|
+
| **Vision & Desktop** | |
|
|
308
|
+
| `vision` | Moondream VLM — caption, query, detect, point on any image |
|
|
309
|
+
| `desktop_click` | Vision-guided clicking: describe a UI element, agent finds and clicks it |
|
|
310
|
+
| `desktop_describe` | Screenshot + Moondream caption/query for desktop awareness |
|
|
208
311
|
| `image_read` | Read images (base64 + OCR) |
|
|
209
312
|
| `screenshot` | Capture screen/window |
|
|
210
|
-
| `ocr` | Extract text from images |
|
|
313
|
+
| `ocr` | Extract text from images (Tesseract) |
|
|
314
|
+
| **Memory & Knowledge** | |
|
|
315
|
+
| `memory_read` | Read from persistent memory store |
|
|
316
|
+
| `memory_write` | Store patterns for future sessions |
|
|
317
|
+
| **Git & Diagnostics** | |
|
|
318
|
+
| `diagnostic` | Lint/typecheck/test/build validation pipeline |
|
|
319
|
+
| `git_info` | Structured git status, log, diff, branch info |
|
|
320
|
+
| **Agents & Skills** | |
|
|
321
|
+
| `sub_agent` | Delegate to an independent agent |
|
|
322
|
+
| `create_tool` | Create reusable custom tools at runtime |
|
|
323
|
+
| `manage_tools` | List, inspect, delete custom tools |
|
|
324
|
+
| `skill_list` | Discover available AIWG skills |
|
|
325
|
+
| `skill_execute` | Run an AIWG skill |
|
|
326
|
+
| **AIWG SDLC** | |
|
|
211
327
|
| `aiwg_setup` | Deploy AIWG SDLC framework |
|
|
212
328
|
| `aiwg_health` | Analyze SDLC health |
|
|
213
329
|
| `aiwg_workflow` | Execute AIWG workflows |
|
|
@@ -237,6 +353,88 @@ On startup and `/model` switch, Open Agents detects your RAM/VRAM and creates an
|
|
|
237
353
|
|
|
238
354
|
Auto-downloads the ONNX voice model (~50MB) on first use. Install `espeak-ng` for best quality (`apt install espeak-ng` / `brew install espeak-ng`).
|
|
239
355
|
|
|
356
|
+
## Cost Tracking & Session Metrics
|
|
357
|
+
|
|
358
|
+
Real-time token cost estimation for cloud providers. The status bar shows running cost when using a paid endpoint.
|
|
359
|
+
|
|
360
|
+
```
|
|
361
|
+
/cost # Show cost breakdown by model/provider
|
|
362
|
+
/stats # Session metrics: turns, tool calls, tokens, files modified
|
|
363
|
+
/evaluate # Score the last completed task (LLM-as-judge, 5 rubric dimensions)
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
Cost tracking supports 15+ providers including Groq, Together AI, OpenRouter, Fireworks AI, DeepInfra, Mistral, Cerebras, and more. Pricing is per-million tokens with separate input/output rates.
|
|
367
|
+
|
|
368
|
+
Work evaluation uses five task-type-specific rubrics (code, document, analysis, plan, general) scoring correctness, completeness, efficiency, code quality, and communication on a 1-5 scale.
|
|
369
|
+
|
|
370
|
+
## Code Sandbox
|
|
371
|
+
|
|
372
|
+
Execute code snippets in isolated environments without affecting your project:
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
Agent: code_sandbox(language="python", code="import math; print(math.factorial(20))")
|
|
376
|
+
→ 2432902008176640000
|
|
377
|
+
|
|
378
|
+
Agent: code_sandbox(language="javascript", code="console.log([...new Set([1,2,2,3])].length)")
|
|
379
|
+
→ 3
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
Supports JavaScript, TypeScript, Python, and Bash. Two execution modes:
|
|
383
|
+
- **Subprocess** (default) — runs in a child process with timeout and output limits
|
|
384
|
+
- **Docker** — runs in an isolated container when `docker` is available
|
|
385
|
+
|
|
386
|
+
## Structured Data Tools
|
|
387
|
+
|
|
388
|
+
### Generate structured files
|
|
389
|
+
|
|
390
|
+
Create CSV, TSV, JSON, Markdown tables, and Excel-compatible files from data:
|
|
391
|
+
|
|
392
|
+
```
|
|
393
|
+
Agent: structured_file(format="csv", path="results.csv", columns=["name","score"],
|
|
394
|
+
data=[{"name":"Alice","score":95},{"name":"Bob","score":87}])
|
|
395
|
+
→ Created results.csv (2 rows, 2 columns)
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Read structured files
|
|
399
|
+
|
|
400
|
+
Parse existing data files with automatic format detection:
|
|
401
|
+
|
|
402
|
+
```
|
|
403
|
+
Agent: read_structured_file(path="data.csv")
|
|
404
|
+
→ CSV: 150 rows, 5 columns [showing first 100]
|
|
405
|
+
|
|
406
|
+
Agent: read_structured_file(path="report.md")
|
|
407
|
+
→ Markdown: 3 table(s) extracted
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
Detects binary formats (XLSX, PDF, DOCX) and suggests conversion tools.
|
|
411
|
+
|
|
412
|
+
## Multi-Provider Web Search
|
|
413
|
+
|
|
414
|
+
Web search automatically selects the best available provider:
|
|
415
|
+
|
|
416
|
+
| Provider | Trigger | Features |
|
|
417
|
+
|----------|---------|----------|
|
|
418
|
+
| **DuckDuckGo** | Default (no key needed) | Free, privacy-focused |
|
|
419
|
+
| **Tavily** | `TAVILY_API_KEY` set | Structured results + AI-generated answer |
|
|
420
|
+
| **Jina AI** | `JINA_API_KEY` set | Markdown-formatted results |
|
|
421
|
+
|
|
422
|
+
```bash
|
|
423
|
+
export TAVILY_API_KEY=tvly-... # Enable Tavily (optional)
|
|
424
|
+
export JINA_API_KEY=jina_... # Enable Jina AI (optional)
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
## Task Templates
|
|
428
|
+
|
|
429
|
+
Set a task type to get specialized system prompts, recommended tools, and output guidance:
|
|
430
|
+
|
|
431
|
+
```
|
|
432
|
+
/task-type code # Code generation/fix — emphasizes tests, diffs, file edits
|
|
433
|
+
/task-type document # Documentation — emphasizes clarity, structure, completeness
|
|
434
|
+
/task-type analysis # Analysis tasks — emphasizes data, metrics, evidence
|
|
435
|
+
/task-type plan # Planning — emphasizes steps, dependencies, risks
|
|
436
|
+
```
|
|
437
|
+
|
|
240
438
|
## Configuration
|
|
241
439
|
|
|
242
440
|
Config priority: CLI flags > env vars > `~/.open-agents/config.json` > defaults.
|