@aiiware/aii 0.11.10 → 0.11.11

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 +247 -292
  2. package/bin/aii +432 -427
  3. package/package.json +4 -5
package/README.md CHANGED
@@ -2,412 +2,367 @@
2
2
  <img src="https://aiiware.gallerycdn.vsassets.io/extensions/aiiware/aii/0.1.1/1760456263611/Microsoft.VisualStudio.Services.Icons.Default" width="120" alt="Aii" />
3
3
  </p>
4
4
 
5
- <h1 align="center">@aiiware/aii</h1>
5
+ <h1 align="center">Aii — AI Agent for Your Terminal</h1>
6
6
 
7
- **AI-powered CLI agent** with autonomous tool execution, multi-agent delegation, persistent server sessions, and multi-channel access. An intelligent assistant that can read, write, search, and execute commands in your terminal — or through Telegram — with conversations that persist across channels and restarts.
7
+ <p align="center">
8
+ An autonomous AI assistant that lives in your terminal. Ask it anything — it reads your files, runs commands, searches the web, and writes code. No copy-pasting, no tab-switching. Just describe what you want.
9
+ </p>
8
10
 
9
- ## Installation
11
+ <p align="center">
12
+ <strong>npm:</strong> <code>@aiiware/aii</code> · <strong>Version:</strong> 0.11.11 · <strong>Node.js:</strong> >= 18
13
+ </p>
14
+
15
+ ---
16
+
17
+ ## Quick Start
10
18
 
11
19
  ```bash
20
+ # 1. Install
12
21
  npm install -g @aiiware/aii
22
+
23
+ # 2. Go
24
+ aii -D hi there!
13
25
  ```
14
26
 
15
- ## Requirements
27
+ On first run, Aii auto-launches a setup wizard to configure your AI provider, model, and API key. After setup completes, your command executes automatically.
16
28
 
17
- - Node.js 18+
18
- - Aii Server running (default: `localhost:26169`)
29
+ Already know your provider? You can also configure directly: `aii config apikey <provider> <key>`
19
30
 
20
- ## Quick Start
31
+ > **Requirements:** Node.js 18+ and Docker
21
32
 
22
- ```bash
23
- # Start interactive agent mode
24
- aii
33
+ ---
25
34
 
26
- # Run a single task
27
- aii "explain what this project does"
35
+ ## What Can You Do With It?
28
36
 
29
- # Pipe content for processing
30
- cat error.log | aii "summarize the errors"
37
+ ### Talk to it
31
38
 
32
- # Auto-approve all tool executions
33
- aii --auto
39
+ ```bash
40
+ aii explain how this codebase is structured
34
41
  ```
35
42
 
36
- ## Agent Mode (Default)
37
-
38
- Aii runs as an intelligent agent that can autonomously execute tools to complete tasks:
43
+ ### Pipe anything in
39
44
 
40
45
  ```bash
41
- aii # Start interactive session
42
- aii "your task" # Run single task and exit
46
+ git diff | aii review these changes for bugs
47
+ cat error.log | aii what went wrong?
48
+ echo "Hello world" | aii translate to Japanese
43
49
  ```
44
50
 
45
- ### Available Tools
46
-
47
- | Tool | Description |
48
- |---------------|------------------------------------------|
49
- | **Read** | Read file contents |
50
- | **Write** | Create or overwrite files |
51
- | **Edit** | Make targeted edits to files |
52
- | **Glob** | Find files by pattern |
53
- | **Grep** | Search code with regex |
54
- | **Bash** | Execute shell commands |
55
- | **WebSearch** | Search the web |
56
- | **WebFetch** | Fetch and parse web pages |
57
- | **Task** | Delegate work to specialized subagents |
58
-
59
- ### Interactive Commands
60
-
61
- ```text
62
- /help Show available commands
63
- /clear Clear conversation history
64
- /new Start a fresh conversation
65
- /history Show conversation summary
66
- /model <model> Switch LLM model
67
- /provider <name> Switch LLM provider
68
- /context View context window usage
69
- /stats Show session statistics (tokens, cost)
70
- /init Generate AGENTS.md for your project
71
- /memory View loaded project instructions
72
- /hooks View configured hooks
73
- /skills List available skills
74
- /commit Generate commit message and commit
75
- /loop Start autonomous agent loop
76
- /mcp Manage MCP servers
77
- /sessions Manage server-managed sessions
78
- /agents List available subagents
79
- /tasks Inspect subagent task executions
80
- /diff Show recent file changes
81
- /undo Undo the last file change
82
- /mode Show or switch operation mode (normal/auto/plan)
83
- /exit Exit the session
51
+ ### Let it commit for you
52
+
53
+ ```bash
54
+ aii run git commit -y
84
55
  ```
