Harness Agents
A local coding agent that remembers what it did and picks up where it left off. / Coding agent chạy trên máy, nhớ việc đã làm và tiếp tục đúng chỗ đã dừng.
ha is a coding agent written in Rust. It runs in your terminal against your project, calls a model provider (DeepSeek by default), reads and edits code through approval-gated tools, and keeps every conversation, tool result and learned fact in a local SQLite store, so a session can be resumed, inspected or continued later.
Language / Ngôn ngữ: English · Tiếng Việt
English
What it does
- Chat in the terminal. ha opens an interactive app (TUI, or plain line mode). ha exec "…" runs one prompt for scripts and CI, with text, json or stream-json output.
- Works on your code with guarded tools. Read, search, glob, patch/edit/write files, run processes and shell commands, inspect Git, ask you a question, delegate to a sub-agent. Every action goes through the host policy: y runs once, a allows the rest of the turn, n refuses; /permissions picks ask, auto-edit or full-auto from a menu (full-auto asks for nothing; deny rules still apply).
- Reads the web. websearch (Google via Serper with SERPERAPIKEY, DuckDuckGo without a key) and webfetch (a page as readable text with its links) support research workflows. Local and private addresses are refused.
- Runs a persistent Python REPL. The ipython tool is prime-agent's kernel: variables persist across cells and turns, bash('cmd') starts commands in the background and returns a handle, and await rlm.spawn(...) / rlm.collect(...) run explorer children in parallel. prime-agent's Python skills come pre-imported (edit, websearch, attachimage, goal, compact, refine, …). With uv installed the kernel gets its own venv with prime-agent's default packages; otherwise it runs on Python 3.11+ from the system. Git Bash is needed on Windows for bash(). Each cell asks for approval like runshell unless the mode is full-auto.
- Works toward a goal. /goal <objective keeps the app working across turns until the model calls goalcomplete (at most 10 automatic turns, then it pauses). /goal status|pause|resume|clear; Ctrl-C pauses it, and /resume brings it back paused. Long turns shorten their oldest tool results to stay within the context budget.
- Resumes conversations. /resume lists your conversations (one row each) and replays the chosen one's questions and answers to the model and on screen.
- Keeps its own memory. As in prime-agent, the model keeps memories, prompt notes, skills and subagent specs through rlm.harness in the Python REPL - global or per conversation - and each turn carries a digest of them ranked for the task. Nothing is stored by keyword or extracted behind your back.
- Uses skills. Agent Skills directories (SKILL.md plus references and scripts) from the bundled set, ~/.agents/skills, a trusted project's .agents/skills, or any folder in HASKILLPATHS (e.g. ~/.claude/skills). The model activates a matching skill by name and reads its files with readskillfile; /skills lists them, /skill:<name runs one.
- Extends. MCP servers (/mcp add in chat, or ha mcp add), prompt templates, hooks, and a local web surface (ha web).
Platform status
| Platform | Status | | --- | --- | | Windows 10/11 x64 | Supported; all CI gates run here | | Linux | Pending support. It builds and its CI job runs for visibility, but it is not a supported platform yet and does not block CI | | macOS | Not tested |
Quick start (Windows, PowerShell 7)
Prerequisites: Rust (the toolchain in rust-toolchain.toml is installed automatically), Git, and PowerShell 7 (pwsh).
git clone https://github.com/DEVfancybear/harness-agents.git
cd harness-agents
pwsh -NoProfile -File scripts/Install-Ha.ps1 # release build, installed to %USERPROFILE%\.cargo\bin
ha --version
ha # open the app, then /login to pick a providerUpdating: pull, then run scripts/Install-Ha.ps1 again. Building with cargo build --release alone does not update the ha you type: that command runs the copy in .cargo\bin. If the app behaves like an older version, check which binary runs:
Get-Command ha -All | Select-Object SourceTo try the interface without a provider or a key: ha chat --fixture, or ha exec --mock "hello" --output-format json.
Building a release package (checksums, manifest) is described in docs/BUILDANDRELEASE.md.