Lightweight long-running harness for coding agents
Project description
agent-harness
Long-running harness for coding agents. Turn any repo into an auto-iterating, multi-agent workspace.
Features
- Multi-agent orchestration – Run multiple agents in parallel with isolated git worktrees
- AI-powered planning – Automatically break down goals into atomic tasks
- Scope-based coordination – Assign agents to different parts of the codebase to prevent conflicts
- Dependency management – Tasks are executed in correct order based on dependencies
- Automatic git integration – Agents commit to separate branches, merged back to main
Installation
pip install agent-harness
Requires Python 3.10+.
Quickstart
cd your-project
agent-harness init # Interactive setup: define goal, agents, scopes
agent-harness run # Execute tasks with configured agents
agent-harness status # View task progress
How It Works
-
agent-harness init– Interactive setup that:- Asks for your goal
- Configures number of parallel agents
- Defines scope for each agent (e.g., "backend API", "frontend UI")
- Uses AI to analyze codebase and generate a task plan
- Saves config to
agent_harness.yamland tasks tofeature_list.json
-
agent-harness run– Orchestrator loop that:- Creates git worktrees for each agent
- Assigns runnable tasks (dependencies met) to agents
- Runs agents in parallel in isolated worktrees
- Commits and merges changes back to main
- Handles merge conflicts gracefully
-
agent-harness status– Shows task progress grouped by agent
Configuration
agent_harness.yaml:
features_file: feature_list.json
progress_file: agent-progress.md
init_cmd: bash init.sh
provider: codex # or "claude"
num_agents: 2
goal: "Build a REST API with user authentication"
agents:
- id: 1
scope: "Backend API and database"
- id: 2
scope: "Authentication and middleware"
feature_list.json:
{
"tasks": [
{
"id": "task_001",
"title": "Set up project skeleton",
"description": "Create basic project structure",
"status": "todo",
"assigned_agent": 1,
"dependencies": [],
"files_touched": ["src/main.py", "requirements.txt"],
"verification": "python src/main.py runs without error",
"notes": ""
}
]
}
Providers
All providers run in YOLO mode (autonomous, no permission prompts) for seamless agent execution:
| Provider | Planner Model | Executor Model | YOLO Mode |
|---|---|---|---|
| codex | gpt-5 (high reasoning) | gpt-5-codex-max (xhigh reasoning) | approval_policy=never, sandbox_mode=danger-full-access |
| claude | claude-opus-4-5 | claude-opus-4-5 | --dangerously-skip-permissions |
| gemini | gemini-3-pro-preview | gemini-3-pro-preview | --yolo |
Codex Configuration
# Planner (gpt-5 with high reasoning)
codex exec "<prompt>" \
--model gpt-5 \
-c model_reasoning_effort="high" \
-c approval_policy="never" \
-c sandbox_mode="danger-full-access"
# Executor (gpt-5-codex-max with xhigh reasoning)
codex exec "<prompt>" \
--model gpt-5-codex-max \
-c model_reasoning_effort="xhigh" \
-c approval_policy="never" \
-c sandbox_mode="danger-full-access"
Claude Configuration
claude --dangerously-skip-permissions --model claude-opus-4-5 -p "<prompt>"
First-time setup: Run claude --dangerously-skip-permissions interactively once and accept the warning.
Gemini Configuration
gemini --yolo -m gemini-3-pro-preview -p "<prompt>"
Toggle in interactive mode: Press Ctrl+Y to enable/disable YOLO mode.
Set provider via --provider flag on init or in config.
Architecture
agent_harness/
├── cli.py # CLI commands (init, run, status)
├── config.py # Configuration loading/saving
├── orchestrator.py # Multi-agent coordination
├── git_coord.py # Git worktree management
├── scaffold.py # File scaffolding
├── state.py # Task and progress I/O
└── agents/
├── base.py # BaseAgent abstract class
├── cli_agent.py # Agent using CLI tools
└── planner.py # AI planner for task generation
Multi-Agent Workflow
- Each agent gets its own git branch (
agent/1,agent/2, etc.) - Agents work in isolated worktrees under
.agent_worktrees/ - Before each step, agents sync with main branch
- After completing a task, changes are merged back to main
- Merge conflicts are detected and tasks marked as blocked
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 coding_agent_harness-0.1.0.tar.gz.
File metadata
- Download URL: coding_agent_harness-0.1.0.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d442a3beaed7fc8d6bcbbcd0ec20fa2d5d29a2733a945040f07a33775d8f222
|
|
| MD5 |
0e890ab8c3ef2e8bb7d87b2bb0baf430
|
|
| BLAKE2b-256 |
1cf6ce79857805c027f36f1f48f29a9fb6915673b1e8119940dd6eeddb6e850a
|
File details
Details for the file coding_agent_harness-0.1.0-py3-none-any.whl.
File metadata
- Download URL: coding_agent_harness-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
256e85ad98ea1dc971ea4742f7fb8164d59e3938283a772e8a5b28fb0a8b78f4
|
|
| MD5 |
24abfb1c924abe25df75a83008adafdd
|
|
| BLAKE2b-256 |
6b354e6afe843ed7161b177ae92693c956d64515a1d7e63090baa36c8ab6e58a
|