85
56
 
86
- ### Keyboard Shortcuts
57
+ It reads your staged changes, writes a Conventional Commits message, and commits — one command.
87
58
 
88
- | Key | Action |
89
- |------------|-------------------------------------|
90
- | `Enter` | Submit input |
91
- | `Esc` | Cancel current request |
92
- | `Ctrl+C` | Exit immediately |
93
- | `Ctrl+D` | Graceful exit with session summary |
94
- | `Ctrl+L` | Clear conversation |
95
- | `Up/Down` | Navigate input history |
96
- | `Tab` | Select from command menu |
59
+ ### Start an interactive session
97
60
 
98
- ## Multi-Agent Subagents (v0.10)
61
+ ```bash
62
+ aii
63
+ ```
99
64
 
100
- Delegate complex tasks to specialized subagents that run in parallel within the same session:
65
+ You get a rich terminal UI with streaming responses, syntax highlighting, diff previews, and autocomplete for slash commands.
101
66
 
102
- ```text
103
- > analyze my codebase architecture and review the auth module
67
+ ### Switch models on the fly
104
68
 
105
- ● Running 2 agents...
106
- ├─ Explore (Analyze codebase architecture) · 8 tool uses
107
- │ └ Running (5s)
108
- └─ Review (Review auth module) · 3 tool uses
109
- └ Running (2s)
69
+ ```bash
70
+ aii --model ollama:llama3.1:8b write a bash one-liner to find large files
71
+ aii --model deepseek:deepseek-chat explain this regex
72
+ aii --model openai:gpt-4.1 refactor this function
110
73
  ```
111
74
 
112
- ### Built-in Subagents
75
+ Or during a session: `/model anthropic:claude-sonnet-4`
113
76
 
114
- | Subagent | Purpose |
115
- |-------------|----------------------------------------|
116
- | **explore** | Fast codebase exploration (read-only) |
117
- | **plan** | Architecture and implementation design |
118
- | **review** | Code quality analysis |
77
+ ### Run it autonomously
119
78
 
120
- ### Custom Subagents
79
+ ```bash
80
+ aii loop "fix all failing tests" --verify "npm test" --budget 0.50
81
+ ```
121
82
 
122
- Define your own subagents in `.aii/agents/` with custom system prompts, model tiers, and tool access levels.
83
+ The agent loops with fresh context each iteration, stopping when your verification command passes, the budget is hit, or you press Ctrl+C.
123
84
 
124
- ### Task Inspection
85
+ ---
125
86
 
126
- ```bash
127
- /tasks # List all task executions with IDs
128
- /tasks <id> # Show full transcript for a specific task
129
- ```
87
+ ## Providers
130
88
 
131
- ## Telegram Bot Channel (v0.10)
89
+ **8 LLM providers**, switch anytime with `aii config provider <name>`:
132
90
 
133
- Access your AI agent remotely through Telegram — works anywhere, no port forwarding needed:
91
+ | Provider | What You Get |
92
+ |----------|-------------|
93
+ | **Anthropic** | Claude Sonnet 4, Opus 4, Haiku 4.5 |
94
+ | **OpenAI** | GPT-5.2, GPT-4o, GPT-4.1 |
95
+ | **Google** | Gemini 3-pro, 2.5-pro, 2.5-flash |
96
+ | **DeepSeek** | deepseek-chat, deepseek-reasoner |
97
+ | **Moonshot** | Kimi K2 Thinking, Vision |
98
+ | **Z.ai** | GLM-4.7, GLM-4.6V, GLM-4.5 |
99
+ | **Ollama** | Any local model — free, private, offline |
100
+ | **OpenRouter** | 300+ models through one API key |
134
101
 
135
- ```bash
136
- # Pair a Telegram bot
137
- aii telegram pair mybot <bot-token>
102
+ > **Ollama users:** `aii config provider ollama` auto-discovers your installed models and lets you pick from an interactive menu.
138
103
 
