assistant 2.0.2b1__tar.gz → 2.2.0a1__tar.gz

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 (116) hide show
  1. {assistant-2.0.2b1/assistant.egg-info → assistant-2.2.0a1}/PKG-INFO +91 -16
  2. {assistant-2.0.2b1 → assistant-2.2.0a1}/README.md +90 -15
  3. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/__init__.py +48 -7
  4. assistant-2.2.0a1/assistant/agent.py +1882 -0
  5. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/as_client.py +3 -2
  6. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/builtin_cmds.py +258 -71
  7. assistant-2.2.0a1/assistant/compress.py +390 -0
  8. assistant-2.2.0a1/assistant/config.py +474 -0
  9. assistant-2.2.0a1/assistant/envindex.py +562 -0
  10. assistant-2.2.0a1/assistant/history.py +161 -0
  11. assistant-2.2.0a1/assistant/listen/__init__.py +23 -0
  12. assistant-2.2.0a1/assistant/listen/interface.py +70 -0
  13. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/listen/main.py +15 -9
  14. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/main.py +287 -327
  15. assistant-2.2.0a1/assistant/memory.py +325 -0
  16. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/http_client.py +63 -28
  17. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/interface.py +55 -26
  18. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/providers/__init__.py +3 -1
  19. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/providers/llama_cpp.py +4 -0
  20. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/xonsh.py +49 -5
  21. assistant-2.2.0a1/assistant/projectfile.py +94 -0
  22. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/ptk_shell/bindings.py +426 -8
  23. assistant-2.2.0a1/assistant/ptk_shell/completer.py +359 -0
  24. assistant-2.2.0a1/assistant/ptk_shell/shell.py +2752 -0
  25. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/say/__init__.py +89 -16
  26. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/say/interface.py +1 -0
  27. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/setup_wizard.py +292 -55
  28. assistant-2.2.0a1/assistant/tools.py +1375 -0
  29. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/tools_worker.py +1 -1
  30. {assistant-2.0.2b1 → assistant-2.2.0a1/assistant.egg-info}/PKG-INFO +91 -16
  31. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant.egg-info/SOURCES.txt +29 -0
  32. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant.egg-info/dependency_links.txt +0 -0
  33. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant.egg-info/entry_points.txt +0 -0
  34. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant.egg-info/requires.txt +0 -0
  35. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant.egg-info/top_level.txt +0 -0
  36. {assistant-2.0.2b1 → assistant-2.2.0a1}/setup.cfg +1 -0
  37. assistant-2.2.0a1/tests/test_bindings.py +270 -0
  38. assistant-2.2.0a1/tests/test_builtin_cmds.py +220 -0
  39. assistant-2.2.0a1/tests/test_compaction.py +560 -0
  40. assistant-2.2.0a1/tests/test_compress.py +278 -0
  41. {assistant-2.0.2b1 → assistant-2.2.0a1}/tests/test_config.py +196 -0
  42. assistant-2.2.0a1/tests/test_envindex.py +272 -0
  43. assistant-2.2.0a1/tests/test_envindex_suggestions.py +763 -0
  44. assistant-2.2.0a1/tests/test_git_hook.py +71 -0
  45. assistant-2.2.0a1/tests/test_history_bridge.py +177 -0
  46. assistant-2.2.0a1/tests/test_http_client.py +107 -0
  47. {assistant-2.0.2b1 → assistant-2.2.0a1}/tests/test_init.py +17 -0
  48. assistant-2.2.0a1/tests/test_interrupt.py +772 -0
  49. assistant-2.2.0a1/tests/test_interrupt_real.py +361 -0
  50. assistant-2.2.0a1/tests/test_listen_interrupt.py +259 -0
  51. assistant-2.2.0a1/tests/test_memory.py +398 -0
  52. assistant-2.2.0a1/tests/test_memory_sqlite.py +285 -0
  53. assistant-2.2.0a1/tests/test_model_compare.py +740 -0
  54. assistant-2.2.0a1/tests/test_projectfile.py +142 -0
  55. assistant-2.2.0a1/tests/test_setup_wizard.py +22 -0
  56. assistant-2.2.0a1/tests/test_startup_performance.py +125 -0
  57. assistant-2.2.0a1/tests/test_tmux_interactive.py +191 -0
  58. assistant-2.2.0a1/tests/test_tool_handling.py +84 -0
  59. assistant-2.2.0a1/tests/test_tools.py +1156 -0
  60. assistant-2.2.0a1/tests/test_traces_agent.py +467 -0
  61. assistant-2.2.0a1/tests/test_traces_cmd.py +669 -0
  62. assistant-2.2.0a1/tests/test_traces_export.py +478 -0
  63. assistant-2.2.0a1/tests/test_traces_schema.py +85 -0
  64. assistant-2.2.0a1/tests/test_traces_store.py +202 -0
  65. assistant-2.2.0a1/tests/test_tts_streaming.py +1459 -0
  66. assistant-2.2.0a1/tests/test_utils.py +252 -0
  67. {assistant-2.0.2b1 → assistant-2.2.0a1}/tests/test_xontrib.py +4 -4
  68. {assistant-2.0.2b1 → assistant-2.2.0a1}/xontrib/assistant.py +186 -32
  69. assistant-2.0.2b1/assistant/agent.py +0 -1032
  70. assistant-2.0.2b1/assistant/config.py +0 -251
  71. assistant-2.0.2b1/assistant/history.py +0 -134
  72. assistant-2.0.2b1/assistant/listen/__init__.py +0 -18
  73. assistant-2.0.2b1/assistant/listen/interface.py +0 -49
  74. assistant-2.0.2b1/assistant/memory.py +0 -73
  75. assistant-2.0.2b1/assistant/ptk_shell/completer.py +0 -329
  76. assistant-2.0.2b1/assistant/ptk_shell/shell.py +0 -1142
  77. assistant-2.0.2b1/assistant/tools.py +0 -648
  78. assistant-2.0.2b1/tests/test_tools.py +0 -505
  79. assistant-2.0.2b1/tests/test_utils.py +0 -236
  80. {assistant-2.0.2b1 → assistant-2.2.0a1}/LICENSE +0 -0
  81. {assistant-2.0.2b1 → assistant-2.2.0a1}/MANIFEST.in +0 -0
  82. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/__main__.py +0 -0
  83. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/as_service.py +0 -0
  84. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/codecache.py +0 -0
  85. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/conditions.py +0 -0
  86. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/entry_points/__init__.py +0 -0
  87. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/entry_points/run_assistant.py +0 -0
  88. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/execer.py +0 -0
  89. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/listen/__main__.py +0 -0
  90. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/__init__.py +0 -0
  91. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/clear.py +0 -0
  92. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/exit.py +0 -0
  93. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/message.py +0 -0
  94. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/providers/google.py +0 -0
  95. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/providers/nim.py +0 -0
  96. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/providers/ollama.py +0 -0
  97. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/providers/openai.py +0 -0
  98. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/providers/openrouter.py +0 -0
  99. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/providers/vllm.py +0 -0
  100. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/nlp/think.py +0 -0
  101. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/parser.py +0 -0
  102. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/ptk_shell/__init__.py +0 -0
  103. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/ptk_shell/dialogs.py +0 -0
  104. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/ptk_shell/floats.py +0 -0
  105. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/ptk_shell/layout.py +0 -0
  106. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/ptk_shell/operators.py +0 -0
  107. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/ptk_shell/strformat_utils.py +0 -0
  108. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/ptk_shell/styles.py +0 -0
  109. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/ptk_shell/windows.py +0 -0
  110. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/time.py +0 -0
  111. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/utils.py +0 -0
  112. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/version.py +0 -0
  113. {assistant-2.0.2b1 → assistant-2.2.0a1}/assistant/vocabulary.py +0 -0
  114. {assistant-2.0.2b1 → assistant-2.2.0a1}/pyproject.toml +0 -0
  115. {assistant-2.0.2b1 → assistant-2.2.0a1}/setup.py +0 -0
  116. {assistant-2.0.2b1 → assistant-2.2.0a1}/xontrib/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: assistant
