ada-agent 0.2.0 → 0.3.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.
Files changed (39) hide show
  1. package/README.md +262 -263
  2. package/bench/README.md +88 -88
  3. package/bench/swebench.mjs +242 -242
  4. package/docs/architecture.md +163 -163
  5. package/docs/architecture.svg +73 -73
  6. package/docs/cloudflare.md +81 -81
  7. package/docs/connectors.md +49 -49
  8. package/docs/integrations.md +62 -62
  9. package/package.json +66 -65
  10. package/skills/aesthetic-direction/SKILL.md +24 -24
  11. package/skills/color-palette/SKILL.md +24 -24
  12. package/skills/component-library/SKILL.md +23 -23
  13. package/skills/dark-mode/SKILL.md +24 -24
  14. package/skills/dashboard-ui/SKILL.md +23 -23
  15. package/skills/design-system/SKILL.md +24 -24
  16. package/skills/design-tokens/SKILL.md +24 -24
  17. package/skills/empty-states/SKILL.md +23 -23
  18. package/skills/hero-section/SKILL.md +23 -23
  19. package/skills/micro-interactions/SKILL.md +23 -23
  20. package/skills/motion-design/SKILL.md +23 -23
  21. package/skills/page-transitions/SKILL.md +23 -23
  22. package/skills/pricing-page/SKILL.md +23 -23
  23. package/skills/scroll-animation/SKILL.md +23 -23
  24. package/skills/skeleton-loader/SKILL.md +23 -23
  25. package/skills/tailwind-theme/SKILL.md +24 -24
  26. package/skills/typography/SKILL.md +24 -24
  27. package/skills/ui-polish/SKILL.md +24 -24
  28. package/skills/ui-review/SKILL.md +24 -24
  29. package/skills/web-fonts/SKILL.md +24 -24
  30. package/src/client/autostart.ts +93 -0
  31. package/src/client/catalog.json +1 -1
  32. package/src/client/cli.ts +1275 -1262
  33. package/src/client/models-dev.ts +106 -106
  34. package/src/selfcheck.ts +404 -390
  35. package/src/server/config.ts +65 -65
  36. package/src/server/providers/openai-compat.ts +78 -78
  37. package/src/server/providers/registry.ts +32 -32
  38. package/src/server/router.ts +33 -33
  39. package/src/shared/types.ts +21 -21