139
- # Start the bot listener
140
- aii telegram start mybot
104
+ ---
141
105
 
142
- # Manage multiple bots
143
- aii telegram list
144
- aii telegram status mybot
145
- aii telegram unpair mybot
146
- ```
106
+ ## Tools
147
107
 
148
- **Bot commands in Telegram**: `/start`, `/help`, `/reset`, `/status`, `/compact`, `/model`
108
+ The agent autonomously picks from **10 built-in tools**:
149
109
 
150
- ## Server Sessions (v0.11)
110
+ | Tool | What It Does |
111
+ |------|-------------|
112
+ | **Read** | Read any file |
113
+ | **Write** | Create or overwrite files |
114
+ | **Edit** | Surgical find-and-replace edits |
115
+ | **Glob** | Find files by pattern |
116
+ | **Grep** | Search file contents (regex) |
117
+ | **Bash** | Run shell commands |
118
+ | **WebSearch** | Search the web |
119
+ | **WebFetch** | Fetch and parse web pages |
120
+ | **Task** | Delegate to parallel subagents |
121
+ | **Skill** | Invoke extensible skill packages |
151
122
 
152
- Conversations are managed by Aii Server with persistent storage. Sessions survive restarts and can be resumed from any channel:
123
+ You control what the agent can do. By default, it asks before running commands or writing files. Use `--auto` to skip confirmations.
153
124
 
154
- ```bash
155
- # List recent sessions
156
- aii sessions list
125
+ ---
157
126
 
158
- # Resume a previous session
159
- aii sessions resume <id>
127
+ ## Slash Commands
128
+
129
+ During interactive sessions, type `/` to see all commands. Highlights:
130
+
131
+ | Command | What It Does |
132
+ |---------|-------------|
133
+ | `/help` | Show all commands |
134
+ | `/model [name]` | View or switch model |
135
+ | `/provider [name]` | View or switch provider |
136
+ | `/auto` | Toggle auto-approve mode |
137
+ | `/plan` | Toggle plan mode (read-only) |
138
+ | `/diff` | See all file changes this session |
139
+ | `/undo` | Revert the last file change |
140
+ | `/stats` | Session stats — tokens, cost, duration |
141
+ | `/context` | Context window usage; `/context clear` to summarize |
142
+ | `/commit` | AI-powered git commit |
143
+ | `/review-pr` | AI-powered PR review |
144
+ | `/worktree create` | Isolated workspace for experiments |
145
+ | `/mcp install` | Add MCP server from catalog |
146
+ | `/skills` | List and manage skill packages |
147
+ | `/sessions` | Browse and resume past sessions |
148
+ | `/exit` | End session with summary |
160
149
 
161
- # View session details (stats, messages, context)
162
- aii sessions info <id>
150
+ ### Keyboard Shortcuts
163
151
 
