agentnova 0.2.6__tar.gz → 0.3.0__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 (112) hide show
  1. agentnova-0.3.0/PKG-INFO +331 -0
  2. agentnova-0.3.0/README.md +297 -0
  3. agentnova-0.3.0/agentnova/__init__.py +118 -0
  4. agentnova-0.3.0/agentnova/__main__.py +12 -0
  5. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/acp_plugin.py +56 -348
  6. agentnova-0.3.0/agentnova/agent.py +901 -0
  7. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/agent_mode.py +19 -4
  8. agentnova-0.3.0/agentnova/backends/__init__.py +83 -0
  9. agentnova-0.3.0/agentnova/backends/base.py +182 -0
  10. agentnova-0.3.0/agentnova/backends/bitnet.py +233 -0
  11. agentnova-0.3.0/agentnova/backends/ollama.py +570 -0
  12. agentnova-0.3.0/agentnova/cli.py +1088 -0
  13. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/config.py +110 -27
  14. agentnova-0.3.0/agentnova/core/__init__.py +95 -0
  15. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/core/args_normal.py +20 -15
  16. agentnova-0.3.0/agentnova/core/helpers.py +809 -0
  17. agentnova-0.3.0/agentnova/core/memory.py +164 -0
  18. agentnova-0.3.0/agentnova/core/model_config.py +241 -0
  19. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/core/model_family_config.py +55 -129
  20. agentnova-0.3.0/agentnova/core/models.py +114 -0
  21. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/core/prompts.py +213 -5
  22. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/core/tool_parse.py +331 -16
  23. agentnova-0.3.0/agentnova/core/types.py +65 -0
  24. agentnova-0.3.0/agentnova/examples/00_basic_agent.py +72 -0
  25. agentnova-0.3.0/agentnova/examples/01_quick_diagnostic.py +193 -0
  26. agentnova-0.3.0/agentnova/examples/02_tool_test.py +283 -0
  27. agentnova-0.3.0/agentnova/examples/03_reasoning_test.py +274 -0
  28. agentnova-0.3.0/agentnova/examples/04_gsm8k_benchmark.py +229 -0
  29. agentnova-0.3.0/agentnova/examples/__init__.py +21 -0
  30. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/model_discovery.py +98 -106
  31. agentnova-0.3.0/agentnova/orchestrator.py +205 -0
  32. {agentnova-0.2.6/agentnova/core → agentnova-0.3.0/agentnova}/orchestrator_enhanced.py +54 -54
  33. agentnova-0.3.0/agentnova/py.typed +2 -0
  34. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/shared_args.py +24 -2
  35. agentnova-0.3.0/agentnova/skills/web-search/SKILL.md +74 -0
  36. agentnova-0.3.0/agentnova/tools/__init__.py +23 -0
  37. agentnova-0.3.0/agentnova/tools/builtins.py +412 -0
  38. agentnova-0.3.0/agentnova/tools/registry.py +183 -0
  39. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/tools/sandboxed_repl.py +68 -68
  40. agentnova-0.3.0/agentnova.egg-info/PKG-INFO +331 -0
  41. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova.egg-info/SOURCES.txt +20 -26
  42. agentnova-0.3.0/agentnova.egg-info/entry_points.txt +7 -0
  43. agentnova-0.3.0/localclaw/__init__.py +51 -0
  44. agentnova-0.3.0/localclaw-redirect/localclaw/__init__.py +76 -0
  45. {agentnova-0.2.6 → agentnova-0.3.0}/pyproject.toml +15 -15
  46. {agentnova-0.2.6 → agentnova-0.3.0}/tests/test_acp_integration.py +223 -217
  47. {agentnova-0.2.6 → agentnova-0.3.0}/tests/test_acp_subagents.py +296 -310
  48. agentnova-0.3.0/tests/test_agent.py +272 -0
  49. agentnova-0.2.6/PKG-INFO +0 -360
  50. agentnova-0.2.6/README.md +0 -324
  51. agentnova-0.2.6/agentnova/__init__.py +0 -212
  52. agentnova-0.2.6/agentnova/__main__.py +0 -27
  53. agentnova-0.2.6/agentnova/bitnet_client.py +0 -151
  54. agentnova-0.2.6/agentnova/bitnet_setup.py +0 -30
  55. agentnova-0.2.6/agentnova/cli.py +0 -2702
  56. agentnova-0.2.6/agentnova/core/agent.py +0 -1342
  57. agentnova-0.2.6/agentnova/core/helpers.py +0 -337
  58. agentnova-0.2.6/agentnova/core/memory.py +0 -191
  59. agentnova-0.2.6/agentnova/core/models.py +0 -47
  60. agentnova-0.2.6/agentnova/core/ollama_client.py +0 -553
  61. agentnova-0.2.6/agentnova/core/orchestrator.py +0 -191
  62. agentnova-0.2.6/agentnova/core/tools.py +0 -304
  63. agentnova-0.2.6/agentnova/core/types.py +0 -11
  64. agentnova-0.2.6/agentnova/examples/00_backend_demo.py +0 -211
  65. agentnova-0.2.6/agentnova/examples/01_basic_agent.py +0 -182
  66. agentnova-0.2.6/agentnova/examples/02_tool_agent.py +0 -276
  67. agentnova-0.2.6/agentnova/examples/03_orchestrator.py +0 -209
  68. agentnova-0.2.6/agentnova/examples/04_comprehensive_test.py +0 -267
  69. agentnova-0.2.6/agentnova/examples/05_tool_tests.py +0 -494
  70. agentnova-0.2.6/agentnova/examples/06_interactive_chat.py +0 -216
  71. agentnova-0.2.6/agentnova/examples/07_model_comparison.py +0 -534
  72. agentnova-0.2.6/agentnova/examples/08_robust_comparison.py +0 -531
  73. agentnova-0.2.6/agentnova/examples/09_expanded_benchmark.py +0 -412
  74. agentnova-0.2.6/agentnova/examples/10_skills_demo.py +0 -366
  75. agentnova-0.2.6/agentnova/examples/11_skill_creator_test.py +0 -525
  76. agentnova-0.2.6/agentnova/examples/12_batch_operations.py +0 -214
  77. agentnova-0.2.6/agentnova/examples/13_shutdown_demo.py +0 -191
  78. agentnova-0.2.6/agentnova/examples/14_gsm8k_benchmark.py +0 -428
  79. agentnova-0.2.6/agentnova/examples/15_quick_diagnostic.py +0 -296
  80. agentnova-0.2.6/agentnova/examples/16_agent_mode_test.py +0 -582
  81. agentnova-0.2.6/agentnova/skills/web_search/SKILL.md +0 -138
  82. agentnova-0.2.6/agentnova/tools/builtins.py +0 -713
  83. agentnova-0.2.6/agentnova.egg-info/PKG-INFO +0 -360
  84. agentnova-0.2.6/agentnova.egg-info/entry_points.txt +0 -6
  85. agentnova-0.2.6/localclaw/__init__.py +0 -115
  86. agentnova-0.2.6/localclaw/__main__.py +0 -23
  87. agentnova-0.2.6/tests/test_agent.py +0 -266
  88. {agentnova-0.2.6 → agentnova-0.3.0}/LICENSE +0 -0
  89. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/core/math_prompts.py +0 -0
  90. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/__init__.py +0 -0
  91. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/acp/SKILL.md +0 -0
  92. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/datetime/SKILL.md +0 -0
  93. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/loader.py +0 -0
  94. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/SKILL.md +0 -0
  95. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/__init__.py +0 -0
  96. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/aggregate_benchmark.py +0 -0
  97. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/generate_report.py +0 -0
  98. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/improve_description.py +0 -0
  99. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/init_skill.py +0 -0
  100. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/package_skill.py +0 -0
  101. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/quick_validate.py +0 -0
  102. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/run_eval.py +0 -0
  103. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/run_loop.py +0 -0
  104. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/security_scan.py +0 -0
  105. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/test_package_skill.py +0 -0
  106. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/test_quick_validate.py +0 -0
  107. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/utils.py +0 -0
  108. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova/skills/skill-creator/scripts/validate.py +0 -0
  109. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova.egg-info/dependency_links.txt +0 -0
  110. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova.egg-info/requires.txt +0 -0
  111. {agentnova-0.2.6 → agentnova-0.3.0}/agentnova.egg-info/top_level.txt +0 -0
  112. {agentnova-0.2.6 → agentnova-0.3.0}/setup.cfg +0 -0