3
- Version: 2.0.2b1
3
+ Version: 2.2.0a1
4
4
  Summary: Your very own Assistant. Because you deserve it.
5
5
  Home-page: https://gitlab.com/waser-technologies/technologies/assistant
6
6
  Author: Danny Waser
@@ -77,17 +77,19 @@ Under the hood it uses a **multi-agent orchestrator**: a main agent receives you
77
77
 
78
78
  | Feature | Description |
79
79
  |---|---|
80
- | 🤖 **Multi-Agent Architecture** | Orchestrator + specialised agents (system, web researcher, etc.) |
81
- | 🔌 **Multi-Provider Support** | Ollama, vLLM, OpenAI — or any OpenAI-compatible API |
80
+ | 🤖 **Multi-Agent Architecture** | Orchestrator + specialised agents (system, web researcher, memory, completer) |
81
+ | 🔌 **Multi-Provider Support** | Ollama, vLLM, LM Studio, OpenRouter, Google, NVIDIA, OpenAI — or any OpenAI-compatible API |
82
82
  | 🛠️ **Rich Tool Set** | Shell execution, web search (SearXNG), read/edit/write files, read web pages |
83
83
  | 🧙 **Setup Wizard** | Interactive wizard generates the TOML config on first launch |
84
84
  | 🗂️ **TOML Configuration** | One file (`~/.assistant/config.toml`) to manage providers, models and agents |