164
- # Rename or delete
165
- aii sessions rename <id> "my feature work"
166
- aii sessions delete <id>
167
- ```
152
+ | Key | Action |
153
+ |-----|--------|
154
+ | `Enter` | Submit input |
155
+ | `Esc` | Cancel current request |
156
+ | `Ctrl+C` | Exit immediately |
157
+ | `Ctrl+D` | Graceful exit with session summary |
158
+ | `Ctrl+L` | Clear conversation |
159
+ | `Up/Down` | Navigate input history |
160
+ | `Tab` | Autocomplete commands |
168
161
 
169
- ### Cross-Channel Resume
162
+ ---
170
163
 
171
- Start a conversation in Telegram and continue from the CLI — full conversation history and context preserved:
164
+ ## Key Features
172
165
 
173
- ```bash
174
- # In Telegram: work on a task via bot
175
- # Later, from CLI:
176
- aii sessions list --channel telegram
177
- aii sessions resume abc123
178
- ```
166
+ ### Subagents
179
167
 
180
- ### Interactive Session Management
168
+ The agent delegates complex tasks to specialized subagents running in parallel:
181
169
 
182
- ```text
183
- /sessions list # Browse recent sessions
184
- /sessions info <id> # View session details
185
- /sessions resume <id> # Switch to a server session mid-conversation
186
- /sessions rename <id> name # Rename a session
187
- /sessions delete <id> # Archive a session
188
- ```
170
+ | Agent | Purpose | Tools |
171
+ |-------|---------|-------|
172
+ | **Explore** | Fast codebase search and analysis | Read-only |
173
+ | **Plan** | Architecture and implementation design | Read-only |
174
+ | **Review** | Code quality analysis | Read-only |
175
+ | **Code** | Full implementation | All tools |
189
176
 
190
- Session stats track turns, tokens (in/out), cost, tool calls, and files modified. Subagent stats are aggregated to the parent session automatically.
177
+ Define custom agents in `.aii/agents/<name>.md` with YAML frontmatter for custom system prompts, model tiers, and tool access.
191
178
 
192
- ## MCP Integration (v0.10)
179
+ ### Git Worktrees
193
180
 
194
- Extend the agent with external tools via Model Context Protocol:
181
+ Work on multiple features in parallel without stashing:
195
182
 
196
183
  ```bash
197
- /mcp catalog # Browse available servers
198
- /mcp install github # One-command install from catalog
199
- /mcp add myserver cmd args... # Add custom server
200
- /mcp list # Show configured servers
201
- /mcp remove myserver # Remove a server
184
+ aii worktree create auth-refactor # Create isolated workspace + branch
185
+ aii worktree list # See all worktrees
186
+ aii worktree merge auth-refactor # Merge back
187
+ aii worktree clean # Remove all clean worktrees
202
188
  ```
203
189
 
204
- Once installed, MCP tools are available to the agent automatically.
190
+ Or use `/worktree` slash commands during a session.
205
191
 
206
- ## Autonomous Loops (v0.7)
192
+ ### Autonomous Loops
207
193
 
208
- Run the agent in a continuous loop for long-running autonomous tasks:
194
+ Run the agent in a continuous loop with guardrails:
209
195
 
210
196
  ```bash
211
- # Start a loop from CLI
212
- aii loop --verify "npm test" --duration 5m
213
-
214
- # Or start within a session
215
- /loop --max 10 --promise "All tests passing"
197
+ aii loop "fix all TypeScript errors"
198
+ aii loop --max 10 --verify "npm test" "add missing tests"
199
+ aii loop --budget 1.00 --duration 600 "refactor the auth module"
216
200
  ```
217
201
 
218
- **Options**:
202
+ **Exit conditions:** `--max N`, `--budget $N`, `--verify "cmd"`, `--promise "text"`, `--duration <sec>`, `--input-tokens N`, `--output-tokens N`
219
203
 
220
- | Option | Description |
221
- |----------------------|------------------------------------------|
222
- | `--max <N>` | Maximum iterations |
223
- | `--verify "<cmd>"` | Run verification command after each step |
224
- | `--promise "<text>"` | Stop when output contains this text |
225
- | `--budget <$N>` | Cost limit |
226
- | `--duration <time>` | Time limit (e.g., `30m`, `2h`) |
204
+ ### Telegram Integration
227
205
 
228
- ## LLM Providers
229
-
230
- Aii supports multiple LLM providers. The provider is auto-detected from the model name:
231
-
232
- | Provider | Models | Setup |
233
- | --- | --- | --- |
234
- | **Anthropic** | Claude Sonnet, Opus, Haiku | API key |
235
- | **OpenAI** | GPT-4o, GPT-4, o1, o3 | API key |
236
- | **Google** | Gemini Pro, Flash | API key |
237
- | **DeepSeek** | DeepSeek Chat, Coder | API key |
238
- | **Moonshot** | Kimi K2 | API key |
239
- | **Zai** | GLM-4 | API key |
240
- | **Ollama** | Llama, Mistral, and more | Local, no API key |
241
- | **OpenRouter** | 300+ models via single API key | API key |
206
+ Run the full agent from Telegram:
242
207
 
243
208
  ```bash
