Terminal agent framework with pluggable tools and TUI.
Project description
Harzoo
Harzoo is a simple, flexible, powerful Python AI agent framework.
Just 1300 lines of code.
It is a universal world‑task architecture: s₀ → [LLM + tools] → s₁ → [LLM + tools] → s₂ → …
Documentation
www.harzoo.com
Repository Layout
| Path | Purpose |
|---|---|
src/ |
code |
docs/ |
Documentation, official config files |
assets/ |
Official config files |
other |
Project management |
Quick Start
-
Install
pip install harzoo
-
Run
Opens the terminal UI. On first run, Harzoo creates a config folder:
harzoo
-
Configure
Edit files under:
~/.harzoo/config/
- Copy files from
assets/config/into the folder above, and update API settings (api_key,base_url,model_name) in your profile. - Update
config.json— setstartup_profileto your profile file.
- Copy files from
-
Restart
Quit Harzoo and run again to load your changes:
harzoo
Python Examples
High-level
from harzoo import start
from harzoo.agent.kernel.message import user_message
config_dir = "~/.harzoo/config"
queue_in, queue_out = start(config_dir)
user_message = user_message([{"type": "text", "text": "Hello"}])
queue_in.put(user_message)
print(queue_out.get())
Low-level
from harzoo import Agent
from harzoo.agent.components.paths import prepare_config_paths
from harzoo.agent.kernel.message import assistant_message, tool_message, user_message
from harzoo.agent.kernel.tool import Context
paths = prepare_config_paths("~/.harzoo/config")
agent = Agent.from_profile(paths.startup_profile_path, paths)
state = []
user_message = user_message([{"type": "text", "text": "Hello"}])
state.append(user_message)
while state and state[-1].get("role") in ("user", "tool"):
ctx = Context(state=state, agent=agent, config_paths=paths)
content, tool_calls, _ = agent.decide(state)
state.append(assistant_message(content=content, tool_calls=tool_calls))
if tool_calls:
for tc in tool_calls:
fn = tc["function"]
result = agent.execute_tool_call(str(fn["name"]), str(fn["arguments"]), ctx)
tool_message = tool_message(str(tc["id"]), result)
state.append(tool_message)
print(state[-1])
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file harzoo-0.1.10.tar.gz.
File metadata
- Download URL: harzoo-0.1.10.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa715e0f5928e57c99a3556b0dd71d1d347a589b6bc8fe528a18d7112e1dc0d3
|
|
| MD5 |
25232a4984cef023f37d6c8fc771c7a2
|
|
| BLAKE2b-256 |
127424e3619e0b75d90476b7ae9e61d7950797048d72c513d97cdd6e7911679f
|
File details
Details for the file harzoo-0.1.10-py3-none-any.whl.
File metadata
- Download URL: harzoo-0.1.10-py3-none-any.whl
- Upload date:
- Size: 32.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
998cb133e86f60a6a47bc1f154345e8f5e2dd97fd6156ed0d0e0a8713e9d212e
|
|
| MD5 |
5fa5dcff814a136b9ac0bfa90ff7edeb
|
|
| BLAKE2b-256 |
26e31548a017a0f993f3c0913c02c23818367a1d6779b8c37c80f57fd4e107d1
|