85
- | 💬 **Natural Language Shell** | Type plain English (or French, etc.) alongside regular commands |
85
+ | 💬 **Natural Language Shell** | Type plain English (or French, etc.) alongside regular commands — SyntaxError lines are auto-routed to NLP |
86
86
  | 🧠 **Context Management** | Automatic conversation compaction with sliding window and summarisation |
87
87
  | 🔍 **Web Search** | Integrated SearXNG web search with a dedicated research agent |
88
88
  | 📁 **File Operations** | Agents can read, write and edit files directly |
89
89
  | 🖥️ **TUI Passthrough** | Full-screen apps (vim, htop, less, etc.) run without hijacking |
90
90
  | 🗣️ **Voice (optional)** | TTS via [say](https://gitlab.com/waser-technologies/technologies/say) and STT via [listen](https://gitlab.com/waser-technologies/technologies/listen) |
91
+ | ⚡ **Fast Startup** | Ultra-fast path for simple commands (< 200ms), lazy NLP init, deferred imports |
92
+ | 🎙️ **Streaming TTS** | Karaoke-style TTS playback with sentence-by-sentence streaming during response generation |
91
93
 
92
94
  ---
93
95
 
@@ -134,11 +136,11 @@ assistant config
134
136
 
135
137
  The wizard asks you to choose:
136
138
 
137
- 1. **Provider** — Ollama *(local)*, vLLM *(local)*, or OpenAI *(API)*.
139
+ 1. **Provider** — Ollama *(local)*, vLLM *(local)*, LM Studio, OpenRouter, Google, NVIDIA, or OpenAI *(API)*.
138
140
  2. **Endpoint** — API base URL (e.g. `http://localhost:11434/v1`).
139
141
  3. **API Key** — leave the default for local providers, or enter your API key.
140
142
  4. **Store in keyring** — optionally store the API key securely in your system keyring.
141
- 5. **Model** — model identifier (e.g. `qwen3.5:latest`, `gpt-4o`).
143
+ 5. **Model** — model identifier (e.g. `qwen3.6:latest`, `gpt-4o`).
142
144
  6. **Context length** — how many tokens the model supports.
143
145
  7. **Reasoning** — enable/disable thinking traces.
144
146
  8. **Web search** — enable SearXNG and configure its URL.
@@ -161,7 +163,8 @@ That's it — you're in. Type commands, ask questions, or mix both.
161
163
  - An **LLM backend** — one of:
162
164
  - [Ollama](https://ollama.com/) running locally *(recommended)*
163
165
  - [vLLM](https://docs.vllm.ai/) running locally
164
- - Any OpenAI-compatible API (OpenAI, Together, Groq, etc.)
166
+ - [LM Studio](https://lmstudio.ai/) running locally
167
+ - Any OpenAI-compatible API (OpenAI, Together, Groq, OpenRouter, etc.)
165
168
  - *(optional)* [SearXNG](https://docs.searxng.org/) instance for web search
166
169
  - *(optional)* [`say`](https://gitlab.com/waser-technologies/technologies/say) for text-to-speech
167
170
  - *(optional)* [`listen`](https://gitlab.com/waser-technologies/technologies/listen) for speech-to-text
@@ -224,12 +227,17 @@ does not recognise a command it treats your input as a question:
224
227
  There are 20 entries in the current directory.
225
228
  ```
226
229
 
230
+ Natural language with syntax errors (e.g. single quotes like `c'est quoi?`) is
231
+ automatically routed to the NLP agent instead of raising a Python `SyntaxError`.
232
+
227
233
  ### Multi-Agent Hand-offs
228
234
 
229
235
  The Orchestrator can hand off tasks to specialised agents:
230
236
 
231
237
  - **System agent** — runs shell commands, manages files, executes Python code in the shared xonsh session.
232
238
  - **Web researcher** — searches the web via SearXNG, reads web pages, and produces reports with citations.
239
+ - **Memory agent** — stores and retrieves persistent information from the memory database.
240
+ - **Completer agent** — provides text completion suggestions for the CLI.
233
241
 
234
242
  Hand-offs happen automatically based on the query context.
235
243
 
@@ -259,42 +267,60 @@ endpoint = "http://localhost:11434/v1"
259
267
  credential = "keyring:ollama"
260
268
 
261
269
  [model.qwen]
262
- id = "qwen3.5:latest"
263
- name = "Qwen 3.5 (9B)"
270
+ id = "qwen3.6:latest"
271
+ name = "Qwen 3.6 (9B)"
264
272
  provider = "ollama"
265
- context_length = 128000
273
+ context_length = 256000
274
+ think = false
275
+ temperature = 0.1
266
276
 
267
277
  [agent.orchestrator]
268
278
  name = "Orchestrator"
269
279
  model = "qwen"
270
280
  description = "Main orchestrator; handles general conversations and delegates tasks."
271
- tools = ["xonsh", "web_search", "read_webpage", "read_file", "write_file", "edit_file"]
272
- handoffs = ["system", "web"]
281
+ instructions = "You are Assistant, a sentient artificial intelligence..."
282
+ tools = ["xonsh", "web_search"]
283
+ handoffs = ["system", "web", "memory"]
273
284
 
274
285
  [agent.system]
275
286
  name = "System"
276
287
  model = "qwen"
277
288
  description = "System shell agent for OS interaction."
278
- tools = ["xonsh", "read_file", "write_file", "edit_file"]
289
+ tools = ["xonsh"]
290
+ handoffs = []
279
291
 
280
292
  [agent.web]
281
293
  name = "Web Researcher"
282
294
  model = "qwen"
283
295
  description = "Web research agent with search and page reading."
284
- tools = ["web_search", "read_webpage"]
296
+ tools = ["web_search"]
297
+ handoffs = []
298
+
299
+ [agent.memory]
300
+ name = "Memory"
301
+ model = "qwen"
302
+ description = "Memory management agent for persistent storage."
303
+ tools = ["memory_search", "memory_add"]
304
+ handoffs = []
285
305
 
286
306
  [web_search]
287
307
  enabled = true
288
308
  searxng_url = "http://localhost:8888"
289
309
 
310
+ [completion]
311
+ enabled = true
312
+ wait_timeout = 1
313
+ request_timeout = [10.0, 300.0]
314
+
290
315
  [execution]
291
316
  max_turns = 50
292
317
  temperature = 0.1
293
- max_command_output_length = 25000
294
- think = false
318
+ max_command_output_length = 10000
319
+ command_timeout = 180
295
320
 
296
321
  [memory]
297
322
  enabled = false
323
+ max_entries = 100
298
324
 
299
325
  [context]
300
326
  compaction_threshold = 0.8
@@ -364,10 +390,48 @@ Install [`say`](https://gitlab.com/waser-technologies/technologies/say) and make
364
390
  assistant say Hello World and welcome to everyone.
365
391
  ```
366
392
 
393
+ Assistant supports **streaming TTS** — sentences are spoken as they arrive during
394
+ the LLM response, with a karaoke-style display showing which sentence is being
395
+ pronounced. Press **Ctrl+C** to stop TTS playback at any time.
396
+
367
397
  ### Speech-To-Text
368
398
 
369
399
  Install [`listen`](https://gitlab.com/waser-technologies/technologies/listen) and enable the listen services.
370
400
 
401
+ ### Keyboard Shortcuts
402
+
403
+ | Shortcut | Action |
404
+ |---|---|
405
+ | **Ctrl+O** | Toggle TTS on/off (enable or disable text-to-speech) |
406
+ | **Ctrl+Q** | Toggle STT on/off (enable or disable speech-to-text) |
407
+ | **Ctrl+Space** | Trigger one-shot speech recognition (listen for a sentence) |
408
+ | **Ctrl+C** | Stop TTS playback immediately |
409
+
410
+ > **Note:** These shortcuts require a terminal that supports the Kitty keyboard protocol or xterm `modifyOtherKeys` mode (enabled automatically by Assistant).
411
+
412
+ ### Voice Configuration
413
+
414
+ Voice settings are stored in the `voice` section of `~/.assistant/config.toml`:
415
+
416
+ ```toml
417
+ [voice]
418
+ tts_enabled = true
419
+ stt_enabled = true
420
+ tts_key = "Ctrl+O"
421
+ stt_key = "Ctrl+Q"
422
+ listen_key = "Ctrl+Space"
423
+ ```
424
+
425
+ You can configure voice settings in three ways:
426
+
427
+ 1. **Configuration wizard** — `config` → "Voice Settings"
428
+ 2. **Direct CLI** — `config voice <key> <value>` (e.g., `config voice tts_enabled false`)
429
+ 3. **Manual edit** — edit `~/.assistant/config.toml` directly
430
+
431
+ Toggle shortcuts (Ctrl+O, Ctrl+Q) update the config automatically when pressed, so the runtime state persists across sessions.
432
+
433
+ ---
434
+
371
435
  ## Use Assistant as Your Default Shell
372
436
 
373
437
  > **This is not recommended in beta!**
@@ -381,6 +445,17 @@ chsh -s $(which assistant)
381
445
 
382
446
  Log out and when you come back, `Assistant` should be your default shell.
383
447
 
448
+ ---
449
+
450
+ ## Performance Optimizations
451
+
452
+ Assistant includes several performance optimizations:
453
+
454
+ - **Lazy NLP init**: The LLM interface is deferred until first use, avoiding ~4s warmup on startup
455
+ - **Deferred imports**: Heavy ASR/TTS dependencies (numpy, scipy, pyaudio) are only loaded when voice features are actually used
456
+
457
+ ---
458
+
384
459
  ## Contributions
385
460
 
386
461
  Want to improve the project? Check out [`CONTRIBUTING.md`](CONTRIBUTING.md).
@@ -26,17 +26,19 @@ Under the hood it uses a **multi-agent orchestrator**: a main agent receives you
26
26
 
27
27
  | Feature | Description |
28
28
  |---|---|
29
- | 🤖 **Multi-Agent Architecture** | Orchestrator + specialised agents (system, web researcher, etc.) |
30
- | 🔌 **Multi-Provider Support** | Ollama, vLLM, OpenAI — or any OpenAI-compatible API |
29
+ | 🤖 **Multi-Agent Architecture** | Orchestrator + specialised agents (system, web researcher, memory, completer) |
30
+ | 🔌 **Multi-Provider Support** | Ollama, vLLM, LM Studio, OpenRouter, Google, NVIDIA, OpenAI — or any OpenAI-compatible API |
31
31
  | 🛠️ **Rich Tool Set** | Shell execution, web search (SearXNG), read/edit/write files, read web pages |
32
32
  | 🧙 **Setup Wizard** | Interactive wizard generates the TOML config on first launch |
33
33
  | 🗂️ **TOML Configuration** | One file (`~/.assistant/config.toml`) to manage providers, models and agents |
34
- | 💬 **Natural Language Shell** | Type plain English (or French, etc.) alongside regular commands |
34
+ | 💬 **Natural Language Shell** | Type plain English (or French, etc.) alongside regular commands — SyntaxError lines are auto-routed to NLP |
35
35
  | 🧠 **Context Management** | Automatic conversation compaction with sliding window and summarisation |
36
36
  | 🔍 **Web Search** | Integrated SearXNG web search with a dedicated research agent |
37
37
  | 📁 **File Operations** | Agents can read, write and edit files directly |
38
38
  | 🖥️ **TUI Passthrough** | Full-screen apps (vim, htop, less, etc.) run without hijacking |
39
39
  | 🗣️ **Voice (optional)** | TTS via [say](https://gitlab.com/waser-technologies/technologies/say) and STT via [listen](https://gitlab.com/waser-technologies/technologies/listen) |
40
+ | ⚡ **Fast Startup** | Ultra-fast path for simple commands (< 200ms), lazy NLP init, deferred imports |
41
+ | 🎙️ **Streaming TTS** | Karaoke-style TTS playback with sentence-by-sentence streaming during response generation |
40
42
 
41
43
  ---
42
44
 
@@ -83,11 +85,11 @@ assistant config
83
85
 
84
86
  The wizard asks you to choose:
85
87
 
86
- 1. **Provider** — Ollama *(local)*, vLLM *(local)*, or OpenAI *(API)*.
88
+ 1. **Provider** — Ollama *(local)*, vLLM *(local)*, LM Studio, OpenRouter, Google, NVIDIA, or OpenAI *(API)*.
87
89
  2. **Endpoint** — API base URL (e.g. `http://localhost:11434/v1`).
88
90
  3. **API Key** — leave the default for local providers, or enter your API key.
89
91
  4. **Store in keyring** — optionally store the API key securely in your system keyring.
90
- 5. **Model** — model identifier (e.g. `qwen3.5:latest`, `gpt-4o`).
92
+ 5. **Model** — model identifier (e.g. `qwen3.6:latest`, `gpt-4o`).
91
93
  6. **Context length** — how many tokens the model supports.
92
94
  7. **Reasoning** — enable/disable thinking traces.
93
95
  8. **Web search** — enable SearXNG and configure its URL.
@@ -110,7 +112,8 @@ That's it — you're in. Type commands, ask questions, or mix both.
110
112
  - An **LLM backend** — one of:
111
113
  - [Ollama](https://ollama.com/) running locally *(recommended)*
112
114
  - [vLLM](https://docs.vllm.ai/) running locally
113
- - Any OpenAI-compatible API (OpenAI, Together, Groq, etc.)
115
+ - [LM Studio](https://lmstudio.ai/) running locally
116
+ - Any OpenAI-compatible API (OpenAI, Together, Groq, OpenRouter, etc.)
114
117
  - *(optional)* [SearXNG](https://docs.searxng.org/) instance for web search
115
118
  - *(optional)* [`say`](https://gitlab.com/waser-technologies/technologies/say) for text-to-speech
116
119
  - *(optional)* [`listen`](https://gitlab.com/waser-technologies/technologies/listen) for speech-to-text
@@ -173,12 +176,17 @@ does not recognise a command it treats your input as a question:
173
176
  There are 20 entries in the current directory.
174
177
  ```
175
178
 
179
+ Natural language with syntax errors (e.g. single quotes like `c'est quoi?`) is
180
+ automatically routed to the NLP agent instead of raising a Python `SyntaxError`.
181
+
176
182
  ### Multi-Agent Hand-offs
177
183
 
178
184
  The Orchestrator can hand off tasks to specialised agents:
179
185
 
180
186
  - **System agent** — runs shell commands, manages files, executes Python code in the shared xonsh session.
181
187
  - **Web researcher** — searches the web via SearXNG, reads web pages, and produces reports with citations.
188
+ - **Memory agent** — stores and retrieves persistent information from the memory database.
189
+ - **Completer agent** — provides text completion suggestions for the CLI.
182
190
 
183
191
  Hand-offs happen automatically based on the query context.
184
192
 
@@ -208,42 +216,60 @@ endpoint = "http://localhost:11434/v1"
208
216
  credential = "keyring:ollama"
209
217
 
210
218
  [model.qwen]
211
- id = "qwen3.5:latest"
212
- name = "Qwen 3.5 (9B)"
219
+ id = "qwen3.6:latest"
220
+ name = "Qwen 3.6 (9B)"
213
221
  provider = "ollama"
214
- context_length = 128000
222
+ context_length = 256000
223
+ think = false
224
+ temperature = 0.1
215
225
 
216
226
  [agent.orchestrator]
217
227
  name = "Orchestrator"
218
228
  model = "qwen"
219
229
  description = "Main orchestrator; handles general conversations and delegates tasks."
220
- tools = ["xonsh", "web_search", "read_webpage", "read_file", "write_file", "edit_file"]
221
- handoffs = ["system", "web"]
230
+ instructions = "You are Assistant, a sentient artificial intelligence..."
231
+ tools = ["xonsh", "web_search"]
232
+ handoffs = ["system", "web", "memory"]
222
233
 
223
234
  [agent.system]
224
235
  name = "System"
225
236
  model = "qwen"
226
237
  description = "System shell agent for OS interaction."
227
- tools = ["xonsh", "read_file", "write_file", "edit_file"]
238
+ tools = ["xonsh"]
239
+ handoffs = []
228
240
 
229
241
  [agent.web]
230
242
  name = "Web Researcher"
231
243
  model = "qwen"
232
244
  description = "Web research agent with search and page reading."
233
- tools = ["web_search", "read_webpage"]
245
+ tools = ["web_search"]
246
+ handoffs = []
247
+
248
+ [agent.memory]
249
+ name = "Memory"
250
+ model = "qwen"
251
+ description = "Memory management agent for persistent storage."
252
+ tools = ["memory_search", "memory_add"]
253
+ handoffs = []
234
254
 
235
255
  [web_search]
236
256
  enabled = true
237
257
  searxng_url = "http://localhost:8888"
238
258
 
259
+ [completion]
260
+ enabled = true
261
+ wait_timeout = 1
262
+ request_timeout = [10.0, 300.0]
263
+
239
264
  [execution]
240
265
  max_turns = 50
241
266
  temperature = 0.1
242
- max_command_output_length = 25000
243
- think = false
267
+ max_command_output_length = 10000
268
+ command_timeout = 180
244
269
 
245
270
  [memory]
246
271
  enabled = false
272
+ max_entries = 100
247
273
 
248
274
  [context]
249
275
  compaction_threshold = 0.8
@@ -313,10 +339,48 @@ Install [`say`](https://gitlab.com/waser-technologies/technologies/say) and make
313
339
  assistant say Hello World and welcome to everyone.
314
340
  ```
315
341
 
342
+ Assistant supports **streaming TTS** — sentences are spoken as they arrive during
343
+ the LLM response, with a karaoke-style display showing which sentence is being
344
+ pronounced. Press **Ctrl+C** to stop TTS playback at any time.
345
+
316
346
  ### Speech-To-Text
317
347
 
318
348
  Install [`listen`](https://gitlab.com/waser-technologies/technologies/listen) and enable the listen services.
319
349
 
350
+ ### Keyboard Shortcuts
351
+
352
+ | Shortcut | Action |
353
+ |---|---|
354
+ | **Ctrl+O** | Toggle TTS on/off (enable or disable text-to-speech) |
355
+ | **Ctrl+Q** | Toggle STT on/off (enable or disable speech-to-text) |
356
+ | **Ctrl+Space** | Trigger one-shot speech recognition (listen for a sentence) |
357
+ | **Ctrl+C** | Stop TTS playback immediately |
358
+
359
+ > **Note:** These shortcuts require a terminal that supports the Kitty keyboard protocol or xterm `modifyOtherKeys` mode (enabled automatically by Assistant).
360
+
361
+ ### Voice Configuration
362
+
363
+ Voice settings are stored in the `voice` section of `~/.assistant/config.toml`:
364
+
365
+ ```toml
366
+ [voice]
367
+ tts_enabled = true
368
+ stt_enabled = true
369
+ tts_key = "Ctrl+O"
370
+ stt_key = "Ctrl+Q"
371
+ listen_key = "Ctrl+Space"
372
+ ```
373
+
374
+ You can configure voice settings in three ways:
375
+
376
+ 1. **Configuration wizard** — `config` → "Voice Settings"
377
+ 2. **Direct CLI** — `config voice <key> <value>` (e.g., `config voice tts_enabled false`)
378
+ 3. **Manual edit** — edit `~/.assistant/config.toml` directly
379
+
380
+ Toggle shortcuts (Ctrl+O, Ctrl+Q) update the config automatically when pressed, so the runtime state persists across sessions.
381
+
382
+ ---
383
+
320
384
  ## Use Assistant as Your Default Shell
321
385
 
322
386
  > **This is not recommended in beta!**
@@ -330,6 +394,17 @@ chsh -s $(which assistant)
330
394
 
331
395
  Log out and when you come back, `Assistant` should be your default shell.
332
396
 
397
+ ---
398
+
399
+ ## Performance Optimizations
400
+
401
+ Assistant includes several performance optimizations:
402
+
403
+ - **Lazy NLP init**: The LLM interface is deferred until first use, avoiding ~4s warmup on startup
404
+ - **Deferred imports**: Heavy ASR/TTS dependencies (numpy, scipy, pyaudio) are only loaded when voice features are actually used
405
+
406
+ ---
407
+
333
408
  ## Contributions
334
409
 
335
410
  Want to improve the project? Check out [`CONTRIBUTING.md`](CONTRIBUTING.md).
@@ -1,7 +1,11 @@
1
1
  # from xonsh.main import setup
2
2
  import os
3
+ import warnings
3
4
 
4
- __version__ = "2.0.2b1"
5
+ warnings.filterwarnings("ignore", category=DeprecationWarning, module="webrtcvad")
6
+ warnings.filterwarnings("ignore", category=UserWarning, module="webrtcvad")
7
+
8
+ __version__ = "2.2.0a1"
5
9
 
6
10
  USERNAME = os.environ.get("USER", "root")
7
11
  HOME = os.environ.get("HOME", f"/home/{USERNAME}" if USERNAME != "root" else "/root")
@@ -43,6 +47,7 @@ DEFAULT_MODELS_BY_PROVIDER = {
43
47
  DEFAULT_CONFIG_PATH = os.path.expanduser("~/.assistant/config.toml")
44
48
 
45
49
  # TODO: improve prompts to improve conversation flow for agents. (act as one, understand xonsh repl properly)
50
+ # TODO(plan): trace/memory chantier phases 0-7, see .hermes/plan/chantier-traces-memoire.md (traces cmd, export from xonsh memory, env index, compaction, per-role models in wizard)
46
51
  DEFAULT_CONFIG = {
47
52
  "provider": {
48
53
  "ollama": {
@@ -70,8 +75,11 @@ DEFAULT_CONFIG = {
70
75
  "tools": [
71
76
  "xonsh",
72
77
  "web_search",
73
- # "memory_search",
74
- # "memory_add",
78
+ "memory_search",
79
+ "memory_add",
80
+ "memory_delete",
81
+ "search_conversation",
82
+ "cmd_search",
75
83
  ],
76
84
  # "handoffs": ["system", "web", "memory"],
77
85
  },
@@ -80,7 +88,7 @@ DEFAULT_CONFIG = {
80
88
  "model": "qwen",
81
89
  "description": "System shell; Use to interact with the local OS, such as running terminal commands (ls, pwd), managing files, or executing Python code using a common Xonsh REPL with the user.",
82
90
  "instructions": f"{SYSTEM_PERSONA}\n\n{SYSTEM_ROLE}",
83
- "tools": ["xonsh"],
91
+ "tools": ["xonsh", "cmd_search"],
84
92
  "handoffs": [],
85
93
  },
86
94
  "web": {
@@ -95,8 +103,13 @@ DEFAULT_CONFIG = {
95
103
  "name": "Memory",
96
104
  "model": "qwen",
97
105
  "description": "Memory management agent. Use to store and retrieve persistent information from the memory database.",
98
- "instructions": "You are a memory management agent. Your role is to:\n1. Store important information using memory_add\n2. Retrieve relevant information using memory_search\n3. Help the user recall past conversations, facts, or preferences\n\nAlways be helpful in finding or storing information that the user might want to recall later.",
99
- "tools": ["memory_search", "memory_add"],
106
+ "instructions": "You are a memory management agent. Your role is to:\n1. Store important information using memory_add\n2. Retrieve relevant information using memory_search\n3. Delete obsolete or incorrect entries using memory_delete\n4. Recall past conversations, facts, or preferences using search_conversation (past session transcripts) and memory_search (curated memories)\n\nAlways be helpful in finding, storing, or removing information that the user might want to recall later.",
107
+ "tools": [
108
+ "memory_search",
109
+ "memory_add",
110
+ "memory_delete",
111
+ "search_conversation",
112
+ ],
100
113
  "handoffs": [],
101
114
  },
102
115
  "completer": {
@@ -120,12 +133,40 @@ DEFAULT_CONFIG = {
120
133
  "max_command_output_length": 10000,
121
134
  "command_timeout": 180,
122
135
  },
123
- "memory": {"enabled": False, "max_entries": 100},
136
+ "memory": {
137
+ "enabled": False,
138
+ "max_entries": 100,
139
+ # Phase 7 placeholder: optional local embedding model for memory rows.
140
+ "embed_model": None,
141
+ },
124
142
  "private_data_gathering": {"enabled": False},
143
+ "traces": {"enabled": True, "model": None},
125
144
  "context": {
126
145
  "compaction_threshold": 0.8,
127
146
  "sliding_window_first": 2,
128
147
  "sliding_window_last": 8,
129
148
  "use_summarization": True,
149
+ "summ_model": None,
150
+ "compaction_layers": {
151
+ "full": 3,
152
+ "compressed": 4,
153
+ "skeleton": 5,
154
+ },
155
+ "max_tool_output_in_context": 20000,
156
+ "env_index_enabled": True,
157
+ "env_summary_ttl": 5.0,
158
+ "env_summary_static_budget": 1200,
159
+ # Phase 6: contextual suggestions derived from envindex (typed
160
+ # commands/vars scored by xonsh-history frequency). Injected at the
161
+ # end of the system prompt, after the "Relevant commands" block.
162
+ "suggestions_enabled": True,
163
+ "suggestions_budget": 800,
164
+ },
165
+ "voice": {
166
+ "tts_enabled": True,
167
+ "stt_enabled": True,
168
+ "tts_key": "Ctrl+O",
169
+ "stt_key": "Ctrl+Q",
170
+ "listen_key": "Ctrl+Space",
130
171
  },
131
172
  }