244
- # Switch model mid-session
245
- /model claude-sonnet-4-6
246
- /model ollama/llama3.1:8b
247
-
248
- # Use provider:model format for one-shot commands
249
- aii "explain this code" --model deepseek:deepseek-chat
250
- aii "translate hello" --model ollama:gpt-oss:20b
209
+ aii telegram pair mybot <bot-token> # Pair with @BotFather token
210
+ aii telegram start mybot # Start listening
211
+ aii telegram list # Manage bots
251
212
  ```
252
213
 
253
- The provider is auto-detected from model names (e.g., `gpt-4o` routes to OpenAI, `deepseek-chat` routes to DeepSeek).
254
-
255
- ## Context Window Management (v0.3)
214
+ Start a conversation in Telegram, continue it from the CLI or vice versa.
256
215
 
257
- Prevents "token limit exceeded" errors with intelligent auto-summarization:
216
+ ### Skills System
258
217
 
259
- - **Status bar** shows real-time context usage with color-coded alerts
260
- - **Auto-summarization** triggers when approaching the limit, preserving recent context
261
- - **Dynamic thresholds** adjust per model's output capacity
218
+ Extensible instruction packages you can install and invoke:
262
219
 
263
220
  ```bash
264
- /context # View detailed usage breakdown
265
- /context clear # Manually trigger summarization
221
+ /skills # List all skills
222
+ /skills install owner/repo/skill-name # Install from GitHub
223
+ /commit # Built-in: AI git commit
224
+ /review-pr # Built-in: PR review
225
+ /<custom-skill> [args] # Any user-invocable skill
266
226
  ```
267
227
 
268
- ## Project Instructions (v0.5)
228
+ Create skills in `.aii/skills/<name>/SKILL.md` with YAML frontmatter.
229
+
230
+ ### Project Instructions (AGENTS.md)
269
231
 
270
- Teach the agent your project's conventions with `AGENTS.md`:
232
+ Drop an `AGENTS.md` file in your project root to give the agent project-specific context — coding conventions, architecture notes, preferred patterns. It's loaded automatically.
271
233
 
272
234
  ```bash
273
235
  /init # Auto-generate by analyzing your project
274
- /init --with-hooks # Also generate hooks.json template
275
236
  /memory # View loaded instructions
276
- /memory reload # Hot-reload without restart
277
237
  ```
278
238
 
279
- The agent discovers `AII.md` or `AGENTS.md` in your project root, plus `~/.aii/AGENTS.md` for global preferences.
239
+ Also discovers `CLAUDE.md`, `.cursorrules`, and `.github/copilot-instructions.md`.
280
240
 
281
- ## Hooks (v0.5)
241
+ ### Hook System
282
242
 
283
- Run custom scripts before/after tool execution:
243
+ Run custom scripts when the agent takes actions. Configure in `.aii/hooks.json`:
244
+
245
+ **Events:** `PreToolUse`, `PostToolUse`, `Stop`, `SubagentStart`, `SubagentStop`
284
246
 
285
247
  ```bash
286
- /init --with-hooks # Generate hooks template
287
248
  /hooks # View configured hooks
288
249
  /hooks reload # Hot-reload without restart
289
250
  ```
290
251
 
291
- Hook types: `PreToolUse`, `PostToolUse`, `Stop`, `Iteration`
292
-
293
- ## Skills (v0.6)
294
-
295
- Extend the agent with reusable skill packages:
296
-
297
- **Natural language** — the agent auto-detects the right skill:
298
-
299
- ```text
300
- > commit my changes
301
- > review the latest PR
302
- ```
252
+ ### MCP Servers
303
253
 
304
- **Slash commands** (explicit):
254
+ Extend the agent with Model Context Protocol servers:
305
255
 
306
256
  ```bash
307
- /commit # Generate commit message and execute
308
- /review-pr 123 # Review a pull request
257
+ aii mcp catalog # Browse available servers
258
+ aii mcp install github # One-command install
259
+ aii mcp add my-server npx my-mcp # Add custom server
260
+ aii mcp list-tools github # Discover tools
261
+ aii mcp test github # Connectivity test
309
262
  ```
310
263
 
311
- **Managing skills**:
264
+ ### Server Sessions
265
+
266
+ Conversations persist across restarts and channels:
312
267
 
313
268
  ```bash
