agentnova 0.2.5__tar.gz → 0.2.6__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 (79) hide show
  1. {agentnova-0.2.5 → agentnova-0.2.6}/PKG-INFO +21 -26
  2. {agentnova-0.2.5 → agentnova-0.2.6}/README.md +20 -25
  3. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/__init__.py +212 -212
  4. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/__main__.py +27 -27
  5. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/acp_plugin.py +2353 -2353
  6. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/agent_mode.py +831 -831
  7. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/bitnet_client.py +151 -151
  8. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/bitnet_setup.py +30 -30
  9. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/cli.py +2702 -2699
  10. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/config.py +99 -99
  11. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/agent.py +1342 -1284
  12. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/args_normal.py +324 -324
  13. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/helpers.py +337 -250
  14. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/math_prompts.py +396 -396
  15. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/memory.py +191 -191
  16. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/model_family_config.py +492 -485
  17. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/models.py +47 -47
  18. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/ollama_client.py +553 -553
  19. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/orchestrator.py +191 -191
  20. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/orchestrator_enhanced.py +393 -393
  21. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/prompts.py +193 -180
  22. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/tool_parse.py +434 -413
  23. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/tools.py +304 -304
  24. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/core/types.py +11 -11
  25. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/00_backend_demo.py +211 -211
  26. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/01_basic_agent.py +182 -182
  27. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/02_tool_agent.py +276 -276
  28. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/03_orchestrator.py +209 -209
  29. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/04_comprehensive_test.py +267 -267
  30. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/05_tool_tests.py +494 -494
  31. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/06_interactive_chat.py +216 -216
  32. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/07_model_comparison.py +534 -534
  33. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/08_robust_comparison.py +531 -531
  34. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/09_expanded_benchmark.py +412 -412
  35. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/10_skills_demo.py +366 -366
  36. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/11_skill_creator_test.py +525 -525
  37. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/12_batch_operations.py +214 -214
  38. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/13_shutdown_demo.py +191 -191
  39. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/14_gsm8k_benchmark.py +428 -428
  40. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/examples/15_quick_diagnostic.py +296 -296
  41. agentnova-0.2.6/agentnova/examples/16_agent_mode_test.py +582 -0
  42. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/model_discovery.py +341 -341
  43. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/shared_args.py +146 -146
  44. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/__init__.py +24 -24
  45. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/loader.py +445 -445
  46. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/aggregate_benchmark.py +401 -401
  47. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/generate_report.py +326 -326
  48. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/improve_description.py +247 -247
  49. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/init_skill.py +378 -378
  50. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/package_skill.py +139 -139
  51. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/quick_validate.py +159 -159
  52. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/run_eval.py +310 -310
  53. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/run_loop.py +328 -328
  54. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/security_scan.py +144 -144
  55. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/test_package_skill.py +160 -160
  56. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/test_quick_validate.py +72 -72
  57. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/utils.py +47 -47
  58. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/validate.py +147 -147
  59. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/tools/builtins.py +713 -702
  60. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/tools/sandboxed_repl.py +523 -523
  61. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova.egg-info/PKG-INFO +21 -26
  62. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova.egg-info/SOURCES.txt +1 -0
  63. {agentnova-0.2.5 → agentnova-0.2.6}/localclaw/__init__.py +115 -115
  64. {agentnova-0.2.5 → agentnova-0.2.6}/localclaw/__main__.py +23 -23
  65. {agentnova-0.2.5 → agentnova-0.2.6}/pyproject.toml +1 -1
  66. {agentnova-0.2.5 → agentnova-0.2.6}/tests/test_acp_integration.py +217 -217
  67. {agentnova-0.2.5 → agentnova-0.2.6}/tests/test_acp_subagents.py +310 -310
  68. {agentnova-0.2.5 → agentnova-0.2.6}/tests/test_agent.py +266 -266
  69. {agentnova-0.2.5 → agentnova-0.2.6}/LICENSE +0 -0
  70. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/acp/SKILL.md +0 -0
  71. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/datetime/SKILL.md +0 -0
  72. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/SKILL.md +0 -0
  73. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/skill-creator/scripts/__init__.py +0 -0
  74. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova/skills/web_search/SKILL.md +0 -0
  75. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova.egg-info/dependency_links.txt +0 -0
  76. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova.egg-info/entry_points.txt +0 -0
  77. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova.egg-info/requires.txt +0 -0
  78. {agentnova-0.2.5 → agentnova-0.2.6}/agentnova.egg-info/top_level.txt +0 -0
  79. {agentnova-0.2.5 → agentnova-0.2.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentnova
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: A minimal, hackable agentic framework for Ollama and BitNet - local-first AI agent toolkit
5
5
  Author-email: VTSTech <veritas@vts-tech.org>
6
6
  Maintainer-email: VTSTech <veritas@vts-tech.org>
@@ -34,7 +34,7 @@ Requires-Dist: black>=23.0; extra == "dev"
34
34
  Requires-Dist: ruff>=0.1.0; extra == "dev"
35
35
  Dynamic: license-file
36
36
 
37
- # ⚛️ AgentNova R02.5
37
+ # ⚛️ AgentNova R02.6
38
38
 
39
39
  A minimal, hackable agentic framework engineered to run **entirely locally** with [Ollama](https://ollama.com) or [BitNet](https://github.com/microsoft/BitNet).
40
40
 
@@ -45,7 +45,7 @@ Inspired by the architecture of OpenClaw, rebuilt from scratch for local-first o
45
45
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VTSTech/AgentNova/blob/main/AgentNova.ipynb)
46
46
  [![GitHub commits](https://badgen.net/github/commits/VTSTech/AgentNova)](https://GitHub.com/VTSTech/AgentNova/commit/) [![GitHub latest commit](https://badgen.net/github/last-commit/VTSTech/AgentNova)](https://GitHub.com/VTSTech/AgentNova/commit/)
47
47
 
48
- [![pip - agentnova](https://img.shields.io/badge/pip-agentnova-2ea44f?logo=PyPi)](https://pypi.org/project/agentnova/) [![PyPI version fury.io](https://badge.fury.io/py/agentnova.svg)](https://pypi.python.org/pypi/agentnova/) [![PyPI download month](https://img.shields.io/pypi/dm/agentnova.svg)](https://pypi.org/project/agentnova/) [![PyPI download day](https://img.shields.io/pypi/dd/agentnova.svg)](https://pypi.python.org/pypi/agentnova/)
48
+ [![pip - agentnova](https://img.shields.io/badge/pip-agentnova-2ea44f?logo=PyPi)](https://pypi.org/project/agentnova/) [![PyPI version fury.io](https://badge.fury.io/py/agentnova.svg)](https://pypi.org/project/agentnova/) [![PyPI download month](https://img.shields.io/pypi/dm/agentnova.svg)](https://pypi.org/project/agentnova/) [![PyPI download day](https://img.shields.io/pypi/dd/agentnova.svg)](https://pypi.org/project/agentnova/)
49
49
 
50
50
  [![License](https://img.shields.io/badge/License-MIT-blue)](#license) [![Go to Python website](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2FVTSTech%2FAgentNova%2Frefs%2Fheads%2Fmain%2Fpyproject.toml&query=project.requires-python&label=python&logo=python&logoColor=white)](https://python.org)
51
51
 
@@ -201,31 +201,26 @@ agentnova models --tool_support
201
201
 
202
202
  ### Performance by Tool Support
203
203
 
204
- R02.5 benchmark results (15-test suite):
205
-
206
- | Model | Params | Tool Support | Score | Time |
207
- |-------|--------|--------------|-------|------|
208
- | **`granite3.1-moe:1b`** | 1B MoE | react | **93% (14/15)** | 87.8s |
209
- | **`llama3.2:1b`** | 1.2B | native | **87% (13/15)** | 150.2s |
210
- | `dolphin3.0-qwen2.5:0.5b` | 500M | none | 73% (11/15) | 27.2s |
211
- | `qwen3:0.6b` | 600M | react | 67% (10/15) | 189.3s |
212
- | `qwen2.5-coder:0.5b` | 494M | react | 60% (9/15) | 133.1s |
213
-
214
- **Quick Diagnostic (Test 15 - 5 questions, ~30s/model):**
204
+ R02.6 Quick Diagnostic results (5 questions, ~30-120s/model):
215
205
 
216
206
  | Model | Score | Time | Tool Support |
217
207
  |-------|-------|------|--------------|
218
- | **`dolphin3.0-llama3:1b`** | **100%** | 48.7s | native |
219
- | **`granite4:350m`** | **100%** | 75.2s | native |
220
- | **`qwen2.5-coder:0.5b`** | **100%** | 76.0s | react |
221
- | **`qwen3:0.6b`** | **100%** | 151.0s | react |
222
- | `functiongemma:270m` | 80% | 28.5s | native |
223
- | `dolphin3.0-qwen2.5:0.5b` | 80% | 38.4s | none |
224
-
225
- **Key improvements in R02.5**:
226
- - **4 models achieve 100%** on quick diagnostic (dolphin3.0-llama3:1b fastest at 48.7s)
227
- - **Module refactoring** - agent.py split into 6 focused modules (~1550 lines from ~2770)
228
- - **All tests passing** after module separation, backward compatibility maintained
208
+ | **`functiongemma:270m`** | **100%** | 19.6s | native |
209
+ | **`granite4:350m`** | **100%** | 49.4s | native |
210
+ | **`qwen2.5:0.5b`** | **100%** | 66.3s | native |
211
+ | **`qwen2.5-coder:0.5b`** | **100%** | 116.5s | react |
212
+ | **`qwen3:0.6b`** | **100%** | 122.8s | react |
213
+ | `gemma3:270m` | 80% | 14.3s | none |
214
+ | `dolphin3.0-qwen2.5:0.5b` | 80% | 26.6s | none |
215
+ | `qwen:0.5b` | 20% | 27.0s | none |
216
+
217
+ **Key improvements in R02.6**:
218
+ - **5 models achieve 100%** - All tool-calling models now perfect!
219
+ - **functiongemma:270m fastest** at 19.6s (native tools + 270M params)
220
+ - **Multi-step expression extraction** - Handles `8 times 7 minus 5`, word problems, time calculations
221
+ - **ReAct JSON parsing fixed** - Clean extraction even with trailing text
222
+ - **Verbose response fallback** - Uses numeric result when model gives long explanation
223
+ - **Tool-calling outperforms pure reasoning** - ALL native/react models score 100% vs max 80% for no-tool models
229
224
 
230
225
  ---
231
226
 
@@ -276,7 +271,7 @@ Output shows:
276
271
  - **Tool Support** - `✓ native`, `ReAct`, `○ none`, or `untested`
277
272
 
278
273
  ```
279
- ⚛️ AgentNova R02.5 Models
274
+ ⚛️ AgentNova R02.6 Models
280
275
  Model Family Context Tool Support
281
276
  ──────────────────────────────────────────────────────────────────────────────
282
277
  gemma3:270m gemma3 32K ○ none
@@ -1,4 +1,4 @@
1
- # ⚛️ AgentNova R02.5
1
+ # ⚛️ AgentNova R02.6
2
2
 
3
3
  A minimal, hackable agentic framework engineered to run **entirely locally** with [Ollama](https://ollama.com) or [BitNet](https://github.com/microsoft/BitNet).
4
4
 
@@ -9,7 +9,7 @@ Inspired by the architecture of OpenClaw, rebuilt from scratch for local-first o
9
9
  [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VTSTech/AgentNova/blob/main/AgentNova.ipynb)
10
10
  [![GitHub commits](https://badgen.net/github/commits/VTSTech/AgentNova)](https://GitHub.com/VTSTech/AgentNova/commit/) [![GitHub latest commit](https://badgen.net/github/last-commit/VTSTech/AgentNova)](https://GitHub.com/VTSTech/AgentNova/commit/)
11
11
 
12
- [![pip - agentnova](https://img.shields.io/badge/pip-agentnova-2ea44f?logo=PyPi)](https://pypi.org/project/agentnova/) [![PyPI version fury.io](https://badge.fury.io/py/agentnova.svg)](https://pypi.python.org/pypi/agentnova/) [![PyPI download month](https://img.shields.io/pypi/dm/agentnova.svg)](https://pypi.org/project/agentnova/) [![PyPI download day](https://img.shields.io/pypi/dd/agentnova.svg)](https://pypi.python.org/pypi/agentnova/)
12
+ [![pip - agentnova](https://img.shields.io/badge/pip-agentnova-2ea44f?logo=PyPi)](https://pypi.org/project/agentnova/) [![PyPI version fury.io](https://badge.fury.io/py/agentnova.svg)](https://pypi.org/project/agentnova/) [![PyPI download month](https://img.shields.io/pypi/dm/agentnova.svg)](https://pypi.org/project/agentnova/) [![PyPI download day](https://img.shields.io/pypi/dd/agentnova.svg)](https://pypi.org/project/agentnova/)
13
13
 
14
14
  [![License](https://img.shields.io/badge/License-MIT-blue)](#license) [![Go to Python website](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2FVTSTech%2FAgentNova%2Frefs%2Fheads%2Fmain%2Fpyproject.toml&query=project.requires-python&label=python&logo=python&logoColor=white)](https://python.org)
15
15
 
@@ -165,31 +165,26 @@ agentnova models --tool_support
165
165
 
166
166
  ### Performance by Tool Support
167
167
 
168
- R02.5 benchmark results (15-test suite):
169
-
170
- | Model | Params | Tool Support | Score | Time |
171
- |-------|--------|--------------|-------|------|
172
- | **`granite3.1-moe:1b`** | 1B MoE | react | **93% (14/15)** | 87.8s |
173
- | **`llama3.2:1b`** | 1.2B | native | **87% (13/15)** | 150.2s |
174
- | `dolphin3.0-qwen2.5:0.5b` | 500M | none | 73% (11/15) | 27.2s |
175
- | `qwen3:0.6b` | 600M | react | 67% (10/15) | 189.3s |
176
- | `qwen2.5-coder:0.5b` | 494M | react | 60% (9/15) | 133.1s |
177
-
178
- **Quick Diagnostic (Test 15 - 5 questions, ~30s/model):**
168
+ R02.6 Quick Diagnostic results (5 questions, ~30-120s/model):
179
169
 
180
170
  | Model | Score | Time | Tool Support |
181
171
  |-------|-------|------|--------------|
182
- | **`dolphin3.0-llama3:1b`** | **100%** | 48.7s | native |
183
- | **`granite4:350m`** | **100%** | 75.2s | native |
184
- | **`qwen2.5-coder:0.5b`** | **100%** | 76.0s | react |
185
- | **`qwen3:0.6b`** | **100%** | 151.0s | react |
186
- | `functiongemma:270m` | 80% | 28.5s | native |
187
- | `dolphin3.0-qwen2.5:0.5b` | 80% | 38.4s | none |
188
-
189
- **Key improvements in R02.5**:
190
- - **4 models achieve 100%** on quick diagnostic (dolphin3.0-llama3:1b fastest at 48.7s)
191
- - **Module refactoring** - agent.py split into 6 focused modules (~1550 lines from ~2770)
192
- - **All tests passing** after module separation, backward compatibility maintained
172
+ | **`functiongemma:270m`** | **100%** | 19.6s | native |
173
+ | **`granite4:350m`** | **100%** | 49.4s | native |
174
+ | **`qwen2.5:0.5b`** | **100%** | 66.3s | native |
175
+ | **`qwen2.5-coder:0.5b`** | **100%** | 116.5s | react |
176
+ | **`qwen3:0.6b`** | **100%** | 122.8s | react |
177
+ | `gemma3:270m` | 80% | 14.3s | none |
178
+ | `dolphin3.0-qwen2.5:0.5b` | 80% | 26.6s | none |
179
+ | `qwen:0.5b` | 20% | 27.0s | none |
180
+
181
+ **Key improvements in R02.6**:
182
+ - **5 models achieve 100%** - All tool-calling models now perfect!
183
+ - **functiongemma:270m fastest** at 19.6s (native tools + 270M params)
184
+ - **Multi-step expression extraction** - Handles `8 times 7 minus 5`, word problems, time calculations
185
+ - **ReAct JSON parsing fixed** - Clean extraction even with trailing text
186
+ - **Verbose response fallback** - Uses numeric result when model gives long explanation
187
+ - **Tool-calling outperforms pure reasoning** - ALL native/react models score 100% vs max 80% for no-tool models
193
188
 
194
189
  ---
195
190
 
@@ -240,7 +235,7 @@ Output shows:
240
235
  - **Tool Support** - `✓ native`, `ReAct`, `○ none`, or `untested`
241
236
 
242
237
  ```
243
- ⚛️ AgentNova R02.5 Models
238
+ ⚛️ AgentNova R02.6 Models
244
239
  Model Family Context Tool Support
245
240
  ──────────────────────────────────────────────────────────────────────────────
246
241
  gemma3:270m gemma3 32K ○ none
@@ -1,212 +1,212 @@
1
- """
2
- ⚛️ AgentNova R02.5 - A minimal, hackable agentic framework for Ollama and BitNet
3
-
4
- Written by VTSTech
5
- https://www.vts-tech.org
6
- https://github.com/VTSTech/AgentNova
7
- """
8
-
9
- import os
10
-
11
- from .core.agent import Agent
12
- from .core.models import AgentRun, StepResult
13
- from .core.memory import Memory
14
- from .core.tools import Tool, ToolRegistry, ToolParam
15
- from .core.ollama_client import OllamaClient
16
- from .core.orchestrator import Orchestrator, AgentCard
17
- from .skills import SkillLoader, Skill, SkillRegistry
18
- from .acp_plugin import ACPPlugin, create_acp_agent
19
- from .core.model_family_config import (
20
- ModelFamilyConfig, FAMILY_CONFIGS,
21
- get_family_config, get_stop_tokens, supports_tools,
22
- get_tool_format, get_preferred_temperature, should_use_few_shot,
23
- get_few_shot_style, has_known_issues, get_react_system_suffix,
24
- get_native_tool_hints,
25
- )
26
-
27
- # Config exports
28
- from .config import (
29
- OLLAMA_BASE_URL,
30
- BITNET_BASE_URL,
31
- ACP_BASE_URL,
32
- ACP_USER,
33
- ACP_PASS,
34
- DEFAULT_MODEL,
35
- AGENTNOVA_BACKEND,
36
- )
37
-
38
- # R02: BitNet backend support
39
- try:
40
- from .bitnet_client import BitnetClient, KNOWN_MODELS
41
- _BITNET_AVAILABLE = True
42
- except ImportError:
43
- _BITNET_AVAILABLE = False
44
- BitnetClient = None
45
- KNOWN_MODELS = []
46
-
47
-
48
- def get_default_client():
49
- """
50
- Get the default client based on AGENTNOVA_BACKEND setting.
51
-
52
- Returns
53
- -------
54
- OllamaClient or BitnetClient
55
- The appropriate client for the configured backend.
56
-
57
- Examples
58
- --------
59
- >>> # With AGENTNOVA_BACKEND=ollama (default)
60
- >>> client = get_default_client() # Returns OllamaClient
61
-
62
- >>> # With AGENTNOVA_BACKEND=bitnet
63
- >>> client = get_default_client() # Returns BitnetClient
64
- """
65
- if AGENTNOVA_BACKEND == "bitnet":
66
- if not _BITNET_AVAILABLE:
67
- raise ImportError("BitNet backend requested but bitnet_client not available")
68
- return BitnetClient()
69
- else:
70
- return OllamaClient()
71
-
72
-
73
- def get_available_models(client=None):
74
- """
75
- Get list of available models from the configured backend.
76
-
77
- Parameters
78
- ----------
79
- client : OllamaClient or BitnetClient, optional
80
- Client to use. Creates one via get_default_client() if not provided.
81
-
82
- Returns
83
- -------
84
- list[str]
85
- List of model names available on the backend.
86
- """
87
- if client is None:
88
- client = get_default_client()
89
-
90
- if not client.is_running():
91
- return []
92
-
93
- return client.list_models() or []
94
-
95
-
96
- def get_system_prompt(model: str, client=None, default_prompt: str = None):
97
- """
98
- Get the system prompt based on AGENTNOVA_USE_MF_SYS environment variable.
99
-
100
- If AGENTNOVA_USE_MF_SYS=1, returns the Modelfile's system prompt for the model.
101
- Otherwise returns the provided default_prompt.
102
-
103
- Parameters
104
- ----------
105
- model : str
106
- Model name to get system prompt for.
107
- client : OllamaClient or BitnetClient, optional
108
- Client to use. Creates one via get_default_client() if not provided.
109
- default_prompt : str, optional
110
- Default system prompt to use if AGENTNOVA_USE_MF_SYS is not set.
111
- If None and AGENTNOVA_USE_MF_SYS=1 but no Modelfile system prompt,
112
- returns None (agent will use its own default).
113
-
114
- Returns
115
- -------
116
- str or None
117
- The system prompt to use, or None.
118
-
119
- Examples
120
- --------
121
- >>> # Without AGENTNOVA_USE_MF_SYS set
122
- >>> sys_prompt = get_system_prompt("llama3.2", default_prompt="You are helpful.")
123
- >>> print(sys_prompt) # "You are helpful."
124
-
125
- >>> # With AGENTNOVA_USE_MF_SYS=1
126
- >>> sys_prompt = get_system_prompt("qwen2.5-coder", default_prompt="You are helpful.")
127
- >>> print(sys_prompt) # Modelfile's system prompt, e.g., "You are Qwen..."
128
- """
129
- use_mf_sys = os.environ.get("AGENTNOVA_USE_MF_SYS", "0") == "1"
130
-
131
- if use_mf_sys:
132
- if client is None:
133
- client = get_default_client()
134
-
135
- # Only OllamaClient has get_modelfile_system_prompt
136
- if hasattr(client, "get_modelfile_system_prompt"):
137
- mf_sys = client.get_modelfile_system_prompt(model)
138
- if mf_sys:
139
- print(f" 📜 Using Modelfile system prompt ({len(mf_sys)} chars)")
140
- return mf_sys
141
- else:
142
- print(f" ⚠ No SYSTEM prompt in Modelfile for '{model}', using default")
143
- return default_prompt
144
-
145
- return default_prompt
146
-
147
- # R02 Enhancements
148
- from .core.orchestrator_enhanced import Orchestrator as EnhancedOrchestrator, AgentCard as EnhancedAgentCard
149
-
150
- # Tool support detection
151
- from .cli import get_tool_support
152
-
153
- # Shared args for test scripts
154
- from .shared_args import add_shared_args, parse_shared_args, SharedConfig
155
-
156
- # R02: Agent Mode
157
- from .agent_mode import (
158
- AgentMode, AgentState, TaskPlan, Step, Action,
159
- create_file_write_action, create_file_delete_action,
160
- create_mkdir_action, create_shell_action,
161
- format_status, format_progress,
162
- )
163
-
164
- __all__ = [
165
- # Core
166
- "Agent", "AgentRun", "StepResult",
167
- "Memory", "Tool", "ToolRegistry", "ToolParam",
168
- "OllamaClient", "Orchestrator", "AgentCard",
169
- # Skills
170
- "SkillLoader", "Skill", "SkillRegistry",
171
- # R02 Enhancements
172
- "EnhancedOrchestrator", "EnhancedAgentCard",
173
- "ACPPlugin",
174
- # R02: Backend-agnostic helpers
175
- "get_default_client",
176
- "get_available_models",
177
- "get_system_prompt",
178
- "get_tool_support", # Tool support detection
179
- "model_discovery",
180
- "add_shared_args", # Shared CLI args for test scripts
181
- "parse_shared_args",
182
- "SharedConfig",
183
- # R02: Agent Mode
184
- "AgentMode", "AgentState", "TaskPlan", "Step", "Action",
185
- "create_file_write_action", "create_file_delete_action",
186
- "create_mkdir_action", "create_shell_action",
187
- "format_status", "format_progress",
188
- # R02.5: Model Family Configuration
189
- "ModelFamilyConfig", "FAMILY_CONFIGS",
190
- "get_family_config", "get_stop_tokens", "supports_tools",
191
- "get_tool_format", "get_preferred_temperature", "should_use_few_shot",
192
- "get_few_shot_style", "has_known_issues", "get_react_system_suffix",
193
- "get_native_tool_hints",
194
- # Config exports
195
- "OLLAMA_BASE_URL",
196
- "BITNET_BASE_URL",
197
- "ACP_BASE_URL",
198
- "ACP_USER",
199
- "ACP_PASS",
200
- "DEFAULT_MODEL",
201
- "AGENTNOVA_BACKEND",
202
- ]
203
-
204
- # Conditionally export BitNet
205
- if _BITNET_AVAILABLE:
206
- __all__.extend(["BitnetClient", "KNOWN_MODELS"])
207
-
208
- __version__ = "0.2.5"
209
- __author__ = "VTSTech"
210
- __author_email__ = "veritas@vts-tech.org"
211
- __url__ = "https://github.com/VTSTech/AgentNova"
212
- __website__ = "https://www.vts-tech.org"
1
+ """
2
+ ⚛️ AgentNova R02.6 - A minimal, hackable agentic framework for Ollama and BitNet
3
+
4
+ Written by VTSTech
5
+ https://www.vts-tech.org
6
+ https://github.com/VTSTech/AgentNova
7
+ """
8
+
9
+ import os
10
+
11
+ from .core.agent import Agent
12
+ from .core.models import AgentRun, StepResult
13
+ from .core.memory import Memory
14
+ from .core.tools import Tool, ToolRegistry, ToolParam
15
+ from .core.ollama_client import OllamaClient
16
+ from .core.orchestrator import Orchestrator, AgentCard
17
+ from .skills import SkillLoader, Skill, SkillRegistry
18
+ from .acp_plugin import ACPPlugin, create_acp_agent
19
+ from .core.model_family_config import (
20
+ ModelFamilyConfig, FAMILY_CONFIGS,
21
+ get_family_config, get_stop_tokens, supports_tools,
22
+ get_tool_format, get_preferred_temperature, should_use_few_shot,
23
+ get_few_shot_style, has_known_issues, get_react_system_suffix,
24
+ get_native_tool_hints,
25
+ )
26
+
27
+ # Config exports
28
+ from .config import (
29
+ OLLAMA_BASE_URL,
30
+ BITNET_BASE_URL,
31
+ ACP_BASE_URL,
32
+ ACP_USER,
33
+ ACP_PASS,
34
+ DEFAULT_MODEL,
35
+ AGENTNOVA_BACKEND,
36
+ )
37
+
38
+ # R02: BitNet backend support
39
+ try:
40
+ from .bitnet_client import BitnetClient, KNOWN_MODELS
41
+ _BITNET_AVAILABLE = True
42
+ except ImportError:
43
+ _BITNET_AVAILABLE = False
44
+ BitnetClient = None
45
+ KNOWN_MODELS = []
46
+
47
+
48
+ def get_default_client():
49
+ """
50
+ Get the default client based on AGENTNOVA_BACKEND setting.
51
+
52
+ Returns
53
+ -------
54
+ OllamaClient or BitnetClient
55
+ The appropriate client for the configured backend.
56
+
57
+ Examples
58
+ --------
59
+ >>> # With AGENTNOVA_BACKEND=ollama (default)
60
+ >>> client = get_default_client() # Returns OllamaClient
61
+
62
+ >>> # With AGENTNOVA_BACKEND=bitnet
63
+ >>> client = get_default_client() # Returns BitnetClient
64
+ """
65
+ if AGENTNOVA_BACKEND == "bitnet":
66
+ if not _BITNET_AVAILABLE:
67
+ raise ImportError("BitNet backend requested but bitnet_client not available")
68
+ return BitnetClient()
69
+ else:
70
+ return OllamaClient()
71
+
72
+
73
+ def get_available_models(client=None):
74
+ """
75
+ Get list of available models from the configured backend.
76
+
77
+ Parameters
78
+ ----------
79
+ client : OllamaClient or BitnetClient, optional
80
+ Client to use. Creates one via get_default_client() if not provided.
81
+
82
+ Returns
83
+ -------
84
+ list[str]
85
+ List of model names available on the backend.
86
+ """
87
+ if client is None:
88
+ client = get_default_client()
89
+
90
+ if not client.is_running():
91
+ return []
92
+
93
+ return client.list_models() or []
94
+
95
+
96
+ def get_system_prompt(model: str, client=None, default_prompt: str = None):
97
+ """
98
+ Get the system prompt based on AGENTNOVA_USE_MF_SYS environment variable.
99
+
100
+ If AGENTNOVA_USE_MF_SYS=1, returns the Modelfile's system prompt for the model.
101
+ Otherwise returns the provided default_prompt.
102
+
103
+ Parameters
104
+ ----------
105
+ model : str
106
+ Model name to get system prompt for.
107
+ client : OllamaClient or BitnetClient, optional
108
+ Client to use. Creates one via get_default_client() if not provided.
109
+ default_prompt : str, optional
110
+ Default system prompt to use if AGENTNOVA_USE_MF_SYS is not set.
111
+ If None and AGENTNOVA_USE_MF_SYS=1 but no Modelfile system prompt,
112
+ returns None (agent will use its own default).
113
+
114
+ Returns
115
+ -------
116
+ str or None
117
+ The system prompt to use, or None.
118
+
119
+ Examples
120
+ --------
121
+ >>> # Without AGENTNOVA_USE_MF_SYS set
122
+ >>> sys_prompt = get_system_prompt("llama3.2", default_prompt="You are helpful.")
123
+ >>> print(sys_prompt) # "You are helpful."
124
+
125
+ >>> # With AGENTNOVA_USE_MF_SYS=1
126
+ >>> sys_prompt = get_system_prompt("qwen2.5-coder", default_prompt="You are helpful.")
127
+ >>> print(sys_prompt) # Modelfile's system prompt, e.g., "You are Qwen..."
128
+ """
129
+ use_mf_sys = os.environ.get("AGENTNOVA_USE_MF_SYS", "0") == "1"
130
+
131
+ if use_mf_sys:
132
+ if client is None:
133
+ client = get_default_client()
134
+
135
+ # Only OllamaClient has get_modelfile_system_prompt
136
+ if hasattr(client, "get_modelfile_system_prompt"):
137
+ mf_sys = client.get_modelfile_system_prompt(model)
138
+ if mf_sys:
139
+ print(f" 📜 Using Modelfile system prompt ({len(mf_sys)} chars)")
140
+ return mf_sys
141
+ else:
142
+ print(f" ⚠ No SYSTEM prompt in Modelfile for '{model}', using default")
143
+ return default_prompt
144
+
145
+ return default_prompt
146
+
147
+ # R02 Enhancements
148
+ from .core.orchestrator_enhanced import Orchestrator as EnhancedOrchestrator, AgentCard as EnhancedAgentCard
149
+
150
+ # Tool support detection
151
+ from .cli import get_tool_support
152
+
153
+ # Shared args for test scripts
154
+ from .shared_args import add_shared_args, parse_shared_args, SharedConfig
155
+
156
+ # R02: Agent Mode
157
+ from .agent_mode import (
158
+ AgentMode, AgentState, TaskPlan, Step, Action,
159
+ create_file_write_action, create_file_delete_action,
160
+ create_mkdir_action, create_shell_action,
161
+ format_status, format_progress,
162
+ )
163
+
164
+ __all__ = [
165
+ # Core
166
+ "Agent", "AgentRun", "StepResult",
167
+ "Memory", "Tool", "ToolRegistry", "ToolParam",
168
+ "OllamaClient", "Orchestrator", "AgentCard",
169
+ # Skills
170
+ "SkillLoader", "Skill", "SkillRegistry",
171
+ # R02 Enhancements
172
+ "EnhancedOrchestrator", "EnhancedAgentCard",
173
+ "ACPPlugin",
174
+ # R02: Backend-agnostic helpers
175
+ "get_default_client",
176
+ "get_available_models",
177
+ "get_system_prompt",
178
+ "get_tool_support", # Tool support detection
179
+ "model_discovery",
180
+ "add_shared_args", # Shared CLI args for test scripts
181
+ "parse_shared_args",
182
+ "SharedConfig",
183
+ # R02: Agent Mode
184
+ "AgentMode", "AgentState", "TaskPlan", "Step", "Action",
185
+ "create_file_write_action", "create_file_delete_action",
186
+ "create_mkdir_action", "create_shell_action",
187
+ "format_status", "format_progress",
188
+ # R02.6: Model Family Configuration
189
+ "ModelFamilyConfig", "FAMILY_CONFIGS",
190
+ "get_family_config", "get_stop_tokens", "supports_tools",
191
+ "get_tool_format", "get_preferred_temperature", "should_use_few_shot",
192
+ "get_few_shot_style", "has_known_issues", "get_react_system_suffix",
193
+ "get_native_tool_hints",
194
+ # Config exports
195
+ "OLLAMA_BASE_URL",
196
+ "BITNET_BASE_URL",
197
+ "ACP_BASE_URL",
198
+ "ACP_USER",
199
+ "ACP_PASS",
200
+ "DEFAULT_MODEL",
201
+ "AGENTNOVA_BACKEND",
202
+ ]
203
+
204
+ # Conditionally export BitNet
205
+ if _BITNET_AVAILABLE:
206
+ __all__.extend(["BitnetClient", "KNOWN_MODELS"])
207
+
208
+ __version__ = "0.2.6"
209
+ __author__ = "VTSTech"
210
+ __author_email__ = "veritas@vts-tech.org"
211
+ __url__ = "https://github.com/VTSTech/AgentNova"
212
+ __website__ = "https://www.vts-tech.org"
@@ -1,27 +1,27 @@
1
- #!/usr/bin/env python3
2
- """
3
- ⚛️ AgentNova R02 — Command Line Interface
4
-
5
- Entry point for: python -m agentnova [command] [options]
6
-
7
- Commands:
8
- run Run the agent on a single prompt and exit
9
- chat Interactive multi-turn conversation with memory
10
- models List models available in Ollama
11
- tools List available built-in tools
12
- skills List available Agent Skills
13
-
14
- Examples:
15
- python -m agentnova run "What is the capital of France?"
16
- python -m agentnova chat --model llama3.1:8b --tools calculator,shell
17
- python -m agentnova models
18
- python -m agentnova tools
19
- python -m agentnova skills
20
-
21
- Written by VTSTech · https://www.vts-tech.org · https://github.com/VTSTech/AgentNova
22
- """
23
-
24
- from agentnova.cli import main
25
-
26
- if __name__ == "__main__":
27
- main()
1
+ #!/usr/bin/env python3
2
+ """
3
+ ⚛️ AgentNova R02 — Command Line Interface
4
+
5
+ Entry point for: python -m agentnova [command] [options]
6
+
7
+ Commands:
8
+ run Run the agent on a single prompt and exit
9
+ chat Interactive multi-turn conversation with memory
10
+ models List models available in Ollama
11
+ tools List available built-in tools
12
+ skills List available Agent Skills
13
+
14
+ Examples:
15
+ python -m agentnova run "What is the capital of France?"
16
+ python -m agentnova chat --model llama3.1:8b --tools calculator,shell
17
+ python -m agentnova models
18
+ python -m agentnova tools
19
+ python -m agentnova skills
20
+
21
+ Written by VTSTech · https://www.vts-tech.org · https://github.com/VTSTech/AgentNova
22
+ """
23
+
24
+ from agentnova.cli import main
25
+
26
+ if __name__ == "__main__":
27
+ main()