package/README.md CHANGED
@@ -1,263 +1,262 @@
1
- # ada
2
-
3
- [![npm](https://img.shields.io/npm/v/ada-agent)](https://www.npmjs.com/package/ada-agent)
4
- [![CI](https://github.com/black141312/ada/actions/workflows/ci.yml/badge.svg)](https://github.com/black141312/ada/actions/workflows/ci.yml)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
- [![Node ≥ 18](https://img.shields.io/badge/node-%E2%89%A518-green.svg)](package.json)
7
-
8
- A coding agent built from zero — a terminal client in the spirit of pi / Codex / Cursor,
9
- that holds every provider key and speaks one wire
10
- format to the client.
11
-
12
- ![ada architecture](docs/architecture.svg)
13
-
14
- The client talks **only** OpenAI Chat Completions to the backend. The backend routes each request
15
- to the right provider by model id and normalizes every provider back to that one format — so a new
16
- model is **zero code**, and a new OpenAI-compatible provider is **two lines**.
17
-
18
- ---
19
-
20
- ## Features
21
-
22
- - **Agentic loop** — streams, calls tools, feeds results back, repeats until done.
23
- - **Tools** — `read_file`, `write_file`, `edit_file` (exact-match), `apply_patch` (multi-file),
24
- `bash`, `ls`, `grep` (uses `rg` if present), `glob`, `web_fetch`, `web_search`, `lsp_diagnostics`,
25
- `ask_user` (clarifying questions).
26
- - **Auto-format on edit** — written files are formatted with the project's formatter
27
- (prettier/gofmt/rustfmt/ruff/shfmt) in trusted projects; off via `ADA_NO_FORMAT`.
28
- - **LSP diagnostics** — `lsp_diagnostics` runs a language server (typescript-language-server,
29
- pyright, gopls, rust-analyzer) and returns errors/warnings; servers are reused, trusted-project only.
30
- - **Real PTY shell** — `bash` runs in a pseudo-terminal (node-pty), so TTY-only programs, colour, and
31
- progress output behave; ANSI is stripped from what the model sees.
32
- - **Two front-ends** — a classic readline REPL and an inline **TUI** (`--tui`) with a live "thinking"
33
- spinner and Claude-style turn markers.
34
- - **Permission modes — ask / plan / auto** — `/ask` confirms each tool, `/plan` is read-only (ada
35
- plans, `/run` to execute), `/auto` runs freely (destructive `bash` still confirms). Each approval
36
- states in plain words what it wants ("ada wants to run a shell command…") instead of raw args.
37
- - **Skills that actually fire** — ~285 built-in skills; ada routes every request and **auto-applies**
38
- a clearly-matching one (injecting its procedure), or suggests skills to load. See [Skills](#skills).
39
- - **todos**, **checkpoint/undo** (revert the agent's edits), **protected paths**, **git worktrees**,
40
- **workspace snapshots** (`/snapshot` `/restore`), **named agents**, and **subagents** (`spawn_agent`).
41
- - **Sessions** — every turn is persisted; `--continue` / `--resume` to pick up where you left off.
42
- - **Context compaction** — summarizes old turns automatically as context grows.
43
- - **Sign in with GitHub or Google** (RFC 8628 device flow) — zero client config.
44
- - **Extensible** — extensions (tools + hooks + commands), prompt templates, skills, and MCP servers.
45
- - **No build step** — TypeScript run through `tsx`.
46
-
47
- ## Providers
48
-
49
- The backend proxies any OpenAI-compatible upstream and translates the one that isn't (Anthropic):
50
-
51
- | Provider | Models | Key env var |
52
- |---|---|---|
53
- | OpenAI | `gpt-*`, `o*` | `OPENAI_API_KEY` |
54
- | Anthropic | `claude-*` | `ANTHROPIC_API_KEY` |
55
- | Google Gemini | `gemini-*`, `gemma-*` | `GEMINI_API_KEY` |
56
- | Mistral | `mistral-*`, `codestral-*`, … | `MISTRAL_API_KEY` |
57
- | DeepSeek | `deepseek-*` | `DEEPSEEK_API_KEY` |
58
- | xAI (Grok) | `grok-*` | `XAI_API_KEY` |
59
- | DashScope (Qwen) | `qwen-*`, `qwq-*` | `DASHSCOPE_API_KEY` |
60
- | **Cloudflare** (Workers AI / AI Gateway) | `@cf/*` (e.g. `@cf/moonshotai/kimi-k2.7-code`) | `CLOUDFLARE_API_TOKEN` (+ `CLOUDFLARE_ACCOUNT_ID`) |
61
- | Groq | `groq/<model>` | `GROQ_API_KEY` |
62
- | Together | `together/<model>` | `TOGETHER_API_KEY` |
63
- | OpenRouter | everything else | `OPENROUTER_API_KEY` |
64
- | **Ollama (local)** | `name:tag` (e.g. `qwen2.5-coder:latest`) | *keyless* |
65
-
66
- Routing: a model id containing `:` → local Ollama; `@cf/*` → Cloudflare; `groq/…`/`together/…` pick
67
- those providers (their model names — `llama-3.3`, `gemma2` — are ambiguous, so they're explicit);
68
- otherwise by prefix; an explicit `provider`
69
- field always wins. Set only the keys you have — the rest stay dormant (vendor SDKs load lazily).
70
-
71
- **Cloudflare** (Workers AI or AI Gateway) is a step-by-step of its own — see
72
- **[docs/cloudflare.md](docs/cloudflare.md)**.
73
-
74
- ---
75
-
76
- ## Install
77
-
78
- Requires **Node ≥ 18** (and a C toolchain, since `node-pty` builds natively).
79
-
80
- **Run it without installing — `npx`:**
81
-
82
- ```bash
83
- npx ada-agent # the client (published to npm)
84
- npx -p ada-agent ada-server # the backend (second bin in the same package)
85
- # straight from source, no publish needed:
86
- npx github:black141312/ada
87
- ```
88
-
89
- **Install globally** (puts `ada` and `ada-server` on your PATH):
90
-
91
- ```bash
92
- npm install -g ada-agent
93
- ada
94
- ```
95
-
96
- **From a clone** (for hacking on it):
97
-
98
- ```bash
99
- git clone https://github.com/black141312/ada.git
100
- cd ada && npm install
101
- npm link # global `ada` / `ada-server` · or `npm start`
102
- ```
103
-
104
- > The published-npm commands work once a maintainer has run `npm publish`; the `github:` form works
105
- > against the repo today.
106
-
107
- ## Quickstart
108
-
109
- ada is two processes: a **backend** (holds keys, routes) and the **`ada`** client.
110
-
111
- **Option Alocal, no keys (Ollama):**
112
-
113
- ```bash
114
- # terminal 1: backend
115
- ada-server # http://localhost:8787
116
-
117
- # terminal 2: the agent
118
- ada # pick a local model and chat
119
- ```
120
-
121
- **Option B — a cloud provider:**
122
-
123
- ```bash
124
- # terminal 1
125
- export ANTHROPIC_API_KEY=sk-ant-... # and/or OPENAI_API_KEY, GEMINI_API_KEY, …
126
- ada-server
127
-
128
- # terminal 2
129
- ada --model claude-opus-4-8
130
- ```
131
-
132
- Windows PowerShell: `$env:ANTHROPIC_API_KEY="sk-ant-..."`.
133
-
134
- ---
135
-
136
- ## Using `ada`
137
-
138
- ```bash
139
- ada # interactive; pick a model on first run
140
- ada --tui # inline TUI front-end
141
- ada --model <id> # start on a specific model
142
- ada --list-models # everything your keys can reach (via the backend)
143
- ada --continue # resume the most recent session
144
- ada --resume # pick a session to resume
145
- ada --yolo # auto-approve tool calls (skip prompts)
146
- ada -p "fix the build" # one-shot: print the answer and exit
147
- ```
148
-
149
- **Slash commands** (in a session): `/ask` · `/plan` · `/auto` · `/mode` (cycle the permission mode) ·
150
- `/run` · `/model [id]` · `/models` · `/reasoning low|medium|high|off` ·
151
- `/strategy react|single|plan|multi|toolsmith` · `/agent [name]` · `/todos` · `/undo` · `/snapshot` ·
152
- `/restore` · `/jobs` · `/fork` · `/tree` · `/rewind` · `/compact` · `/context` · `/cost` ·
153
- `/image <path>` · `/paste` · `/login` · `/logout` · `/exit`.
154
-
155
- **Permission modes** switch with `/ask` · `/plan` · `/auto` (or `/mode` to cycle); the current mode
156
- shows in the prompt line. In **ask** mode each gated tool prompts with what it wants in plain words
157
- (`ada wants to run a shell command…`) and one key: `[y]es` · `[a]uto` (run the rest without asking) ·
158
- `[p]lan` · `[n]o`. **plan** is read-only ada plans but won't edit; `/run` approves and executes.
159
- **auto** runs tools without asking (destructive `bash` still confirms). `--yolo` starts in **auto**.
160
-
161
- **Subcommands:** `ada mcp …` (connectors) · `ada skill add <url>` · `ada worktree add <name>` ·
162
- `ada catalog [provider]` (offline model/price catalog) · `ada serve` (HTTP API) · `ada share`
163
- (view a session) · `ada acp` (editor bridge). See
164
- [docs/integrations.md](docs/integrations.md) for the HTTP API, the typed SDK, and ACP.
165
-
166
- **Orchestration strategies** the harness runs pluggable agent architectures (`--strategy <name>`
167
- or `/strategy`): `react` (default loop), `single` (one shot), `plan` (plan→execute), `multi`
168
- (sub-agent fan-out), and `toolsmith` (read a connected integration's docs and have sub-agents author
169
- skills for it). See [docs/orchestration.md](docs/orchestration.md).
170
-
171
- **Sign in** (optional identifies you to the backend): run `/login`, choose GitHub or Google, and
172
- enter the device code in your browser. The token is stored locally and sent as your client key.
173
-
174
- ## Skills
175
-
176
- ada ships with **~285 built-in skills** across ~30 categories specialized instructions the model
177
- pulls in only when a task needs them (progressive disclosure). ada **routes** every request with a
178
- relevance ranker over names + descriptions: when one skill clearly fits, ada **auto-applies** it
179
- injecting its procedure so even a weak model follows it (announced as `↳ skill: <name>`); when the
180
- match is ambiguous it just suggests them. The model can also browse with **`list_skills`** (by
181
- `category`/`filter`), search with **`find_skill`** (ranked), and load one with **`use_skill`** so
182
- nothing bloats the prompt until it's used. A sample of the categories:
183
-
184
- `git` · `review` · `testing` · `debugging` · `refactoring` · `docs` · `security` · `ci-cd` ·
185
- `performance` · `database` · `api` · `frontend` · `ui-design` · `html` · `pptx` · `image` ·
186
- `graphics` · `languages` · `frameworks` · `mobile` · `cloud` · `observability` · `data-ml` ·
187
- `agent-llm` · `web3` · `networking` · `shell` · `connectors` · `compliance` · …
188
-
189
- Examples: `commit`, `code-review`, `dockerize`, `migration`, `react-hooks`, `terraform-module`,
190
- `rag-pipeline`, `security-audit`, `project-overview`, `architecture-diagram`, `graphify`, `ponytail`.
191
-
192
- Add your own as `SKILL.md` files under `.ada/skills/<name>/` (project) or `~/.ada/skills/<name>/`
193
- (global) `---\ndescription: …\ncategory: …\n---` front-matter is all that's required. Project
194
- skills override global, which override the built-ins. Install remote ones with
195
- `ada skill add <url>` (a `SKILL.md` or a JSON index); `ada skill list` shows them.
196
-
197
- ## Connectors (MCP)
198
-
199
- ada reaches external tools and data through MCP servers. Browse the catalog and add one:
200
-
201
- ```bash
202
- ada mcp # list the catalog (filesystem, github, postgres, slack, sentry, …)
203
- ada mcp add github # write it into .ada/mcp.json, then set the token it prints
204
- ```
205
-
206
- Both **local stdio** servers (`{ command, args }`) and **remote HTTP** servers (`{ url, headers }`)
207
- are supported; their tools appear as `<server>__<tool>`, approval-gated, in trusted projects. See
208
- [docs/connectors.md](docs/connectors.md), or the `connectors` skill category for per-connector setup.
209
-
210
- ## Configuration
211
-
212
- **Client** (`ada`):
213
-
214
- | Env var | Default | Purpose |
215
- |---|---|---|
216
- | `ADA_BACKEND_URL` | `http://localhost:8787/v1` | Where the backend lives |
217
- | `ADA_CLIENT_KEY` | stored login token, else `dev` | Bearer sent to the backend |
218
- | `ADA_MODEL` | | Default model id |
219
- | `ADA_COMPACT_AT` | `100000` | Token estimate that triggers compaction |
220
- | `ADA_AUTO_APPROVE` | — | `1` behave like `--yolo` |
221
- | `NO_COLOR` / `ADA_THEME` | — | Disable color / theme overrides |
222
-
223
- **Backend** (`ada-server`):
224
-
225
- | Env var | Default | Purpose |
226
- |---|---|---|
227
- | `ADA_PORT` | `8787` | Listen port |
228
- | `ADA_CLIENT_KEYS` | *(unset = dev/no-auth)* | Comma-separated allowed client keys |
229
- | `ADA_REQUIRE_LOGIN` / `ADA_ALLOWED_USERS` | | Gate access to verified GitHub/Google users |
230
- | `OLLAMA_BASE_URL` | `http://localhost:11434/v1` | Local Ollama endpoint |
231
- | *(provider keys)* | — | See the [Providers](#providers) table |
232
-
233
- ---
234
-
235
- ## Develop
236
-
237
- ```bash
238
- npm run typecheck # tsc --noEmit
239
- npm run selfcheck # offline checks (tools, sessions, routing, parsers, TUI)
240
- npm start # run the client from source
241
- npm run server # run the backend from source
242
- ```
243
-
244
- See **[docs/architecture.md](docs/architecture.md)** for the design (adapters, routing, request
245
- flow, file layout), **[docs/orchestration.md](docs/orchestration.md)** for the agent strategies, and
246
- **[docs/integrations.md](docs/integrations.md)** for the HTTP API / SDK / ACP.
247
-
248
- ## Benchmarks
249
-
250
- ada can run **SWE-bench Verified** it generates patches for real GitHub issues (one isolated repo
251
- clone per task), emitting an official-format `predictions.jsonl` that the official `swebench` Docker
252
- harness scores. `node bench/swebench.mjs --dataset --model --out runs/x`. See
253
- **[bench/README.md](bench/README.md)** for the full flow (dataset, prereqs, scoring command).
254
-
255
- ## Contributing
256
-
257
- Issues and PRs welcome it's a small, no-build codebase. Run `npm run typecheck && npm run selfcheck`
258
- before a PR and keep changes lean. See **[CONTRIBUTING.md](CONTRIBUTING.md)**; report vulnerabilities
259
- via **[SECURITY.md](SECURITY.md)**.
260
-
261
- ## License
262
-
263
- [MIT](LICENSE) © 2026 Aditya
1
+ # ada
2
+
3
+ [![npm](https://img.shields.io/npm/v/ada-agent)](https://www.npmjs.com/package/ada-agent)
4
+ [![CI](https://github.com/black141312/ada/actions/workflows/ci.yml/badge.svg)](https://github.com/black141312/ada/actions/workflows/ci.yml)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
+ [![Node ≥ 18](https://img.shields.io/badge/node-%E2%89%A518-green.svg)](package.json)
7
+
8
+ A coding agent built from zero — a terminal client in the spirit of pi / Codex / Cursor,
9
+ that holds every provider key and speaks one wire
10
+ format to the client.
11
+
12
+ ![ada architecture](docs/architecture.svg)
13
+
14
+ The client talks **only** OpenAI Chat Completions to the backend. The backend routes each request
15
+ to the right provider by model id and normalizes every provider back to that one format — so a new
16
+ model is **zero code**, and a new OpenAI-compatible provider is **two lines**.
17
+
18
+ ---
19
+
20
+ ## Features
21
+
22
+ - **Agentic loop** — streams, calls tools, feeds results back, repeats until done.
23
+ - **Tools** — `read_file`, `write_file`, `edit_file` (exact-match), `apply_patch` (multi-file),
24
+ `bash`, `ls`, `grep` (uses `rg` if present), `glob`, `web_fetch`, `web_search`, `lsp_diagnostics`,
25
+ `ask_user` (clarifying questions).
26
+ - **Auto-format on edit** — written files are formatted with the project's formatter
27
+ (prettier/gofmt/rustfmt/ruff/shfmt) in trusted projects; off via `ADA_NO_FORMAT`.
28
+ - **LSP diagnostics** — `lsp_diagnostics` runs a language server (typescript-language-server,
29
+ pyright, gopls, rust-analyzer) and returns errors/warnings; servers are reused, trusted-project only.
30
+ - **Real PTY shell** — `bash` runs in a pseudo-terminal (node-pty), so TTY-only programs, colour, and
31
+ progress output behave; ANSI is stripped from what the model sees.
32
+ - **Two front-ends** — a classic readline REPL and an inline **TUI** (`--tui`) with a live "thinking"
33
+ spinner and Claude-style turn markers.
34
+ - **Permission modes — ask / plan / auto** — `/ask` confirms each tool, `/plan` is read-only (ada
35
+ plans, `/run` to execute), `/auto` runs freely (destructive `bash` still confirms). Each approval
36
+ states in plain words what it wants ("ada wants to run a shell command…") instead of raw args.
37
+ - **Skills that actually fire** — ~285 built-in skills; ada routes every request and **auto-applies**
38
+ a clearly-matching one (injecting its procedure), or suggests skills to load. See [Skills](#skills).
39
+ - **todos**, **checkpoint/undo** (revert the agent's edits), **protected paths**, **git worktrees**,
40
+ **workspace snapshots** (`/snapshot` `/restore`), **named agents**, and **subagents** (`spawn_agent`).
41
+ - **Sessions** — every turn is persisted; `--continue` / `--resume` to pick up where you left off.
42
+ - **Context compaction** — summarizes old turns automatically as context grows.
43
+ - **Sign in with GitHub or Google** (RFC 8628 device flow) — zero client config.
44
+ - **Extensible** — extensions (tools + hooks + commands), prompt templates, skills, and MCP servers.
45
+ - **No build step** — TypeScript run through `tsx`.
46
+
47
+ ## Providers
48
+
49
+ The backend proxies any OpenAI-compatible upstream and translates the one that isn't (Anthropic):
50
+
51
+ | Provider | Models | Key env var |
52
+ |---|---|---|
53
+ | OpenAI | `gpt-*`, `o*` | `OPENAI_API_KEY` |
54
+ | Anthropic | `claude-*` | `ANTHROPIC_API_KEY` |
55
+ | Google Gemini | `gemini-*`, `gemma-*` | `GEMINI_API_KEY` |
56
+ | Mistral | `mistral-*`, `codestral-*`, … | `MISTRAL_API_KEY` |
57
+ | DeepSeek | `deepseek-*` | `DEEPSEEK_API_KEY` |
58
+ | xAI (Grok) | `grok-*` | `XAI_API_KEY` |
59
+ | DashScope (Qwen) | `qwen-*`, `qwq-*` | `DASHSCOPE_API_KEY` |
60
+ | **Cloudflare** (Workers AI / AI Gateway) | `@cf/*` (e.g. `@cf/moonshotai/kimi-k2.7-code`) | `CLOUDFLARE_API_TOKEN` (+ `CLOUDFLARE_ACCOUNT_ID`) |
61
+ | Groq | `groq/<model>` | `GROQ_API_KEY` |
62
+ | Together | `together/<model>` | `TOGETHER_API_KEY` |
63
+ | OpenRouter | everything else | `OPENROUTER_API_KEY` |
64
+ | **Ollama (local)** | `name:tag` (e.g. `qwen2.5-coder:latest`) | *keyless* |
65
+
66
+ Routing: a model id containing `:` → local Ollama; `@cf/*` → Cloudflare; `groq/…`/`together/…` pick
67
+ those providers (their model names — `llama-3.3`, `gemma2` — are ambiguous, so they're explicit);
68
+ otherwise by prefix; an explicit `provider`
69
+ field always wins. Set only the keys you have — the rest stay dormant (vendor SDKs load lazily).
70
+
71
+ **Cloudflare** (Workers AI or AI Gateway) is a step-by-step of its own — see
72
+ **[docs/cloudflare.md](docs/cloudflare.md)**.
73
+
74
+ ---
75
+
76
+ ## Install
77
+
78
+ Requires **Node ≥ 18** (and a C toolchain, since `node-pty` builds natively).
79
+
80
+ **Run it without installing — `npx`:**
81
+
82
+ ```bash
83
+ npx ada-agent # the client (published to npm)
84
+ npx -p ada-agent ada-server # the backend (second bin in the same package)
85
+ # straight from source, no publish needed:
86
+ npx github:black141312/ada
87
+ ```
88
+
89
+ **Install globally** (puts `ada` and `ada-server` on your PATH):
90
+
91
+ ```bash
92
+ npm install -g ada-agent
93
+ ada
94
+ ```
95
+
96
+ **From a clone** (for hacking on it):
97
+
98
+ ```bash
99
+ git clone https://github.com/black141312/ada.git
100
+ cd ada && npm install
101
+ npm link # global `ada` / `ada-server` · or `npm start`
102
+ ```
103
+
104
+ > The published-npm commands work once a maintainer has run `npm publish`; the `github:` form works
105
+ > against the repo today.
106
+
107
+ ## Quickstart
108
+
109
+ ada is two processes: a **backend** (holds keys, routes) and the **`ada`** client.
110
+
111
+ `ada` **auto-starts `ada-server`** in the background if it isn't already running one terminal is
112
+ enough for solo use. (Set `ADA_BACKEND_URL` to a remote URL to skip auto-start, or
113
+ `ADA_NO_AUTOSTART=1` to opt out entirely.)
114
+
115
+ **Option A — local, no keys (Ollama):**
116
+
117
+ ```bash
118
+ ada # pick a local model and chat (backend auto-spawns)
119
+ ```
120
+
121
+ **Option B — a cloud provider:**
122
+
123
+ ```bash
124
+ export ANTHROPIC_API_KEY=sk-ant-... # and/or OPENAI_API_KEY, GEMINI_API_KEY, …
125
+ ada --model claude-opus-4-8
126
+ ```
127
+
128
+ Windows PowerShell: `$env:ANTHROPIC_API_KEY="sk-ant-..."`.
129
+
130
+ To run `ada-server` as a long-lived shared backend (multi-client setups, or just to keep it warm),
131
+ start it manually first — `ada` will detect and reuse it.
132
+
133
+ ---
134
+
135
+ ## Using `ada`
136
+
137
+ ```bash
138
+ ada # interactive; pick a model on first run
139
+ ada --tui # inline TUI front-end
140
+ ada --model <id> # start on a specific model
141
+ ada --list-models # everything your keys can reach (via the backend)
142
+ ada --continue # resume the most recent session
143
+ ada --resume # pick a session to resume
144
+ ada --yolo # auto-approve tool calls (skip prompts)
145
+ ada -p "fix the build" # one-shot: print the answer and exit
146
+ ```
147
+
148
+ **Slash commands** (in a session): `/ask` · `/plan` · `/auto` · `/mode` (cycle the permission mode) ·
149
+ `/run` · `/model [id]` · `/models` · `/reasoning low|medium|high|off` ·
150
+ `/strategy react|single|plan|multi|toolsmith` · `/agent [name]` · `/todos` · `/undo` · `/snapshot` ·
151
+ `/restore` · `/jobs` · `/fork` · `/tree` · `/rewind` · `/compact` · `/context` · `/cost` ·
152
+ `/image <path>` · `/paste` · `/login` · `/logout` · `/exit`.
153
+
154
+ **Permission modes** — switch with `/ask` · `/plan` · `/auto` (or `/mode` to cycle); the current mode
155
+ shows in the prompt line. In **ask** mode each gated tool prompts with what it wants in plain words
156
+ (`ada wants to run a shell command…`) and one key: `[y]es` · `[a]uto` (run the rest without asking) ·
157
+ `[p]lan` · `[n]o`. **plan** is read-only ada plans but won't edit; `/run` approves and executes.
158
+ **auto** runs tools without asking (destructive `bash` still confirms). `--yolo` starts in **auto**.
159
+
160
+ **Subcommands:** `ada mcp …` (connectors) · `ada skill add <url>` · `ada worktree add <name>` ·
161
+ `ada catalog [provider]` (offline model/price catalog) · `ada serve` (HTTP API) · `ada share`
162
+ (view a session) · `ada acp` (editor bridge). See
163
+ [docs/integrations.md](docs/integrations.md) for the HTTP API, the typed SDK, and ACP.
164
+
165
+ **Orchestration strategies** — the harness runs pluggable agent architectures (`--strategy <name>`
166
+ or `/strategy`): `react` (default loop), `single` (one shot), `plan` (plan→execute), `multi`
167
+ (sub-agent fan-out), and `toolsmith` (read a connected integration's docs and have sub-agents author
168
+ skills for it). See [docs/orchestration.md](docs/orchestration.md).
169
+
170
+ **Sign in** (optional — identifies you to the backend): run `/login`, choose GitHub or Google, and
171
+ enter the device code in your browser. The token is stored locally and sent as your client key.
172
+
173
+ ## Skills
174
+
175
+ ada ships with **~285 built-in skills** across ~30 categories — specialized instructions the model
176
+ pulls in only when a task needs them (progressive disclosure). ada **routes** every request with a
177
+ relevance ranker over names + descriptions: when one skill clearly fits, ada **auto-applies** it
178
+ injecting its procedure so even a weak model follows it (announced as `↳ skill: <name>`); when the
179
+ match is ambiguous it just suggests them. The model can also browse with **`list_skills`** (by
180
+ `category`/`filter`), search with **`find_skill`** (ranked), and load one with **`use_skill`** — so
181
+ nothing bloats the prompt until it's used. A sample of the categories:
182
+
183
+ `git` · `review` · `testing` · `debugging` · `refactoring` · `docs` · `security` · `ci-cd` ·
184
+ `performance` · `database` · `api` · `frontend` · `ui-design` · `html` · `pptx` · `image` ·
185
+ `graphics` · `languages` · `frameworks` · `mobile` · `cloud` · `observability` · `data-ml` ·
186
+ `agent-llm` · `web3` · `networking` · `shell` · `connectors` · `compliance` ·
187
+
188
+ Examples: `commit`, `code-review`, `dockerize`, `migration`, `react-hooks`, `terraform-module`,
189
+ `rag-pipeline`, `security-audit`, `project-overview`, `architecture-diagram`, `graphify`, `ponytail`.
190
+
191
+ Add your own as `SKILL.md` files under `.ada/skills/<name>/` (project) or `~/.ada/skills/<name>/`
192
+ (global) `---\ndescription: …\ncategory: …\n---` front-matter is all that's required. Project
193
+ skills override global, which override the built-ins. Install remote ones with
194
+ `ada skill add <url>` (a `SKILL.md` or a JSON index); `ada skill list` shows them.
195
+
196
+ ## Connectors (MCP)
197
+
198
+ ada reaches external tools and data through MCP servers. Browse the catalog and add one:
199
+
200
+ ```bash
201
+ ada mcp # list the catalog (filesystem, github, postgres, slack, sentry, …)
202
+ ada mcp add github # write it into .ada/mcp.json, then set the token it prints
203
+ ```
204
+
205
+ Both **local stdio** servers (`{ command, args }`) and **remote HTTP** servers (`{ url, headers }`)
206
+ are supported; their tools appear as `<server>__<tool>`, approval-gated, in trusted projects. See
207
+ [docs/connectors.md](docs/connectors.md), or the `connectors` skill category for per-connector setup.
208
+
209
+ ## Configuration
210
+
211
+ **Client** (`ada`):
212
+
213
+ | Env var | Default | Purpose |
214
+ |---|---|---|
215
+ | `ADA_BACKEND_URL` | `http://localhost:8787/v1` | Where the backend lives |
216
+ | `ADA_CLIENT_KEY` | stored login token, else `dev` | Bearer sent to the backend |
217
+ | `ADA_MODEL` | | Default model id |
218
+ | `ADA_COMPACT_AT` | `100000` | Token estimate that triggers compaction |
219
+ | `ADA_AUTO_APPROVE` | | `1` behave like `--yolo` |
220
+ | `NO_COLOR` / `ADA_THEME` | — | Disable color / theme overrides |
221
+
222
+ **Backend** (`ada-server`):
223
+
224
+ | Env var | Default | Purpose |
225
+ |---|---|---|
226
+ | `ADA_PORT` | `8787` | Listen port |
227
+ | `ADA_CLIENT_KEYS` | *(unset = dev/no-auth)* | Comma-separated allowed client keys |
228
+ | `ADA_REQUIRE_LOGIN` / `ADA_ALLOWED_USERS` | | Gate access to verified GitHub/Google users |
229
+ | `OLLAMA_BASE_URL` | `http://localhost:11434/v1` | Local Ollama endpoint |
230
+ | *(provider keys)* | | See the [Providers](#providers) table |
231
+
232
+ ---
233
+
234
+ ## Develop
235
+
236
+ ```bash
237
+ npm run typecheck # tsc --noEmit
238
+ npm run selfcheck # offline checks (tools, sessions, routing, parsers, TUI)
239
+ npm start # run the client from source
240
+ npm run server # run the backend from source
241
+ ```
242
+
243
+ See **[docs/architecture.md](docs/architecture.md)** for the design (adapters, routing, request
244
+ flow, file layout), **[docs/orchestration.md](docs/orchestration.md)** for the agent strategies, and
245
+ **[docs/integrations.md](docs/integrations.md)** for the HTTP API / SDK / ACP.
246
+
247
+ ## Benchmarks
248
+
249
+ ada can run **SWE-bench Verified** — it generates patches for real GitHub issues (one isolated repo
250
+ clone per task), emitting an official-format `predictions.jsonl` that the official `swebench` Docker
251
+ harness scores. `node bench/swebench.mjs --dataset --model --out runs/x`. See
252
+ **[bench/README.md](bench/README.md)** for the full flow (dataset, prereqs, scoring command).
253
+
254
+ ## Contributing
255
+
256
+ Issues and PRs welcome — it's a small, no-build codebase. Run `npm run typecheck && npm run selfcheck`
257
+ before a PR and keep changes lean. See **[CONTRIBUTING.md](CONTRIBUTING.md)**; report vulnerabilities
258
+ via **[SECURITY.md](SECURITY.md)**.
259
+
260
+ ## License
261
+
262
+ [MIT](LICENSE) © 2026 Aditya