314
- /skills # List all skills
315
- /skills install aiiware/skills/code-review # Install from GitHub
316
- /skills install aiiware/skills/refactor --user # Install globally
317
- /skills uninstall code-review # Remove a skill
318
- /skills reload # Re-discover skills
269
+ aii sessions list # Browse recent sessions
270
+ aii sessions resume <id> # Pick up where you left off
271
+ aii sessions info <id> # View stats (tokens, cost, tools)
319
272
  ```
320
273
 
321
- **Creating skills** — add `SKILL.md` files in `.aii/skills/`:
322
-
323
- ```markdown
324
- ---
325
- name: my-skill
326
- description: Does something useful
327
- allowed-tools: Bash Read Grep
328
274
  ---
329
275
 
330
- Instructions for the agent...
331
- Use $ARGUMENTS for user input.
332
- ```
333
-
334
276
  ## Configuration
335
277
 
336
278
  ```bash
337
- aii config show # Show current configuration
338
- aii config validate # Validate configuration
339
- aii config set <key> <value> # Set a configuration value
340
- aii config model <model> # Change LLM model (supports provider:model format)
341
- aii config provider <provider> # Change LLM provider
279
+ aii config init # Interactive setup wizard
280
+ aii config show # Current settings
281
+ aii config validate # Check config + API key validity
282
+ aii config set <key> <value> # Set a specific value
283
+ aii config provider [name] # Show or switch provider
284
+ aii config model [name] # Show or switch model
285
+ aii config apikey <provider> [key] # Set API key (masked input)
286
+ aii config apikey list # Show all provider key status
287
+ aii config apikey remove <provider> # Remove a provider's key
288
+ aii config apikey help # Show API key help
289
+ aii config host [host:port] # Show or change server URL
290
+ aii config models # List all available models
291
+ aii config providers # List all providers with status
292
+ aii config help # Show config help
342
293
  ```
343
294
 
344
- Configuration is stored in `~/.aii/`:
295
+ Config lives in `~/.aii/`:
345
296
 
346
- **config.yaml** Main configuration:
297
+ | File | Purpose |
298
+ |------|---------|
299
+ | `config.yaml` | Provider, model, server host, preferences |
300
+ | `secrets.yaml` | API keys (file mode 0600) |
301
+ | `mcp_servers.json` | MCP server configuration |
347
302
 
348
- ```yaml
349
- llm:
350
- provider: anthropic
351
- model: claude-sonnet-4-6
352
- temperature: 0.7
303
+ Environment variables also work: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `DEEPSEEK_API_KEY`, etc.
353
304
 
