aiden-runtime 4.6.0 → 4.7.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 CHANGED
@@ -1,265 +1,488 @@
1
- <img width="1672" height="941" alt="AIDEN BOOTUP LOGO" src="https://github.com/user-attachments/assets/c0809009-73e2-4d58-9292-12fbd0324952" />
2
-
3
- ```
4
- █████╗ ██╗██████╗ ███████╗███╗ ██╗
5
- ██╔══██╗██║██╔══██╗██╔════╝████╗ ██║
6
- ███████║██║██║ ██║█████╗ ██╔██╗ ██║
7
- ██╔══██║██║██║ ██║██╔══╝ ██║╚██╗██║
8
- ██║ ██║██║██████╔╝███████╗██║ ╚████║
9
- ╚═╝ ╚═╝╚═╝╚═════╝ ╚══════╝╚═╝ ╚═══╝
10
-
11
- Autonomous AI Engine — local-first, Windows-native, yours to own
12
-
13
- 74 skills · 60 tools · 19 providers · 9 channels · AGPL-3.0
14
-
15
- Windows · Linux · WSL · macOS (API Mode)
16
- ```
17
-
18
- <p align="center">
19
- <a href="https://github.com/taracodlabs/aiden/releases/latest"><img src="https://img.shields.io/badge/version-v4.6.0-f97316?style=for-the-badge" alt="v4.6.0" /></a>
20
- <a href="https://www.npmjs.com/package/aiden-runtime"><img src="https://img.shields.io/npm/v/aiden-runtime?color=f97316&label=npm&style=for-the-badge" alt="npm" /></a>
21
- <a href="https://www.npmjs.com/package/aiden-runtime"><img src="https://img.shields.io/npm/dm/aiden-runtime?color=f97316&label=downloads&style=for-the-badge" alt="npm downloads" /></a>
22
- <a href="./LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-orange?style=for-the-badge" alt="License: AGPL-3.0" /></a>
23
- <a href="https://discord.gg/gMZ3hUnQTm"><img src="https://img.shields.io/badge/chat-discord-7289da?logo=discord&logoColor=white&style=for-the-badge" alt="Discord" /></a>
24
- <a href="https://github.com/taracodlabs/aiden/stargazers"><img src="https://img.shields.io/github/stars/taracodlabs/aiden?style=for-the-badge&color=f9d71c" alt="Stars" /></a>
25
- </p>
26
-
27
- <p align="center">
28
- <img src="https://img.shields.io/badge/TypeScript-5.9-3178c6?logo=typescript&logoColor=white&style=for-the-badge" alt="TypeScript" />
29
- <img src="https://img.shields.io/badge/Node.js-18+-43853d?logo=node.js&logoColor=white&style=for-the-badge" alt="Node.js 18+" />
30
- <img src="https://img.shields.io/badge/SQLite-003b57?logo=sqlite&logoColor=white&style=for-the-badge" alt="SQLite" />
31
- <img src="https://img.shields.io/badge/Playwright-1.58-2ea44f?logo=playwright&logoColor=white&style=for-the-badge" alt="Playwright" />
32
- <img src="https://img.shields.io/badge/MCP-1.27-7c3aed?style=for-the-badge" alt="Model Context Protocol" />
33
- </p>
34
-
35
- ---
36
-
37
- ## What's new in v4.6
38
-
39
- Aiden now spawns workers and learns from itself.
40
-
41
- - **Sub-agents.** `spawn_sub_agent` runs a focused child with an isolated context + intersected toolset; `subagent_fanout` runs N children in parallel (ensemble or partition) with merge strategies (`all` / `vote` / `pick-best` / `combine`) and provider rotation across configured fallback slots.
42
- - **Operator kill-switch.** `/spawn-pause on|off|status` blocks new sub-agent spawning while in-flight children continue. Marker file at `~/.aiden/spawn.paused` so the state survives restart and is shared across REPL, daemon, and MCP runtimes. Optional reason field captured in the typed `SUBAGENT_SPAWN_PAUSED` error envelope.
43
- - **Self-improvement loop foundation.** TCE classifications + recoveries persist to two new SQLite tables (`failure_signatures`, `recovery_reports`); `/recovery list|show|clear` surfaces recurring failure patterns across sessions.
44
- - **REPL parent-run lineage.** Each REPL turn writes its own `runs` row; sub-agent children link back via `spawned_from_run_id`. `aiden runs list` hides children by default and shows a `(N children, M OK)` badge per parent; `--include-children` flips to flat view.
45
- - **PlannerGuard opt-in.** The keyword-based per-turn tool narrower is OFF by default in v4.6 (modern models pick well from the full catalog). Enable via `/planner-guard on` or `AIDEN_PLANNER_GUARD=1` for smaller local models.
46
-
47
- Phase 2 also fixed an MCP-mode `subagent_fanout` regression that had silently broken in the v4.5 refactor.
48
-
49
- ---
50
-
51
- ## What's new in v4.5
52
-
53
- Aiden now wakes up by itself.
54
-
55
- - **Persistent daemon mode (opt-in).** `AIDEN_DAEMON=1` boots a background service with a SQLite-backed trigger bus. File watchers, webhook endpoints, IMAP polling, and cron schedules all feed the same durable queue.
56
- - **Autonomous trigger dispatch.** When a trigger fires, a real AidenAgent turn runs end-to-end — same tools, same sandbox, same recovery pipeline as your interactive REPL. Surface the chain with `aiden runs show <id>`.
57
- - **Execution sandbox with risk tiers.** Filesystem allowlist + Docker session backend + dry-run preflight. Default on; flip live with `/sandbox on|off`.
58
- - **State-aware browser depth.** URL + DOM + iframe-tree capture before/after every browser tool call. Stale-ref auto-retry. Surfaces login / 2FA / captcha / consent blockers as structured cards.
59
- - **Continuous error recovery (TCE).** 16 failure categories classified per tool call. Smart retry with cooldown. Dead-letter for permanent failures. Recovery report enriches the REPL's capability card.
60
- - **Live-flip slash commands.** `/sandbox`, `/tce`, `/browser-depth`, `/daemon status`, `/suggestions`, `/update` — toggle every subsystem without restart. Choices persist to `config.yaml`.
61
- - **Update notification + `/update` CLI.** Boot prompt when a newer version is on npm. Skip-this-version persistence. Install-method detection (npm-global / npx / standalone). Q-U6: spawn directly when supported, print command when not.
62
-
63
- Full v4.5 internals: `docs/v4.5/` (overview, triggers, architecture, daemon on Linux/macOS/Windows, troubleshooting).
64
-
65
- ---
66
-
67
- ## Try it in 60 seconds
68
-
69
- ```bash
70
- npm install -g aiden-runtime
71
- aiden
72
- ```
73
-
74
- That's it. Pick a provider (Groq is free + fastest), paste your key, and start chatting.
75
-
76
- Want autonomous triggers?
77
-
78
- ```bash
79
- export AIDEN_DAEMON=1 # PowerShell: $env:AIDEN_DAEMON = "1"
80
- aiden trigger add file --path ~/Documents/inbox --label "watch-inbox" --include "*.txt"
81
- aiden # boots the REPL + dispatcher
82
- ```
83
-
84
- Drop a file in `~/Documents/inbox/anything.txt` and Aiden acts on it. The agent turn is visible via `aiden runs list`.
85
-
86
- ---
87
-
88
- ## Core capabilities
89
-
90
- | Category | What Aiden does |
91
- |---|---|
92
- | **Inference & providers** | 19 providers: Anthropic, OpenAI, Groq, Gemini, OpenRouter, Together, NVIDIA NIM, DeepSeek, Mistral, Z.ai, Kimi, MiniMax, Hugging Face, Ollama (fully offline), custom OpenAI-compatible endpoints. OAuth subscription routing for Claude Pro and ChatGPT Plus. |
93
- | **59 built-in tools** | Web search & fetch, deep research, YouTube search, Playwright browser automation (10 tools), file ops, process control, shell exec, code execution, system info, screenshot, clipboard, app launch, media keys, MCP bridge, memory ops, session list/search/summary/recall, skill view/list/manage, `aiden_self_update`. |
94
- | **74 bundled skills** | Composable workflows each with a `SKILL.md` prompt, optional helper scripts, and tool requirements. GitHub PR/issue workflows, NSE / Upstox / Zerodha trading, Censys / Shodan / VirusTotal lookups, Windows Defender / Task Scheduler, Docker management, YouTube content tools, and more. |
95
- | **Self-promoting memory** | `USER.md` + `SOUL.md` identity, plus `MEMORY.md` split between durable facts (compression-protected) and recent-session distillations. Each session ends with a structured summary that graduates durable facts into the protected section. Semantic recall over past sessions via `recall_session`. |
96
- | **Voice** | Edge TTS / Windows SAPI text-to-speech, speech-to-text helpers. |
97
- | **Channel adapters** | Discord, Slack, Telegram, WhatsApp, Email (IMAP+SMTP), Webhook, Twilio SMS, iMessage (macOS), Signal — any channel triggers the same agent loop. |
98
- | **Computer use** | Screenshot capture, screen-state vision loop, browser automation. Mouse/keyboard automation partial. |
99
- | **v4.5 daemon mode (opt-in)** | File watcher / webhook / email IMAP / scheduled triggers route through a durable trigger bus consumed by the Phase 5a dispatcher. Triggers fire → real agent runs → tool calls execute → `run_events` captures the chain. Off by default. |
100
- | **Plugins** | Three bundled plugins: Chrome DevTools Protocol bridge, Claude Pro OAuth, ChatGPT Plus OAuth. Permission-state machine (pending-grant / loaded / suspended). |
101
- | **MCP** | Model Context Protocol bridge — stdio + HTTP transports, schema discovery, tool dispatch. |
102
- | **Security moat** | Tiered approval engine (safe / caution / dangerous), dangerous-command pattern classifier, honesty enforcement (post-loop scan rewrites false claims), memory guard, planner-guard tool narrowing, SSRF-safe URL fetcher, secret/PII pre-write scanner, skill-teacher (auto-create skills from successful flows). |
103
-
104
- ---
105
-
106
- ## Architecture (one paragraph)
107
-
108
- Aiden is a local-first agent loop: provider adapters feed a 90-turn ceiling, every tool call passes through verification + failure classification + recovery, and tool results stream back as structured envelopes the model can reason over. v4.5 added a SQLite daemon foundation alongside the REPL — file watchers and webhook endpoints write to a durable trigger bus, a single-worker dispatcher claims events, and each trigger fires a fresh agent turn keyed by a stable session id. Sandboxed execution (filesystem allow/deny + Docker session backend), state-aware browser observation, and continuous error recovery apply to daemon-fired turns identically to REPL turns. Detailed diagrams + module map in [`docs/v4.5/architecture.md`](./docs/v4.5/architecture.md).
109
-
110
- ---
111
-
112
- ## Install + first run
113
-
114
- ### Linux / WSL / macOS (one-line)
115
-
116
- ```bash
117
- npm install -g aiden-runtime
118
- aiden # interactive setup wizard fires on first run
119
- ```
120
-
121
- ### Windows (one-line)
122
-
123
- ```powershell
124
- npm install -g aiden-runtime
125
- aiden
126
- ```
127
-
128
- If you hit native-build errors on Windows, install the [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) prerequisite first.
129
-
130
- ### Try without installing
131
-
132
- ```bash
133
- npx aiden-runtime
134
- ```
135
-
136
- ### After pulling updates
137
-
138
- ```bash
139
- npm install -g aiden-runtime@latest
140
- ```
141
-
142
- Or, from inside a running session, the slash command:
143
-
144
- ```
145
- /update install
146
- ```
147
-
148
- (Aiden also prompts you on boot when a newer version is on npm — see `/update auto off` to silence.)
149
-
150
- ### Daemon mode (opt-in)
151
-
152
- **Linux:** install a systemd `--user` unit.
153
-
154
- ```bash
155
- export AIDEN_DAEMON=1
156
- aiden daemon install
157
- loginctl enable-linger $USER # keep running between sessions
158
- ```
159
-
160
- **macOS:** install a launchd plist.
161
-
162
- ```bash
163
- export AIDEN_DAEMON=1
164
- aiden daemon install
165
- ```
166
-
167
- **Windows:** see [`docs/v4.5/daemon-windows.md`](./docs/v4.5/daemon-windows.md). Recommended: foreground (`aiden daemon start`) or `pm2` for background.
168
-
169
- ---
170
-
171
- ## Configuration
172
-
173
- Aiden reads `~/.aiden/config.yaml` (Linux/macOS) or `%LOCALAPPDATA%\aiden\config.yaml` (Windows). The setup wizard writes a starter config on first boot; subsequent edits are diff-merged.
174
-
175
- ### Common env vars
176
-
177
- | Variable | Default | Effect |
178
- |---|---|---|
179
- | `AIDEN_DAEMON` | `0` | Set to `1` to boot the daemon foundation alongside the REPL |
180
- | `AIDEN_DAEMON_PORT` | `4200` | Daemon HTTP listener port |
181
- | `AIDEN_DAEMON_BIND` | `127.0.0.1` | Loopback-only by default; non-loopback requires `AIDEN_API_KEY` |
182
- | `AIDEN_DAEMON_DAILY_BUDGET` | unset | Hard daily token cap across daemon turns; resets midnight UTC |
183
- | `AIDEN_DAEMON_MODEL` | unset | Override model for daemon turns (`<provider>/<model>`) |
184
- | `AIDEN_SANDBOX` | `1` | `0` to disable filesystem allowlist + Docker session backend |
185
- | `AIDEN_TCE` | `1` | `0` to disable continuous error recovery |
186
- | `AIDEN_BROWSER_DEPTH` | `1` | `0` to disable state-aware browser observation |
187
- | `AIDEN_API_KEY` | unset | Required for non-loopback daemon bind |
188
- | `AIDEN_NO_UPDATE_CHECK` | `0` | Set to `1` to silence the boot-time update probe |
189
-
190
- Most flags are also flippable live via slash commands:
191
-
192
- | Slash command | Effect |
193
- |---|---|
194
- | `/sandbox on\|off\|status` | Filesystem + execution sandbox |
195
- | `/tce on\|off\|status` | Continuous error recovery |
196
- | `/browser-depth on\|off\|status` | State-aware browser observer |
197
- | `/suggestions on\|off\|status` | Contextual capability hints |
198
- | `/daemon status` | Read-only daemon snapshot (port, triggers, recent runs, daily budget) |
199
- | `/update check\|install\|skip <v>\|auto on\|off` | Update probe + install |
200
- | `/cron add\|list\|show\|run\|remove` | Scheduled jobs |
201
- | `/runs list\|show <id>\|interrupt\|stats` | Daemon run history |
202
-
203
- Full reference: [`docs/v4.5/`](./docs/v4.5/).
204
-
205
- ---
206
-
207
- ## In-chat slash commands (38 total)
208
-
209
- Type `/help` inside Aiden for the full list grouped by category. Highlights:
210
-
211
- - **Configuration** — `/model`, `/personality`, `/skin`, `/streaming`, `/reasoning`, `/verbose`, `/debug-prompt`, `/identity`
212
- - **Session** — `/clear`, `/compress`, `/save`, `/title`, `/usage`
213
- - **System** — `/sandbox`, `/tce`, `/browser-depth`, `/daemon`, `/suggestions`, `/update`, `/skills`, `/tools`, `/plugins`, `/cron`, `/runs`, `/trigger`, `/doctor`, `/status`, `/show`, `/history`
214
- - **Auth** — `/auth login`, `/auth status`, `/auth refresh`
215
- - **MCP** — `/reload-mcp`, `/setup`
216
-
217
- ---
218
-
219
- ## Troubleshooting
220
-
221
- Common issues live in [`docs/v4.5/troubleshooting.md`](./docs/v4.5/troubleshooting.md). Quick reference:
222
-
223
- - **"daemon already running"** — stale `~/.aiden/daemon/runtime.lock`; remove it
224
- - **Webhook 401 despite valid HMAC** — check format (`github` / `gitlab` / `generic`)
225
- - **IMAP auth failure** Gmail / Outlook require app passwords, not account passwords
226
- - **High RSS / slow drain** — run the 72-hour soak (`tests/v4/daemon/soak/README.md`)
227
- - **Boot stuck on wizard** — non-TTY stdin (CI / piped); set provider env var or use `--no-ui`
228
- - **`/help` doesn't list a command** — that command likely needs an active session field; run from a real REPL
229
-
230
- ---
231
-
232
- ## Acknowledgements
233
-
234
- Built solo by **Shiva Deore** at [Taracod](https://taracod.com).
235
-
236
- Aiden builds on the open-source giants: TypeScript, Node, SQLite, better-sqlite3, Playwright, Chromium, chokidar, croner, inquirer, marked, kleur, the Model Context Protocol, and every provider SDK. Thank you.
237
-
238
- If you use Aiden in production, on a side project, or just to learn — a star on the repo is appreciated. Bug reports and feature ideas go on the [GitHub issue tracker](https://github.com/taracodlabs/aiden/issues).
239
-
240
- ---
241
-
242
- ## License
243
-
244
- - **Core runtime**: [AGPL-3.0](./LICENSE).
245
- - **Bundled skills**: [Apache-2.0](./skills/LICENSE). The future `skills.taracod.com` marketplace will ship community skills under the same permissive terms.
246
-
247
- AGPL-3.0 means: you can self-host, modify, and distribute Aiden as long as your modifications stay under AGPL. Commercial licensing for closed-source derivatives: contact <hello@taracod.com>.
248
-
249
- ---
250
-
251
- ## Links
252
-
253
- - Website: [aiden.taracod.com](https://aiden.taracod.com)
254
- - Docs: [`docs/v4.5/`](./docs/v4.5/) (in this repo)
255
- - Discord: [discord.gg/gMZ3hUnQTm](https://discord.gg/gMZ3hUnQTm)
256
- - Source: [github.com/taracodlabs/aiden](https://github.com/taracodlabs/aiden)
257
- - Standalone releases: [github.com/taracodlabs/aiden-releases](https://github.com/taracodlabs/aiden-releases)
258
- - npm: [aiden-runtime](https://www.npmjs.com/package/aiden-runtime)
259
- - Author's book: [_Omega_](https://amzn.to/4tpiXwM)
260
-
261
- ---
262
-
263
- <p align="center">
264
- <em>Local-first. Windows-native. Yours to own.</em>
265
- </p>
1
+ <img width="1672" height="941" alt="AIDEN BOOTUP LOGO" src="https://github.com/user-attachments/assets/c0809009-73e2-4d58-9292-12fbd0324952" />
2
+
3
+ ```
4
+ █████╗ ██╗██████╗ ███████╗███╗ ██╗
5
+ ██╔══██╗██║██╔══██╗██╔════╝████╗ ██║
6
+ ███████║██║██║ ██║█████╗ ██╔██╗ ██║
7
+ ██╔══██║██║██║ ██║██╔══╝ ██║╚██╗██║
8
+ ██║ ██║██║██████╔╝███████╗██║ ╚████║
9
+ ╚═╝ ╚═╝╚═╝╚═════╝ ╚══════╝╚═╝ ╚═══╝
10
+
11
+ Autonomous AI Engine — local-first, Windows-native, yours to own
12
+
13
+ 74 skills · 60 tools · 19 providers · 9 channels · AGPL-3.0
14
+
15
+ Windows · Linux · WSL · macOS (API Mode)
16
+ ```
17
+ <div align="center">
18
+
19
+ # Aiden
20
+
21
+ **Autonomous AI Engine — local-first, Windows-native, yours to own**
22
+
23
+ *74 skills · 60 tools · 19 providers · 9 channels · AGPL-3.0*
24
+
25
+ <br>
26
+
27
+ <!-- Status row -->
28
+ [![npm version](https://img.shields.io/npm/v/aiden-runtime?color=FF6B35&label=npm&style=for-the-badge)](https://www.npmjs.com/package/aiden-runtime)
29
+ [![npm downloads](https://img.shields.io/npm/dm/aiden-runtime?color=FF6B35&style=for-the-badge)](https://www.npmjs.com/package/aiden-runtime)
30
+ [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-FF6B35?style=for-the-badge)](LICENSE)
31
+ [![GitHub stars](https://img.shields.io/github/stars/taracodlabs/aiden?color=FF6B35&style=for-the-badge)](https://github.com/taracodlabs/aiden/stargazers)
32
+ [![GitHub forks](https://img.shields.io/github/forks/taracodlabs/aiden?color=FF6B35&style=for-the-badge)](https://github.com/taracodlabs/aiden/network/members)
33
+ [![GitHub issues](https://img.shields.io/github/issues/taracodlabs/aiden?color=FF6B35&style=for-the-badge)](https://github.com/taracodlabs/aiden/issues)
34
+
35
+ <br>
36
+
37
+ <!-- Community row -->
38
+ [![Discord](https://img.shields.io/badge/Discord-Join-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/CU5wshJW4F)
39
+ [![Website](https://img.shields.io/badge/Website-aiden.taracod.com-FF6B35?style=for-the-badge&logo=safari&logoColor=white)](https://aiden.taracod.com)
40
+ [![Book: Omega](https://img.shields.io/badge/Book-Omega-FFB088?style=for-the-badge&logo=amazon&logoColor=white)](https://amzn.to/49ceO8l)
41
+ [![Email](https://img.shields.io/badge/Contact-contact@taracod.com-4ADE80?style=for-the-badge&logo=gmail&logoColor=white)](mailto:contact@taracod.com)
42
+ [![Sponsor via Razorpay](https://img.shields.io/badge/Sponsor-Razorpay-3395FF?style=for-the-badge&logo=razorpay&logoColor=white)](https://razorpay.me/@whitelotus9625)
43
+
44
+ <br>
45
+
46
+ <!-- Language & runtime -->
47
+ ![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178C6?style=flat-square&logo=typescript&logoColor=white)
48
+ ![JavaScript](https://img.shields.io/badge/JavaScript-ES2022-F7DF1E?style=flat-square&logo=javascript&logoColor=black)
49
+ ![Node.js](https://img.shields.io/badge/Node.js-≥18-339933?style=flat-square&logo=node.js&logoColor=white)
50
+ ![ESM](https://img.shields.io/badge/Modules-ESM-FFB088?style=flat-square)
51
+ ![esbuild](https://img.shields.io/badge/Bundler-esbuild-FFCF00?style=flat-square&logo=esbuild&logoColor=black)
52
+ ![npm](https://img.shields.io/badge/Registry-npm-CB3837?style=flat-square&logo=npm&logoColor=white)
53
+
54
+ <!-- Platforms -->
55
+ ![Windows](https://img.shields.io/badge/Windows-11-0078D6?style=flat-square&logo=windows&logoColor=white)
56
+ ![Linux](https://img.shields.io/badge/Linux-supported-FCC624?style=flat-square&logo=linux&logoColor=black)
57
+ ![WSL](https://img.shields.io/badge/WSL-2-4D4D4D?style=flat-square&logo=linux&logoColor=white)
58
+ ![macOS](https://img.shields.io/badge/macOS-API_mode-000000?style=flat-square&logo=apple&logoColor=white)
59
+ ![PowerShell](https://img.shields.io/badge/PowerShell-7-5391FE?style=flat-square&logo=powershell&logoColor=white)
60
+
61
+ <!-- Core infrastructure -->
62
+ ![SQLite](https://img.shields.io/badge/SQLite-FTS5-003B57?style=flat-square&logo=sqlite&logoColor=white)
63
+ ![better-sqlite3](https://img.shields.io/badge/better--sqlite3-11.x-003B57?style=flat-square&logo=sqlite&logoColor=white)
64
+ ![Playwright](https://img.shields.io/badge/Playwright-browser-45ba4b?style=flat-square&logo=playwright&logoColor=white)
65
+ ![Chromium](https://img.shields.io/badge/Chromium-headless-4285F4?style=flat-square&logo=googlechrome&logoColor=white)
66
+ ![Docker](https://img.shields.io/badge/Docker-sandbox-2496ED?style=flat-square&logo=docker&logoColor=white)
67
+ ![MCP](https://img.shields.io/badge/Model_Context_Protocol-1.0-FF6B35?style=flat-square)
68
+
69
+ <!-- Streaming + runtime features -->
70
+ ![SSE](https://img.shields.io/badge/SSE-streaming-FF6B35?style=flat-square)
71
+ ![Daemon mode](https://img.shields.io/badge/Daemon-opt--in-FFB088?style=flat-square)
72
+ ![Sub-agents](https://img.shields.io/badge/Sub--agents-fanout-FFB088?style=flat-square)
73
+ ![TCE](https://img.shields.io/badge/TCE-error_recovery-4ADE80?style=flat-square)
74
+ ![Sandbox](https://img.shields.io/badge/Sandbox-tiered-FBBF24?style=flat-square)
75
+ ![BYOK](https://img.shields.io/badge/BYOK-pure-FF6B35?style=flat-square)
76
+
77
+ <!-- Providers (sample) -->
78
+ ![Groq](https://img.shields.io/badge/Groq-fast-F55036?style=flat-square)
79
+ ![Anthropic](https://img.shields.io/badge/Anthropic-Claude-D97757?style=flat-square&logo=anthropic&logoColor=white)
80
+ ![OpenAI](https://img.shields.io/badge/OpenAI-GPT-412991?style=flat-square&logo=openai&logoColor=white)
81
+ ![Gemini](https://img.shields.io/badge/Google-Gemini-4285F4?style=flat-square&logo=google&logoColor=white)
82
+ ![Ollama](https://img.shields.io/badge/Ollama-local-000000?style=flat-square&logo=ollama&logoColor=white)
83
+ ![+14 more](https://img.shields.io/badge/+14_more-providers-B8A893?style=flat-square)
84
+
85
+ <!-- Channels -->
86
+ ![Discord channel](https://img.shields.io/badge/Channel-Discord-5865F2?style=flat-square&logo=discord&logoColor=white)
87
+ ![Slack channel](https://img.shields.io/badge/Channel-Slack-4A154B?style=flat-square&logo=slack&logoColor=white)
88
+ ![Telegram channel](https://img.shields.io/badge/Channel-Telegram-26A5E4?style=flat-square&logo=telegram&logoColor=white)
89
+ ![Email channel](https://img.shields.io/badge/Channel-Email-EA4335?style=flat-square&logo=gmail&logoColor=white)
90
+ ![Webhook channel](https://img.shields.io/badge/Channel-Webhook-FF6B35?style=flat-square)
91
+ ![+4 more](https://img.shields.io/badge/+4_more-channels-B8A893?style=flat-square)
92
+
93
+ <!-- Quality + identity -->
94
+ ![Built solo](https://img.shields.io/badge/Built-solo-B8A893?style=flat-square)
95
+ ![By Taracod](https://img.shields.io/badge/By-Taracod-FF6B35?style=flat-square)
96
+ ![White Lotus](https://img.shields.io/badge/Brand-White_Lotus-FFB088?style=flat-square)
97
+ ![v4.6.1](https://img.shields.io/badge/Latest-v4.6.1-4ADE80?style=flat-square)
98
+
99
+ </div>
100
+
101
+ <br>
102
+
103
+ <img width="929" height="673" alt="image" src="https://github.com/user-attachments/assets/78224b1f-5517-4865-9142-48dd0a68fb46" />
104
+
105
+
106
+
107
+
108
+ > A semi-autonomous AI agent that runs on your machine. Touches your files, browser, and shell. Remembers what matters. Built solo. Open source. Still rough in spots.
109
+
110
+ <br>
111
+
112
+ ## Try it in 60 seconds
113
+
114
+ ```bash
115
+ npm install -g aiden-runtime
116
+ aiden
117
+ ```
118
+
119
+ That's it. Pick a provider (Groq is free + fastest), paste your key, and start chatting.
120
+
121
+ **Want autonomous triggers?**
122
+
123
+ ```bash
124
+ export AIDEN_DAEMON=1 # PowerShell: $env:AIDEN_DAEMON = "1"
125
+ aiden trigger add file --path ~/Documents/inbox --label "watch-inbox" --include "*.txt"
126
+ aiden # boots the REPL + dispatcher
127
+ ```
128
+
129
+ Drop a file in `~/Documents/inbox/anything.txt` and Aiden acts on it. The agent turn is visible via `aiden runs list`.
130
+
131
+ <br>
132
+
133
+ ![Aiden in action](docs/screenshots/autonomy.png)
134
+
135
+ <br>
136
+
137
+ ## What's new in v4.6
138
+
139
+ **Aiden now spawns workers and learns from itself.**
140
+
141
+ - **Sub-agents.** `spawn_sub_agent` runs a focused child with an isolated context + intersected toolset; `subagent_fanout` runs N children in parallel (ensemble or partition) with merge strategies (`all` / `vote` / `pick-best` / `combine`) and provider rotation across configured fallback slots.
142
+ - **Operator kill-switch.** `/spawn-pause on|off|status` blocks new sub-agent spawning while in-flight children continue. Marker file at `~/.aiden/spawn.paused` so the state survives restart and is shared across REPL, daemon, and MCP runtimes. Optional reason field captured in the typed `SUBAGENT_SPAWN_PAUSED` error envelope.
143
+ - **Self-improvement loop foundation.** TCE classifications + recoveries persist to two new SQLite tables (`failure_signatures`, `recovery_reports`); `/recovery list|show|clear` surfaces recurring failure patterns across sessions.
144
+ - **REPL parent-run lineage.** Each REPL turn writes its own `runs` row; sub-agent children link back via `spawned_from_run_id`. `aiden runs list` hides children by default and shows a `(N children, M OK)` badge per parent; `--include-children` flips to flat view.
145
+ - **PlannerGuard opt-in.** The keyword-based per-turn tool narrower is **OFF by default** in v4.6 (modern models pick well from the full catalog). Enable via `/planner-guard on` or `AIDEN_PLANNER_GUARD=1` for smaller local models.
146
+ - **v4.6.1 onboarding redesign.** Fresh disclaimer screen, loading sequence, rich provider picker with live `/models` fetch, 3-step connection probe, success screen, and `/walkthrough` guided tour. Phase 2 also fixed an MCP-mode `subagent_fanout` regression that had silently broken in the v4.5 refactor.
147
+
148
+ <br>
149
+
150
+ ## What's new in v4.5
151
+
152
+ **Aiden now wakes up by itself.**
153
+
154
+ - **Persistent daemon mode (opt-in).** `AIDEN_DAEMON=1` boots a background service with a SQLite-backed trigger bus. File watchers, webhook endpoints, IMAP polling, and cron schedules all feed the same durable queue.
155
+ - **Autonomous trigger dispatch.** When a trigger fires, a real `AidenAgent` turn runs end-to-end — same tools, same sandbox, same recovery pipeline as your interactive REPL. Surface the chain with `aiden runs show <id>`.
156
+ - **Execution sandbox with risk tiers.** Filesystem allowlist + Docker session backend + dry-run preflight. Default on; flip live with `/sandbox on|off`.
157
+ - **State-aware browser depth.** URL + DOM + iframe-tree capture before/after every browser tool call. Stale-ref auto-retry. Surfaces login / 2FA / captcha / consent blockers as structured cards.
158
+ - **Continuous error recovery (TCE).** 16 failure categories classified per tool call. Smart retry with cooldown. Dead-letter for permanent failures. Recovery report enriches the REPL's capability card.
159
+ - **Live-flip slash commands.** `/sandbox`, `/tce`, `/browser-depth`, `/daemon status`, `/suggestions`, `/update` — toggle every subsystem without restart. Choices persist to `config.yaml`.
160
+ - **Update notification + `/update` CLI.** Boot prompt when a newer version is on npm. Skip-this-version persistence. Install-method detection (npm-global / npx / standalone).
161
+
162
+ Full v4.5 internals: [`docs/v4.5/`](docs/v4.5/) (overview, triggers, architecture, daemon on Linux/macOS/Windows, troubleshooting).
163
+
164
+ <br>
165
+
166
+ ## Core capabilities
167
+
168
+ | Category | What Aiden does |
169
+ |---|---|
170
+ | **Inference & providers** | 19 providers: Anthropic, OpenAI, Groq, Gemini, OpenRouter, Together, NVIDIA NIM, DeepSeek, Mistral, Z.ai, Kimi, MiniMax, Hugging Face, Ollama (fully offline), Nous Portal, custom OpenAI-compatible endpoints. OAuth subscription routing for Claude Pro and ChatGPT Plus. |
171
+ | **60 built-in tools** | Web search & fetch, deep research, YouTube search, Playwright browser automation (10 tools), file ops, process control, shell exec, code execution, system info, screenshot, clipboard, app launch, media keys, MCP bridge, memory ops, session list/search/summary/recall, skill view/list/manage, `aiden_self_update`. |
172
+ | **74 bundled skills** | Composable workflows each with a `SKILL.md` prompt, optional helper scripts, and tool requirements. GitHub PR/issue workflows, NSE / Upstox / Zerodha trading, Censys / Shodan / VirusTotal lookups, Windows Defender / Task Scheduler, Docker management, YouTube content tools, and more. |
173
+ | **Self-promoting memory** | `USER.md` + `SOUL.md` identity, plus `MEMORY.md` split between durable facts (compression-protected) and recent-session distillations. Each session ends with a structured summary that graduates durable facts into the protected section. Semantic recall over past sessions via `recall_session`. |
174
+ | **Voice** | Edge TTS / Windows SAPI text-to-speech, speech-to-text helpers. |
175
+ | **Channel adapters** | Discord, Slack, Telegram, WhatsApp, Email (IMAP+SMTP), Webhook, Twilio SMS, iMessage (macOS), Signal — any channel triggers the same agent loop. |
176
+ | **Computer use** | Screenshot capture, screen-state vision loop, browser automation. Mouse/keyboard automation partial. |
177
+ | **v4.5 daemon mode (opt-in)** | File watcher / webhook / email IMAP / scheduled triggers route through a durable trigger bus consumed by the Phase 5a dispatcher. Triggers fire → real agent runs → tool calls execute → `run_events` captures the chain. **Off by default.** |
178
+ | **Plugins** | Three bundled plugins: Chrome DevTools Protocol bridge, Claude Pro OAuth, ChatGPT Plus OAuth. Permission-state machine (pending-grant / loaded / suspended). |
179
+ | **MCP** | Model Context Protocol bridge stdio + HTTP transports, schema discovery, tool dispatch. |
180
+ | **Security moat** | Tiered approval engine (`safe` / `caution` / `dangerous`), dangerous-command pattern classifier, honesty enforcement (post-loop scan rewrites false claims), memory guard, planner-guard tool narrowing, SSRF-safe URL fetcher, secret/PII pre-write scanner, skill-teacher (auto-create skills from successful flows). |
181
+
182
+ <br>
183
+
184
+ ## Architecture
185
+
186
+ Aiden is a local-first agent loop: provider adapters feed a 90-turn ceiling, every tool call passes through verification + failure classification + recovery, and tool results stream back as structured envelopes the model can reason over. v4.5 added a SQLite daemon foundation alongside the REPL — file watchers and webhook endpoints write to a durable trigger bus, a single-worker dispatcher claims events, and each trigger fires a fresh agent turn keyed by a stable session id. Sandboxed execution (filesystem allow/deny + Docker session backend), state-aware browser observation, and continuous error recovery apply to daemon-fired turns identically to REPL turns.
187
+
188
+ Detailed diagrams + module map in [`docs/v4.5/architecture.md`](docs/v4.5/architecture.md).
189
+
190
+ <br>
191
+
192
+ ## Install + first run
193
+
194
+ ### Linux / WSL / macOS (one-line)
195
+
196
+ ```bash
197
+ npm install -g aiden-runtime
198
+ aiden # interactive setup wizard fires on first run
199
+ ```
200
+
201
+ ### Windows (one-line)
202
+
203
+ ```powershell
204
+ npm install -g aiden-runtime
205
+ aiden
206
+ ```
207
+
208
+ If you hit native-build errors on Windows, install the [windows-build-tools](https://github.com/felixrieseberg/windows-build-tools) prerequisite first.
209
+
210
+ ### Try without installing
211
+
212
+ ```bash
213
+ npx aiden-runtime
214
+ ```
215
+
216
+ ### After pulling updates
217
+
218
+ ```bash
219
+ npm install -g aiden-runtime@latest
220
+ ```
221
+
222
+ Or, from inside a running session, the slash command:
223
+ /update install
224
+
225
+ (Aiden also prompts you on boot when a newer version is on npm — see `/update auto off` to silence.)
226
+
227
+ ### Uninstall
228
+
229
+ ```bash
230
+ npm uninstall -g aiden-runtime
231
+ ```
232
+
233
+ To also wipe your local Aiden home (config, sessions, memory, skills):
234
+
235
+ ```bash
236
+ # Linux / macOS
237
+ rm -rf ~/.aiden
238
+
239
+ # Windows (PowerShell)
240
+ Remove-Item -Recurse -Force $env:LOCALAPPDATA\aiden
241
+ ```
242
+
243
+ <br>
244
+
245
+ <img width="938" height="1049" alt="preview (3)" src="https://github.com/user-attachments/assets/93af497d-0fe3-4e2b-aa73-7739682c18b1" />
246
+
247
+
248
+ ## Setup wizard
249
+
250
+ The first time you run `aiden`, you'll see:
251
+
252
+ 1. **Disclaimer screen** — honest about what Aiden can touch (files, browser, shell)
253
+ 2. **Loading sequence** — system check, skills load, tools register, memory init
254
+ 3. **Provider picker** pick from 19 providers, no defaults — explicit choice
255
+ 4. **Live model fetch** — Aiden hits the provider's `/models` API for the current catalog
256
+ 5. **3-step probe** — key works → model accessible → tool calls supported
257
+ 6. **Success screen** — three example prompts to get started
258
+ 7. **REPL handoff** — first-run hint banner: `Tip: try /walkthrough`
259
+
260
+ To re-run the wizard later:
261
+
262
+ ```bash
263
+ aiden setup
264
+ ```
265
+
266
+ To diagnose without re-running:
267
+
268
+ ```bash
269
+ aiden doctor
270
+ ```
271
+
272
+ <br>
273
+
274
+ ## Switching models
275
+
276
+ Inside the REPL:
277
+ /model
278
+
279
+ Picks a provider (with `✓ authed` badges next to ones you've configured), fetches the live model list, and saves your choice to `config.yaml`. Persists across sessions.
280
+
281
+ To set the default at the env level:
282
+
283
+ ```bash
284
+ export AIDEN_DEFAULT_PROVIDER=groq
285
+ export AIDEN_DEFAULT_MODEL=llama-3.3-70b-versatile
286
+ ```
287
+
288
+ <br>
289
+
290
+ ## Configuration
291
+
292
+ Aiden reads `~/.aiden/config.yaml` (Linux/macOS) or `%LOCALAPPDATA%\aiden\config.yaml` (Windows). The setup wizard writes a starter config on first boot; subsequent edits are diff-merged.
293
+
294
+ ### Common env vars
295
+
296
+ | Variable | Default | Effect |
297
+ |---|---|---|
298
+ | `AIDEN_DAEMON` | `0` | Set to `1` to boot the daemon foundation alongside the REPL |
299
+ | `AIDEN_DAEMON_PORT` | `4200` | Daemon HTTP listener port |
300
+ | `AIDEN_DAEMON_BIND` | `127.0.0.1` | Loopback-only by default; non-loopback requires `AIDEN_API_KEY` |
301
+ | `AIDEN_DAEMON_DAILY_BUDGET` | unset | Hard daily token cap across daemon turns; resets midnight UTC |
302
+ | `AIDEN_DAEMON_MODEL` | unset | Override model for daemon turns (`<provider>/<model>`) |
303
+ | `AIDEN_SANDBOX` | `1` | `0` to disable filesystem allowlist + Docker session backend |
304
+ | `AIDEN_TCE` | `1` | `0` to disable continuous error recovery |
305
+ | `AIDEN_BROWSER_DEPTH` | `1` | `0` to disable state-aware browser observation |
306
+ | `AIDEN_API_KEY` | unset | Required for non-loopback daemon bind |
307
+ | `AIDEN_NO_UPDATE_CHECK` | `0` | Set to `1` to silence the boot-time update probe |
308
+ | `AIDEN_PLANNER_GUARD` | `0` | Set to `1` to enable keyword-based tool narrowing (helps smaller local models) |
309
+
310
+ Most flags are also flippable live via slash commands.
311
+
312
+ <br>
313
+
314
+ ## CLI commands
315
+
316
+ | Command | What it does |
317
+ |---|---|
318
+ | `aiden` | Start the REPL (runs setup wizard on first launch) |
319
+ | `aiden setup` | Re-run the onboarding wizard |
320
+ | `aiden doctor` | Diagnose providers, auth, config, and environment |
321
+ | `aiden --version` | Print the installed version |
322
+ | `aiden --help` | Show the full CLI manual |
323
+ | `aiden update` | Check for and install updates |
324
+ | `aiden daemon start` | Run the daemon in foreground |
325
+ | `aiden daemon install` | Install daemon as system service (systemd / launchd / Task Scheduler) |
326
+ | `aiden daemon status` | Show daemon health, recent triggers, run history |
327
+ | `aiden trigger add file --path <p>` | Add a file-watcher trigger |
328
+ | `aiden trigger add webhook --label <n>` | Add an HTTP webhook trigger |
329
+ | `aiden trigger add cron --schedule "<expr>"` | Add a scheduled trigger |
330
+ | `aiden trigger list` | List all configured triggers |
331
+ | `aiden runs list` | List recent agent runs (interactive + daemon) |
332
+ | `aiden runs show <id>` | Inspect a specific run's tool chain |
333
+ | `aiden runs stats` | Aggregate stats across runs |
334
+
335
+ <br>
336
+
337
+ ## In-chat slash commands
338
+
339
+ Type `/help` inside Aiden for the full list grouped by category. 38 commands total.
340
+
341
+ ### Configuration
342
+ `/model` · `/personality` · `/skin` · `/streaming` · `/reasoning` · `/verbose` · `/debug-prompt` · `/identity`
343
+
344
+ ### Session
345
+ `/clear` · `/compress` · `/save` · `/title` · `/usage`
346
+
347
+ ### System
348
+ `/sandbox` · `/tce` · `/browser-depth` · `/daemon` · `/suggestions` · `/update` · `/skills` · `/tools` · `/plugins` · `/cron` · `/runs` · `/trigger` · `/doctor` · `/status` · `/show` · `/history`
349
+
350
+ ### Sub-agents (v4.6)
351
+ `/spawn-pause on|off|status` · `/recovery list|show|clear` · `/planner-guard on|off|status`
352
+
353
+ ### Walkthrough & onboarding (v4.6.1)
354
+ `/walkthrough` — 60-second guided tour of what Aiden can do
355
+
356
+ ### Auth
357
+ `/auth login` · `/auth status` · `/auth refresh`
358
+
359
+ ### MCP
360
+ `/reload-mcp` · `/setup`
361
+
362
+ <br>
363
+
364
+ ## Daemon mode (opt-in)
365
+
366
+ ### Linux
367
+
368
+ ```bash
369
+ export AIDEN_DAEMON=1
370
+ aiden daemon install
371
+ loginctl enable-linger $USER # keep running between sessions
372
+ ```
373
+
374
+ ### macOS
375
+
376
+ ```bash
377
+ export AIDEN_DAEMON=1
378
+ aiden daemon install # installs launchd plist
379
+ ```
380
+
381
+ ### Windows
382
+
383
+ See [`docs/v4.5/daemon-windows.md`](docs/v4.5/daemon-windows.md). Recommended: foreground (`aiden daemon start`) or `pm2` for background.
384
+
385
+ <br>
386
+
387
+ ## Troubleshooting
388
+
389
+ Common issues live in [`docs/v4.5/troubleshooting.md`](docs/v4.5/troubleshooting.md). Quick reference:
390
+
391
+ - **"daemon already running"** — stale `~/.aiden/daemon/runtime.lock`; remove it
392
+ - **Webhook 401 despite valid HMAC** — check format (`github` / `gitlab` / `generic`)
393
+ - **IMAP auth failure** — Gmail / Outlook require app passwords, not account passwords
394
+ - **High RSS / slow drain** — run the 72-hour soak (`tests/v4/daemon/soak/README.md`)
395
+ - **Boot stuck on wizard** — non-TTY stdin (CI / piped); set provider env var or use `--no-ui`
396
+ - **`/help` doesn't list a command** — that command likely needs an active session field; run from a real REPL
397
+ - **`npm install` permission errors on Windows** — install into a real folder (not a drive root like `S:\`)
398
+
399
+ <br>
400
+
401
+ ## The book
402
+
403
+ 📖 **Omega** — A novel about code, solitude, and what builds back. The story behind Aiden and what it means to build alone.
404
+
405
+ [![Get Omega on Amazon](https://img.shields.io/badge/Get_Omega-Amazon-FF9900?style=for-the-badge&logo=amazon&logoColor=white)](https://amzn.to/49ceO8l)
406
+
407
+ <br>
408
+
409
+ ## Sponsor
410
+
411
+ Aiden is free and open source. If it saves you time or you want it to keep getting better, sponsorship helps cover server costs, API testing, and the time to ship features instead of taking client work.
412
+
413
+
414
+ [![Sponsor via Razorpay](https://img.shields.io/badge/Sponsor-Razorpay-3395FF?style=for-the-badge&logo=razorpay&logoColor=white)](https://razorpay.me/@whitelotus9625)
415
+
416
+ Even a one-time tip or a star on the repo is appreciated.
417
+
418
+ <br>
419
+
420
+ ## Acknowledgements
421
+
422
+ Built solo by **Shiva Deore** at **Taracod**.
423
+
424
+ Aiden builds on the open-source giants: TypeScript, Node, SQLite, `better-sqlite3`, Playwright, Chromium, `chokidar`, `croner`, `inquirer`, `marked`, `kleur`, the Model Context Protocol, and every provider SDK. Thank you.
425
+
426
+ <br>
427
+
428
+ ## Contributing
429
+
430
+ Aiden is built solo right now, but contributions are welcome — bug reports, skill submissions, provider adapters, documentation fixes.
431
+
432
+ Before opening a PR:
433
+
434
+ 1. Fork the repo
435
+ 2. `npm install`
436
+ 3. Make your changes on a feature branch
437
+ 4. `npm run build` — confirm it compiles
438
+ 5. Test with `aiden` locally
439
+ 6. Open a PR with a clear description of what changed and why
440
+
441
+ Keep PRs focused. One feature or fix per PR. Be honest in the description about what works and what doesn't.
442
+
443
+ <br>
444
+
445
+ ## License
446
+
447
+ - **Core runtime**: [AGPL-3.0](LICENSE). You can self-host, modify, and distribute Aiden as long as your modifications stay under AGPL.
448
+ - **Bundled skills**: Apache-2.0. Use them however you want.
449
+ - **Commercial licensing** for closed-source derivatives: contact [hello@taracod.com](mailto:hello@taracod.com).
450
+
451
+ The future `skills.taracod.com` marketplace will ship community skills under the same permissive terms.
452
+
453
+ <br>
454
+
455
+ ## Links
456
+
457
+ | Where | What |
458
+ |---|---|
459
+ | 🌐 **Website** | [aiden.taracod.com](https://aiden.taracod.com) |
460
+ | 💬 **Discord** | [discord.gg/CU5wshJW4F](https://discord.gg/CU5wshJW4F) |
461
+ | 📦 **npm** | [aiden-runtime](https://www.npmjs.com/package/aiden-runtime) |
462
+ | 🐙 **Source** | [github.com/taracodlabs/aiden](https://github.com/taracodlabs/aiden) |
463
+ | 📁 **Standalone releases** | [github.com/taracodlabs/aiden-releases](https://github.com/taracodlabs/aiden-releases) |
464
+ | 📖 **Book — Omega** | [Amazon](https://amzn.to/49ceO8l) |
465
+ | 📚 **Docs** | [`docs/v4.5/`](docs/v4.5/) (in this repo) |
466
+ | 💖 **Sponsor (Razorpay)** | [razorpay.me/@whitelotus9625](https://razorpay.me/@whitelotus9625) |
467
+ | ✉️ **Contact** | [contact@taracod.com](mailto:contact@taracod.com) |
468
+
469
+ <br>
470
+
471
+ ## Disclaimer
472
+
473
+ Aiden can touch your files, run shell commands, and access the web. It's autonomous within the limits you set. Things will go wrong sometimes. Use at your own risk, read the code if you're nervous, and report what breaks.
474
+
475
+ **Built solo. Started as a hobby project. Still rough in spots. Getting better every week.**
476
+
477
+ ---
478
+
479
+ <div align="center">
480
+
481
+ **By Taracod · White Lotus**
482
+
483
+ </div>
484
+ ---
485
+
486
+ <p align="center">
487
+ <em>Local-first. Windows-native. Yours to own.</em>
488
+ </p>