@@ -0,0 +1,331 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentnova
3
+ Version: 0.3.0
4
+ Summary: ⚛️ AgentNova - A minimal, hackable agentic framework for local LLM inference
5
+ Author-email: VTSTech <veritas@vts-tech.org>
6
+ Maintainer-email: VTSTech <veritas@vts-tech.org>
7
+ License: MIT
8
+ Project-URL: Homepage, https://www.vts-tech.org
9
+ Project-URL: Documentation, https://github.com/VTSTech/AgentNova#readme
10
+ Project-URL: Repository, https://github.com/VTSTech/AgentNova
11
+ Project-URL: Issues, https://github.com/VTSTech/AgentNova/issues
12
+ Keywords: llm,agent,ollama,bitnet,local-inference,tool-calling,react,autonomous,agentic,ai-agent
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
+ Requires-Python: >=3.9
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=7.0; extra == "dev"
31
+ Requires-Dist: black>=23.0; extra == "dev"
32
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
33
+ Dynamic: license-file
34
+
35
+ # ⚛️ AgentNova R03
36
+
37
+ **Status: Alpha**
38
+
39
+ A minimal, hackable agentic framework engineered to run **entirely locally** with [Ollama](https://ollama.com) or [BitNet](https://github.com/microsoft/BitNet).
40
+
41
+ Inspired by the architecture of OpenClaw, rebuilt from scratch for local-first operation.
42
+
43
+ **Written by [VTSTech](https://www.vts-tech.org)** · [GitHub](https://github.com/VTSTech/AgentNova)
44
+
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
+ [![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
+
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
+
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
+
52
+ ---
53
+
54
+ ## 📚 Documentation
55
+
56
+ | Document | Description |
57
+ |----------|-------------|
58
+ | [Architecture.md](https://github.com/VTSTech/AgentNova/blob/main/Architecture.md) | Technical documentation for developers (directory structure, core design, orchestrator modes) |
59
+ | [CHANGELOG.md](https://github.com/VTSTech/AgentNova/blob/main/CHANGELOG.md) | Version history and release notes (includes LocalClaw history) |
60
+ | [TESTS.md](https://github.com/VTSTech/AgentNova/blob/main/TESTS.md) | Benchmark results, model recommendations, and testing guide |
61
+
62
+ ## Features
63
+
64
+ - **Zero dependencies** — Uses Python stdlib only (urllib for HTTP)
65
+ - **Ollama + BitNet backends** — Switch with `--backend` flag
66
+ - **Three-tier tool support** — Native, ReAct, or none (auto-detected)
67
+ - **Small model optimized** — Fuzzy matching, argument normalization
68
+ - **Built-in security** — Path validation, command blocklist, SSRF protection
69
+ - **Multi-agent orchestration** — Router, pipeline, and parallel modes
70
+
71
+ ## Installation
72
+
73
+ ```bash
74
+ # From source
75
+ git clone https://github.com/VTSTech/AgentNova.git
76
+ cd AgentNova
77
+ pip install -e .
78
+
79
+ # Or from PyPI (when published)
80
+ pip install agentnova
81
+ ```
82
+
83
+ ## Quick Start
84
+
85
+ ### CLI Usage
86
+
87
+ ```bash
88
+ # Run a single prompt
89
+ agentnova run "What is 15 * 8?" --tools calculator
90
+
91
+ # Interactive chat
92
+ agentnova chat -m qwen2.5:0.5b --tools calculator,shell
93
+
94
+ # Autonomous agent mode
95
+ agentnova agent -m qwen2.5:7b --tools calculator,shell,write_file
96
+
97
+ # List available models
98
+ agentnova models
99
+
100
+ # List available tools
101
+ agentnova tools
102
+ ```
103
+
104
+ ### Python API
105
+
106
+ ```python
107
+ from agentnova import Agent
108
+ from agentnova.tools import make_builtin_registry
109
+
110
+ # Create tools
111
+ tools = make_builtin_registry().subset(["calculator", "shell"])
112
+
113
+ # Create agent
114
+ agent = Agent(
115
+ model="qwen2.5:0.5b",
116
+ tools=tools,
117
+ backend="ollama",
118
+ )
119
+
120
+ # Run
121
+ result = agent.run("What is 15 * 8?")
122
+ print(result.final_answer)
123
+ print(f"Completed in {result.total_ms:.0f}ms")
124
+ ```
125
+
126
+ ### Multi-Agent Orchestration
127
+
128
+ ```python
129
+ from agentnova import Agent, Orchestrator, AgentCard
130
+
131
+ orchestrator = Orchestrator(mode="router")
132
+
133
+ # Register specialized agents
134
+ orchestrator.register(AgentCard(
135
+ name="math_agent",
136
+ description="Handles mathematical calculations",
137
+ capabilities=["calculate", "math", "compute"],
138
+ tools=["calculator"],
139
+ ))
140
+
141
+ orchestrator.register(AgentCard(
142
+ name="file_agent",
143
+ description="Handles file operations",
144
+ capabilities=["read", "write", "file"],
145
+ tools=["read_file", "write_file"],
146
+ ))
147
+
148
+ # Route tasks to appropriate agent
149
+ result = orchestrator.run("Calculate 15 * 8 and save to file")
150
+ ```
151
+
152
+ ## Architecture
153
+
154
+ ```
155
+ agentnova/
156
+ ├── core/
157
+ │ ├── types.py # Enum types
158
+ │ ├── models.py # Data models
159
+ │ ├── memory.py # Sliding window memory
160
+ │ ├── tool_parse.py # Tool call extraction
161
+ │ ├── helpers.py # Utilities (fuzzy match, security)
162
+ │ ├── prompts.py # Model-specific prompts
163
+ │ └── model_config.py # Model family configurations
164
+ ├── tools/
165
+ │ ├── registry.py # Tool registry
166
+ │ └── builtins.py # Built-in tools
167
+ ├── backends/
168
+ │ ├── base.py # Abstract backend
169
+ │ ├── ollama.py # Ollama backend
170
+ │ └── bitnet.py # BitNet backend
171
+ ├── skills/
172
+ │ └── loader.py # Skill loader
173
+ ├── agent.py # Main Agent class
174
+ ├── agent_mode.py # Autonomous mode
175
+ ├── orchestrator.py # Multi-agent orchestration
176
+ ├── config.py # Configuration
177
+ └── cli.py # Command-line interface
178
+ ```
179
+
180
+ ## Tool Support Levels
181
+
182
+ AgentNova supports three levels of tool use:
183
+
184
+ 1. **Native** — Models with built-in function calling (qwen2.5, llama3.1+, mistral, granite, functiongemma)
185
+ 2. **ReAct** — Text-based tool use via reasoning prompts (qwen2.5-coder, qwen3)
186
+ 3. **None** — Pure reasoning without tools
187
+
188
+ Tool support is auto-detected by running `agentnova models --tool-support`. Results are cached in `~/.cache/agentnova/tool_support.json`.
189
+
190
+ ```bash
191
+ # Test and cache tool support for all models
192
+ agentnova models --tool-support
193
+
194
+ # Re-test (ignore cache)
195
+ agentnova models --tool-support --no-cache
196
+ ```
197
+
198
+ You can also force ReAct mode:
199
+
200
+ ```python
201
+ agent = Agent(model="qwen2.5:0.5b", force_react=True)
202
+ ```
203
+
204
+ ## Model Families
205
+
206
+ Configured model families with optimized prompts:
207
+
208
+ - **qwen2.5** — Native tool support, excellent performance
209
+ - **llama3.1/3.2/3.3** — Native tool support
210
+ - **mistral/mixtral** — Native tool support
211
+ - **gemma2/gemma3** — ReAct mode, special prompting
212
+ - **granite/granitemoe** — Native tool support
213
+ - **phi3** — Native tool support
214
+ - **deepseek** — Native with `<think/>` tag handling
215
+
216
+ ## Security Features
217
+
218
+ Built-in security for safe operation:
219
+
220
+ - **Command blocklist** — Blocks dangerous shell commands (rm, sudo, etc.)
221
+ - **Path validation** — Prevents access to sensitive directories
222
+ - **SSRF protection** — Blocks requests to local/internal URLs
223
+ - **Injection detection** — Detects shell injection patterns
224
+
225
+ ## Configuration
226
+
227
+ Environment variables:
228
+
229
+ ```bash
230
+ # Backend URLs
231
+ OLLAMA_BASE_URL=https://your-ollama-server.com # Default: http://localhost:11434
232
+ BITNET_BASE_URL=http://localhost:8765 # BitNet server URL
233
+ BITNET_TUNNEL=https://your-tunnel.com # Alternative BitNet URL
234
+ ACP_BASE_URL=http://localhost:8766 # ACP server URL
235
+
236
+ # Agent settings
237
+ AGENTNOVA_BACKEND=ollama # Default backend: ollama or bitnet
238
+ AGENTNOVA_MODEL=qwen2.5:0.5b # Default model
239
+ AGENTNOVA_MAX_STEPS=10 # Maximum reasoning steps
240
+ AGENTNOVA_DEBUG=false # Enable debug output
241
+ ```
242
+
243
+ Check current configuration:
244
+ ```bash
245
+ agentnova config
246
+ agentnova config --urls # Show only URLs
247
+ ```
248
+
249
+ ## LocalClaw Redirect
250
+
251
+ The `localclaw` command is provided for backward compatibility:
252
+
253
+ ```bash
254
+ # Both work identically
255
+ localclaw run "What is 2+2?"
256
+ agentnova run "What is 2+2?"
257
+ ```
258
+
259
+ ## Tests & Examples
260
+
261
+ AgentNova includes a suite of tests for validating agent capabilities:
262
+
263
+ ```bash
264
+ # Basic agent test (no tools)
265
+ python -m agentnova.examples.00_basic_agent
266
+
267
+ # Quick 5-question diagnostic
268
+ python -m agentnova.examples.01_quick_diagnostic
269
+
270
+ # Tool usage tests (calculator, shell, datetime)
271
+ python -m agentnova.examples.02_tool_test
272
+
273
+ # Logic and reasoning tests (BBH-style)
274
+ python -m agentnova.examples.03_reasoning_test
275
+
276
+ # GSM8K math benchmark (50 questions)
277
+ python -m agentnova.examples.04_gsm8k_benchmark
278
+ ```
279
+
280
+ ### Test Categories
281
+
282
+ | Test | Questions | Focus |
283
+ |------|-----------|-------|
284
+ | Quick Diagnostic | 5 | Calculator tool, multi-step reasoning |
285
+ | Tool Test | 10 | Calculator, shell, datetime tools |
286
+ | Reasoning Test | 13 | Logic, deduction, patterns, spatial |
287
+ | GSM8K Benchmark | 50 | Math word problems |
288
+
289
+ ### Benchmark Results (Quick Diagnostic)
290
+
291
+ | Model | Score | Time | Tool Support |
292
+ |-------|-------|------|-------------|
293
+ | functiongemma:270m | 5/5 (100%) | ~20s | native |
294
+ | granite4:350m | 5/5 (100%) | ~50s | native |
295
+ | qwen2.5:0.5b | 5/5 (100%) | 38s | native |
296
+ | qwen2.5-coder:0.5b | 5/5 (100%) | 93s | react |
297
+ | qwen3:0.6b | 5/5 (100%) | 70s | react |
298
+
299
+ All tested models achieve 100% on the Quick Diagnostic. Native models are ~2x faster than ReAct models due to direct API tool calling.
300
+
301
+ ## Development
302
+
303
+ ```bash
304
+ # Install dev dependencies
305
+ pip install -e ".[dev]"
306
+
307
+ # Run unit tests
308
+ pytest
309
+
310
+ # Format code
311
+ black agentnova
312
+ ruff check agentnova
313
+ ```
314
+
315
+ ## License
316
+
317
+ MIT License - See LICENSE file for details.
318
+
319
+ ## Author
320
+
321
+ **VTSTech** — [https://www.vts-tech.org](https://www.vts-tech.org)
322
+
323
+ ## Contributing
324
+
325
+ Contributions welcome! Please read the contributing guidelines first.
326
+
327
+ ## Acknowledgments
328
+
329
+ - Built for local inference with [Ollama](https://ollama.ai)
330
+ - Optimized for small, efficient models
331
+ - Inspired by ReAct and other agentic frameworks
@@ -0,0 +1,297 @@
1
+ # ⚛️ AgentNova R03
2
+
3
+ **Status: Alpha**
4
+
5
+ A minimal, hackable agentic framework engineered to run **entirely locally** with [Ollama](https://ollama.com) or [BitNet](https://github.com/microsoft/BitNet).
6
+
7
+ Inspired by the architecture of OpenClaw, rebuilt from scratch for local-first operation.
8
+
9
+ **Written by [VTSTech](https://www.vts-tech.org)** · [GitHub](https://github.com/VTSTech/AgentNova)
10
+
11
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/VTSTech/AgentNova/blob/main/AgentNova.ipynb)
12
+ [![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/)
13
+
14
+ [![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/)
15
+
16
+ [![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)
17
+
18
+ ---
19
+
20
+ ## 📚 Documentation
21
+
22
+ | Document | Description |
23
+ |----------|-------------|
24
+ | [Architecture.md](https://github.com/VTSTech/AgentNova/blob/main/Architecture.md) | Technical documentation for developers (directory structure, core design, orchestrator modes) |
25
+ | [CHANGELOG.md](https://github.com/VTSTech/AgentNova/blob/main/CHANGELOG.md) | Version history and release notes (includes LocalClaw history) |
26
+ | [TESTS.md](https://github.com/VTSTech/AgentNova/blob/main/TESTS.md) | Benchmark results, model recommendations, and testing guide |
27
+
28
+ ## Features
29
+
30
+ - **Zero dependencies** — Uses Python stdlib only (urllib for HTTP)
31
+ - **Ollama + BitNet backends** — Switch with `--backend` flag
32
+ - **Three-tier tool support** — Native, ReAct, or none (auto-detected)
33
+ - **Small model optimized** — Fuzzy matching, argument normalization
34
+ - **Built-in security** — Path validation, command blocklist, SSRF protection
35
+ - **Multi-agent orchestration** — Router, pipeline, and parallel modes
36
+
37
+ ## Installation
38
+
39
+ ```bash
40
+ # From source
41
+ git clone https://github.com/VTSTech/AgentNova.git
42
+ cd AgentNova
43
+ pip install -e .
44
+
45
+ # Or from PyPI (when published)
46
+ pip install agentnova
47
+ ```
48
+
49
+ ## Quick Start
50
+
51
+ ### CLI Usage
52
+
53
+ ```bash
54
+ # Run a single prompt
55
+ agentnova run "What is 15 * 8?" --tools calculator
56
+
57
+ # Interactive chat
58
+ agentnova chat -m qwen2.5:0.5b --tools calculator,shell
59
+
60
+ # Autonomous agent mode
61
+ agentnova agent -m qwen2.5:7b --tools calculator,shell,write_file
62
+
63
+ # List available models
64
+ agentnova models
65
+
66
+ # List available tools
67
+ agentnova tools
68
+ ```
69
+
70
+ ### Python API
71
+
72
+ ```python
73
+ from agentnova import Agent
74
+ from agentnova.tools import make_builtin_registry
75
+
76
+ # Create tools
77
+ tools = make_builtin_registry().subset(["calculator", "shell"])
78
+
79
+ # Create agent
80
+ agent = Agent(
81
+ model="qwen2.5:0.5b",
82
+ tools=tools,
83
+ backend="ollama",
84
+ )
85
+
86
+ # Run
87
+ result = agent.run("What is 15 * 8?")
88
+ print(result.final_answer)
89
+ print(f"Completed in {result.total_ms:.0f}ms")
90
+ ```
91
+
92
+ ### Multi-Agent Orchestration
93
+
94
+ ```python
95
+ from agentnova import Agent, Orchestrator, AgentCard
96
+
97
+ orchestrator = Orchestrator(mode="router")
98
+
99
+ # Register specialized agents
100
+ orchestrator.register(AgentCard(
101
+ name="math_agent",
102
+ description="Handles mathematical calculations",
103
+ capabilities=["calculate", "math", "compute"],
104
+ tools=["calculator"],
105
+ ))
106
+
107
+ orchestrator.register(AgentCard(
108
+ name="file_agent",
109
+ description="Handles file operations",
110
+ capabilities=["read", "write", "file"],
111
+ tools=["read_file", "write_file"],
112
+ ))
113
+
114
+ # Route tasks to appropriate agent
115
+ result = orchestrator.run("Calculate 15 * 8 and save to file")
116
+ ```
117
+
118
+ ## Architecture
119
+
120
+ ```
121
+ agentnova/
122
+ ├── core/
123
+ │ ├── types.py # Enum types
124
+ │ ├── models.py # Data models
125
+ │ ├── memory.py # Sliding window memory
126
+ │ ├── tool_parse.py # Tool call extraction
127
+ │ ├── helpers.py # Utilities (fuzzy match, security)
128
+ │ ├── prompts.py # Model-specific prompts
129
+ │ └── model_config.py # Model family configurations
130
+ ├── tools/
131
+ │ ├── registry.py # Tool registry
132
+ │ └── builtins.py # Built-in tools
133
+ ├── backends/
134
+ │ ├── base.py # Abstract backend
135
+ │ ├── ollama.py # Ollama backend
136
+ │ └── bitnet.py # BitNet backend
137
+ ├── skills/
138
+ │ └── loader.py # Skill loader
139
+ ├── agent.py # Main Agent class
140
+ ├── agent_mode.py # Autonomous mode
141
+ ├── orchestrator.py # Multi-agent orchestration
142
+ ├── config.py # Configuration
143
+ └── cli.py # Command-line interface
144
+ ```
145
+
146
+ ## Tool Support Levels
147
+
148
+ AgentNova supports three levels of tool use:
149
+
150
+ 1. **Native** — Models with built-in function calling (qwen2.5, llama3.1+, mistral, granite, functiongemma)
151
+ 2. **ReAct** — Text-based tool use via reasoning prompts (qwen2.5-coder, qwen3)
152
+ 3. **None** — Pure reasoning without tools
153
+
154
+ Tool support is auto-detected by running `agentnova models --tool-support`. Results are cached in `~/.cache/agentnova/tool_support.json`.
155
+
156
+ ```bash
157
+ # Test and cache tool support for all models
158
+ agentnova models --tool-support
159
+
160
+ # Re-test (ignore cache)
161
+ agentnova models --tool-support --no-cache
162
+ ```
163
+
164
+ You can also force ReAct mode:
165
+
166
+ ```python
167
+ agent = Agent(model="qwen2.5:0.5b", force_react=True)
168
+ ```
169
+
170
+ ## Model Families
171
+
172
+ Configured model families with optimized prompts:
173
+
174
+ - **qwen2.5** — Native tool support, excellent performance
175
+ - **llama3.1/3.2/3.3** — Native tool support
176
+ - **mistral/mixtral** — Native tool support
177
+ - **gemma2/gemma3** — ReAct mode, special prompting
178
+ - **granite/granitemoe** — Native tool support
179
+ - **phi3** — Native tool support
180
+ - **deepseek** — Native with `<think/>` tag handling
181
+
182
+ ## Security Features
183
+
184
+ Built-in security for safe operation:
185
+
186
+ - **Command blocklist** — Blocks dangerous shell commands (rm, sudo, etc.)
187
+ - **Path validation** — Prevents access to sensitive directories
188
+ - **SSRF protection** — Blocks requests to local/internal URLs
189
+ - **Injection detection** — Detects shell injection patterns
190
+
191
+ ## Configuration
192
+
193
+ Environment variables:
194
+
195
+ ```bash
196
+ # Backend URLs
197
+ OLLAMA_BASE_URL=https://your-ollama-server.com # Default: http://localhost:11434
198
+ BITNET_BASE_URL=http://localhost:8765 # BitNet server URL
199
+ BITNET_TUNNEL=https://your-tunnel.com # Alternative BitNet URL
200
+ ACP_BASE_URL=http://localhost:8766 # ACP server URL
201
+
202
+ # Agent settings
203
+ AGENTNOVA_BACKEND=ollama # Default backend: ollama or bitnet
204
+ AGENTNOVA_MODEL=qwen2.5:0.5b # Default model
205
+ AGENTNOVA_MAX_STEPS=10 # Maximum reasoning steps
206
+ AGENTNOVA_DEBUG=false # Enable debug output
207
+ ```
208
+
209
+ Check current configuration:
210
+ ```bash
211
+ agentnova config
212
+ agentnova config --urls # Show only URLs
213
+ ```
214
+
215
+ ## LocalClaw Redirect
216
+
217
+ The `localclaw` command is provided for backward compatibility:
218
+
219
+ ```bash
220
+ # Both work identically
221
+ localclaw run "What is 2+2?"
222
+ agentnova run "What is 2+2?"
223
+ ```
224
+
225
+ ## Tests & Examples
226
+
227
+ AgentNova includes a suite of tests for validating agent capabilities:
228
+
229
+ ```bash
230
+ # Basic agent test (no tools)
231
+ python -m agentnova.examples.00_basic_agent
232
+
233
+ # Quick 5-question diagnostic
234
+ python -m agentnova.examples.01_quick_diagnostic
235
+
236
+ # Tool usage tests (calculator, shell, datetime)
237
+ python -m agentnova.examples.02_tool_test
238
+
239
+ # Logic and reasoning tests (BBH-style)
240
+ python -m agentnova.examples.03_reasoning_test
241
+
242
+ # GSM8K math benchmark (50 questions)
243
+ python -m agentnova.examples.04_gsm8k_benchmark
244
+ ```
245
+
246
+ ### Test Categories
247
+
248
+ | Test | Questions | Focus |
249
+ |------|-----------|-------|
250
+ | Quick Diagnostic | 5 | Calculator tool, multi-step reasoning |
251
+ | Tool Test | 10 | Calculator, shell, datetime tools |
252
+ | Reasoning Test | 13 | Logic, deduction, patterns, spatial |
253
+ | GSM8K Benchmark | 50 | Math word problems |
254
+
255
+ ### Benchmark Results (Quick Diagnostic)
256
+
257
+ | Model | Score | Time | Tool Support |
258
+ |-------|-------|------|-------------|
259
+ | functiongemma:270m | 5/5 (100%) | ~20s | native |
260
+ | granite4:350m | 5/5 (100%) | ~50s | native |
261
+ | qwen2.5:0.5b | 5/5 (100%) | 38s | native |
262
+ | qwen2.5-coder:0.5b | 5/5 (100%) | 93s | react |
263
+ | qwen3:0.6b | 5/5 (100%) | 70s | react |
264
+
265
+ All tested models achieve 100% on the Quick Diagnostic. Native models are ~2x faster than ReAct models due to direct API tool calling.
266
+
267
+ ## Development
268
+
269
+ ```bash
270
+ # Install dev dependencies
271
+ pip install -e ".[dev]"
272
+
273
+ # Run unit tests
274
+ pytest
275
+
276
+ # Format code
277
+ black agentnova
278
+ ruff check agentnova
279
+ ```
280
+
281
+ ## License
282
+
283
+ MIT License - See LICENSE file for details.
284
+
285
+ ## Author
286
+
287
+ **VTSTech** — [https://www.vts-tech.org](https://www.vts-tech.org)
288
+
289
+ ## Contributing
290
+
291
+ Contributions welcome! Please read the contributing guidelines first.
292
+
293
+ ## Acknowledgments
294
+
295
+ - Built for local inference with [Ollama](https://ollama.ai)
296
+ - Optimized for small, efficient models
297
+ - Inspired by ReAct and other agentic frameworks