354
- api:
355
- url: http://localhost:26169
356
- ```
305
+ ---
357
306
 
358
- **secrets.yaml** API keys:
307
+ ## CLI Reference
308
+
309
+ | Command | Description |
310
+ |---------|-------------|
311
+ | `aii` | Start interactive agent session |
312
+ | `aii <query>` | Single-shot query |
313
+ | `aii run git commit [-y]` | AI-powered git commit |
314
+ | `aii loop [query] [--flags]` | Autonomous agent loop |
315
+ | `aii config <action>` | Configuration management |
316
+ | `aii mcp <action>` | MCP server management |
317
+ | `aii telegram <action>` | Telegram bot management |
318
+ | `aii sessions <action>` | Session management |
319
+ | `aii worktree <action>` | Git worktree management |
320
+ | `aii prompt <action>` | Prompt library |
321
+ | `aii doctor` | Health diagnostics |
322
+ | `aii help` | Show help |
323
+ | `aii version` | Show version |
324
+
325
+ ### Global Flags
326
+
327
+ | Flag | Description |
328
+ |------|-------------|
329
+ | `--model <name>` | Override model (e.g., `deepseek:deepseek-chat`) |
330
+ | `--auto` | Auto-approve all tool actions |
331
+ | `-y`, `--yes` | Auto-confirm prompts |
332
+ | `-c`, `--continue-chat <id>` | Resume a specific session |
333
+ | `-n`, `--new-chat` | Force new session |
334
+ | `-i`, `--interactive` | Force interactive mode |
335
+ | `--offline` | Disable web search and MCP |
336
+ | `-D`, `--direct` | Direct LLM mode (bypass server intent recognition) |
337
+ | `--no-colors` | Disable colors |
338
+ | `--no-streaming` | Disable streaming output |
339
+ | `--show-tokens` | Show token usage |
340
+ | `--show-cost` | Show cost estimates |
341
+ | `-v`, `--verbose` | Verbose output |
342
+ | `-d`, `--debug` | Debug-level output |
359
343
 
360
- ```yaml
361
- anthropic_api_key: sk-ant-...
362
- openai_api_key: sk-...
363
- deepseek_api_key: sk-...
364
- ```
344
+ ---
365
345
 
366
- Or use environment variables: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `DEEPSEEK_API_KEY`
346
+ ## Troubleshooting
367
347
 
368
- ## CLI Options
348
+ Run `aii doctor` for automated diagnostics.
369
349
 
370
- | Option | Description |
371
- |----------------------------|-------------------------------------------------------|
372
- | `--auto` | Auto-approve all tool executions |
373
- | `--model <model>` | Override LLM model (supports `provider:model` format) |
374
- | `--host <host:port>` | API server host |
375
- | `-c, --continue-chat <id>` | Continue a previous session |
376
- | `-n, --new-chat` | Force a new session |
377
- | `--offline` | Disable web and MCP tools |
378
- | `--clean` | Clean output mode |
379
- | `--standard` | Standard output mode (default) |
380
- | `--thinking` | Show full reasoning |
381
- | `--no-streaming` | Disable streaming output |
382
- | `-q, --quiet` | Minimal output |
383
- | `-y, --yes` | Auto-confirm shell commands |
350
+ | Problem | Fix |
351
+ |---------|-----|
352
+ | `aii` not found | `npm install -g @aiiware/aii`, restart terminal |
353
+ | Server won't start | Make sure Docker is running |
354
+ | API key error | `aii config apikey <provider> <key>` or `aii config init` |
355
+ | Wrong model | `aii config model <name>` |
356
+ | Ollama not connecting | Start Ollama first, then `aii config provider ollama` |
357
+ | Context window full | `/context clear` during session |
384
358
 
385
- ## System Commands
359
+ ---
386
360
 
387
- ```bash
388
- aii doctor # System health check
389
- aii stats # Usage analytics (models, cost)
390
- aii sessions list # List server-managed sessions
391
- aii --help # Show help
392
- aii --version # Show version
393
- ```
361
+ ## Links
362
+
363
+ - **npm**: [@aiiware/aii](https://www.npmjs.com/package/@aiiware/aii)
364
+ - **Website**: [aiiware.com](https://aiiware.com)
365
+
366
+ ---
394
367
 
395
- ## Features
396
-
397
- - **Autonomous Agent** — Executes multi-step tasks with tool use
398
- - **Multi-Agent Delegation** — Parallel subagents for complex tasks
399
- - **Telegram Access** — Use your agent remotely via Telegram bots
400
- - **MCP Integration** — Extend with external tools via Model Context Protocol
401
- - **Autonomous Loops** — Continuous agent execution with verification and budgets
402
- - **Multiple Providers** — Claude, GPT, Gemini, DeepSeek, Ollama, OpenRouter
403
- - **Real-time Streaming** — Token-by-token response display
404
- - **Context Management** — Auto-summarization prevents token limit errors
405
- - **Project Instructions** — Teach the agent your conventions with AGENTS.md
406
- - **Skills System** — Extend with reusable skills, invokable via commands or natural language
407
- - **Hooks** — Custom scripts for validation, logging, and approval gates
408
- - **Server Sessions** — Persistent conversations that survive restarts and resume across channels
409
- - **Session Persistence** — Continue previous conversations with `--continue-chat` or `aii sessions resume`
410
-
411
- ## License
412
-
413
- Proprietary - Copyright 2025-present AiiWare.com. All Rights Reserved.
368
+ **License:** Proprietary — Copyright 2025-present AiiWare.com. All rights reserved.