HarnessX is a harness foundry: forge any number of agent harnesses from reusable processors and bundles, pair each with any model, and evolve them through training.
Python
497
25 commits
updated Oct 10, 2026
|
Compose. Adapt. Evolve. |
Compose the Harness, define the Agent.
From zero-code to full customization — one core, X entry points.
Homepage • Overview • Architecture • Quick Start • Benchmarks • Roadmap • 中文文档
The harness — not just the model — determines agent performance. The same base model produces dramatically different results depending on how context is managed, how tools are orchestrated, how errors are recovered, and how evaluation signals feed back.
HarnessX is a harness foundry: forge any number of agent harnesses from reusable processors and bundles, pair each with any model, and evolve them through training — all without rewriting the agent.
Most frameworks solved model swapping. Behavior swapping remains expensive — switching from a coding agent to a research agent, adding memory or guardrails, means rewriting the agent.
HarnessX solves this with one clean separation:
agent = model.agentic(harness)
ModelConfig — provider routing, fallback, per-role model assignmentHarnessConfig — the full behavior pipeline (tools, memory, processors, trace, sandbox)The X in HarnessX stands for eXtensible Behavior Composition — compose, adapt, and evolve harnesses without rewriting the agent:
🧩 Compose — 9-dimension behavior pipeline; any behavior = Processor, combine with | operator.
⚙️ Adapt — Harness observes performance and auto-searches optimal harness configurations.
🚀 Evolve — every run produces reward-annotated trajectories that feed SFT / RL training.
→ See docs/architecture.md for the full 9-dimension behavior pipeline, processor hook points, and composition API.
One-click install (interactive — asks before installing uv, Node.js, and optional IM Gateway):
curl -sSf https://raw.githubusercontent.com/Darwin-Agent/HarnessX/main/scripts/install.sh | bash
Non-interactive — install everything without prompts:
curl -sSf https://raw.githubusercontent.com/Darwin-Agent/HarnessX/main/scripts/install.sh | bash -s -- --all
Both commands install uv, Python 3.12, harnessx, and (with Node.js available) the Harness Lab frontend.
After installation, reload your shell or run source ~/.bashrc (or ~/.zshrc on macOS).
uv python install 3.12
uv venv --python 3.12 .venv
source .venv/bin/activate
uv pip install -e .
# Build frontend (required for hx lab)
cd frontend && npm install && npm run build && cd ..
export ANTHROPIC_API_KEY=sk-...
hx "Research 2026 AI agent trends and write a structured report"
hx -p "Write a Python fizzbuzz" # non-interactive, print and exit
hx -c path/to/config.yaml # load a YAML config
hx --resume <run_id> # resume a previous session
hx lab # open the Lab UI at localhost:8000
Connect your agent to Feishu, Telegram, Slack, Discord, or DingTalk with a single service. The gateway ships with a built-in React console for managing channels, sessions, and workspaces.
hx-gateway start # start the gateway (configured in ~/.harnessx/gateway.yaml)
→ See gateway/README.md for setup, channel configuration, and architecture.
import asyncio
from harnessx import BaseTask, HarnessConfig
from harnessx.core.model_config import ModelConfig
from harnessx.providers.anthropic_provider import AnthropicProvider
async def main():
model = ModelConfig(main=AnthropicProvider("claude-sonnet-4-6"))
harness = model.agentic(HarnessConfig())
result = await harness.run(BaseTask(description="What is 2 + 2?"))
print(result.final_output)
asyncio.run(main())
HarnessX provides two evolution loops that systematically improve agent performance on any benchmark:
The two loops compose: evolve the harness first, then evolve the model on top. Below are results on the GAIA benchmark. See benchmarks/README.md for additional benchmarks and adapter details.
Starting from a default harness (R0, 33%), the meta-harness discovers better configurations round by round — reaching 47% by R3, a +14pp gain with zero model changes. → Reproduce: recipe/gaia_evolver/
The same approach scales to frontier models. Overall GAIA accuracy rises from 62% to 84% after evolution, with gains across all five domains. → Reproduce: recipe/gaia_evolver/
When the two loops run together, the gains compound: harness evolution lifts the baseline from 33.97% to 41.67%; model evolution pushes it further to 55.77% — a +64% relative improvement, all on a 9B model. → Reproduce: recipe/verl_harnessX/
HarnessX/
├── harnessx/ # 🧠 Core framework
│ ├── core/ # Harness, Builder, RunLoop, State, Events, Trajectory
│ ├── processors/ # 7 categories × multiple processors
│ │ ├── context/ # 📝 System prompt, history, user wrapper
│ │ ├── control/ # 🛡️ 13 safety & reliability processors
│ │ ├── evaluation/ # 📊 LLM judge, PRM, self-verify
│ │ ├── memory/ # 🧠 Extraction, retrieval, 5 strategies
│ │ ├── multi_model/ # 🔗 Model routing
│ │ ├── observability/ # 🔭 OTel, checkpoints, metrics
│ │ └── tools/ # 🔧 Skill loader, schema adapter, filters
│ ├── providers/ # 🔌 6 model backends + agentic mixin
│ ├── plugins/ # 🧩 Plugin base, discovery, builtins, dimensions
│ │ └── dimensions/
│ │ └── light_memory/ # 🧠 Light-Memory (self-developed)
│ ├── tools/ # ⚒️ Tool registry, builtins
│ ├── sandbox/ # 📦 Local, Docker, E2B
│ ├── tracing/ # 📡 Journal, OTel, null tracer
│ ├── rl/ # 🧬 RLConfigSpec, TaskBuilder
│ ├── bundles/ # 📦 Pre-composed capability bundles
│ ├── api/ # 🌐 FastAPI + SSE for Lab UI
│ └── cli.py # ⌨️ CLI entry point (hx)
├── benchmarks/ # 📊 4 integrated + 3 ongoing benchmarks
├── recipe/ # 🧪 slime (RL training recipe)
├── examples/ # 📖 coding / research / assistant / custom_processor
├── extensions/ # 🔌 Skills (docx, pdf, pptx, xlsx)
├── frontend/ # 🖥️ Lab UI (React + TypeScript + Tailwind)
└── tests/ # ✅ Unit, integration, E2E
For detailed design notes and motivation behind planned items, see ROADMAP.
| Phase | Focus | Status |
|---|---|---|
| 1 | Core: 9-dimension behavior pipeline, 13 processors, multi-provider, SFT/RL bridge, 4 benchmarks, Lab UI | |
| 2 | Meta-opt: Bayesian Optimization, Meta-Harness, auto config search | |
| 3 | Self-evolution: closed-loop training, HarnessHUB community marketplace | |
| 4 | Memory: multimodal backends, third-party integrations (VERL, SuperMemory, OpenVKing) |
harnessx/plugins/dimensions/light_memory/)recipe/slime/)HarnessConfig bundles (hx pull [email protected]; Lab UI panel; private registries)recipe/)HarnessX is fully open-source under the MIT License. Contributions are welcome for:
benchmarks/ patternrecipe/Please read CONTRIBUTING.md first.
@software{harnessx2026,
title = {HarnessX: A Composable, Self-Evolving Agent Harness Foundry},
author = {Darwin Agent Team},
year = {2026},
url = {https://github.com/Darwin-Agent/HarnessX},
license = {MIT},
}
176 followers · starred Jul 2026
3 followers · starred Jul 2026
1,439 followers · starred Jun 2026
56 followers · starred Jul 2026
HarnessX is a harness foundry: forge any number of agent harnesses from reusable processors and bundles, pair each with any model, and evolve them through training.
Python
497
25 commits
updated Oct 10, 2026
|
Compose. Adapt. Evolve. |
Compose the Harness, define the Agent.
From zero-code to full customization — one core, X entry points.
Homepage • Overview • Architecture • Quick Start • Benchmarks • Roadmap • 中文文档
The harness — not just the model — determines agent performance. The same base model produces dramatically different results depending on how context is managed, how tools are orchestrated, how errors are recovered, and how evaluation signals feed back.
HarnessX is a harness foundry: forge any number of agent harnesses from reusable processors and bundles, pair each with any model, and evolve them through training — all without rewriting the agent.
Most frameworks solved model swapping. Behavior swapping remains expensive — switching from a coding agent to a research agent, adding memory or guardrails, means rewriting the agent.
HarnessX solves this with one clean separation:
agent = model.agentic(harness)
ModelConfig — provider routing, fallback, per-role model assignmentHarnessConfig — the full behavior pipeline (tools, memory, processors, trace, sandbox)The X in HarnessX stands for eXtensible Behavior Composition — compose, adapt, and evolve harnesses without rewriting the agent:
🧩 Compose — 9-dimension behavior pipeline; any behavior = Processor, combine with | operator.
⚙️ Adapt — Harness observes performance and auto-searches optimal harness configurations.
🚀 Evolve — every run produces reward-annotated trajectories that feed SFT / RL training.
→ See docs/architecture.md for the full 9-dimension behavior pipeline, processor hook points, and composition API.
One-click install (interactive — asks before installing uv, Node.js, and optional IM Gateway):
curl -sSf https://raw.githubusercontent.com/Darwin-Agent/HarnessX/main/scripts/install.sh | bash
Non-interactive — install everything without prompts:
curl -sSf https://raw.githubusercontent.com/Darwin-Agent/HarnessX/main/scripts/install.sh | bash -s -- --all
Both commands install uv, Python 3.12, harnessx, and (with Node.js available) the Harness Lab frontend.
After installation, reload your shell or run source ~/.bashrc (or ~/.zshrc on macOS).
uv python install 3.12
uv venv --python 3.12 .venv
source .venv/bin/activate
uv pip install -e .
# Build frontend (required for hx lab)
cd frontend && npm install && npm run build && cd ..
export ANTHROPIC_API_KEY=sk-...
hx "Research 2026 AI agent trends and write a structured report"
hx -p "Write a Python fizzbuzz" # non-interactive, print and exit
hx -c path/to/config.yaml # load a YAML config
hx --resume <run_id> # resume a previous session
hx lab # open the Lab UI at localhost:8000
Connect your agent to Feishu, Telegram, Slack, Discord, or DingTalk with a single service. The gateway ships with a built-in React console for managing channels, sessions, and workspaces.
hx-gateway start # start the gateway (configured in ~/.harnessx/gateway.yaml)
→ See gateway/README.md for setup, channel configuration, and architecture.
import asyncio
from harnessx import BaseTask, HarnessConfig
from harnessx.core.model_config import ModelConfig
from harnessx.providers.anthropic_provider import AnthropicProvider
async def main():
model = ModelConfig(main=AnthropicProvider("claude-sonnet-4-6"))
harness = model.agentic(HarnessConfig())
result = await harness.run(BaseTask(description="What is 2 + 2?"))
print(result.final_output)
asyncio.run(main())
HarnessX provides two evolution loops that systematically improve agent performance on any benchmark:
The two loops compose: evolve the harness first, then evolve the model on top. Below are results on the GAIA benchmark. See benchmarks/README.md for additional benchmarks and adapter details.
Starting from a default harness (R0, 33%), the meta-harness discovers better configurations round by round — reaching 47% by R3, a +14pp gain with zero model changes. → Reproduce: recipe/gaia_evolver/
The same approach scales to frontier models. Overall GAIA accuracy rises from 62% to 84% after evolution, with gains across all five domains. → Reproduce: recipe/gaia_evolver/
When the two loops run together, the gains compound: harness evolution lifts the baseline from 33.97% to 41.67%; model evolution pushes it further to 55.77% — a +64% relative improvement, all on a 9B model. → Reproduce: recipe/verl_harnessX/
HarnessX/
├── harnessx/ # 🧠 Core framework
│ ├── core/ # Harness, Builder, RunLoop, State, Events, Trajectory
│ ├── processors/ # 7 categories × multiple processors
│ │ ├── context/ # 📝 System prompt, history, user wrapper
│ │ ├── control/ # 🛡️ 13 safety & reliability processors
│ │ ├── evaluation/ # 📊 LLM judge, PRM, self-verify
│ │ ├── memory/ # 🧠 Extraction, retrieval, 5 strategies
│ │ ├── multi_model/ # 🔗 Model routing
│ │ ├── observability/ # 🔭 OTel, checkpoints, metrics
│ │ └── tools/ # 🔧 Skill loader, schema adapter, filters
│ ├── providers/ # 🔌 6 model backends + agentic mixin
│ ├── plugins/ # 🧩 Plugin base, discovery, builtins, dimensions
│ │ └── dimensions/
│ │ └── light_memory/ # 🧠 Light-Memory (self-developed)
│ ├── tools/ # ⚒️ Tool registry, builtins
│ ├── sandbox/ # 📦 Local, Docker, E2B
│ ├── tracing/ # 📡 Journal, OTel, null tracer
│ ├── rl/ # 🧬 RLConfigSpec, TaskBuilder
│ ├── bundles/ # 📦 Pre-composed capability bundles
│ ├── api/ # 🌐 FastAPI + SSE for Lab UI
│ └── cli.py # ⌨️ CLI entry point (hx)
├── benchmarks/ # 📊 4 integrated + 3 ongoing benchmarks
├── recipe/ # 🧪 slime (RL training recipe)
├── examples/ # 📖 coding / research / assistant / custom_processor
├── extensions/ # 🔌 Skills (docx, pdf, pptx, xlsx)
├── frontend/ # 🖥️ Lab UI (React + TypeScript + Tailwind)
└── tests/ # ✅ Unit, integration, E2E
For detailed design notes and motivation behind planned items, see ROADMAP.
| Phase | Focus | Status |
|---|---|---|
| 1 | Core: 9-dimension behavior pipeline, 13 processors, multi-provider, SFT/RL bridge, 4 benchmarks, Lab UI | |
| 2 | Meta-opt: Bayesian Optimization, Meta-Harness, auto config search | |
| 3 | Self-evolution: closed-loop training, HarnessHUB community marketplace | |
| 4 | Memory: multimodal backends, third-party integrations (VERL, SuperMemory, OpenVKing) |
harnessx/plugins/dimensions/light_memory/)recipe/slime/)HarnessConfig bundles (hx pull [email protected]; Lab UI panel; private registries)recipe/)HarnessX is fully open-source under the MIT License. Contributions are welcome for:
benchmarks/ patternrecipe/Please read CONTRIBUTING.md first.
@software{harnessx2026,
title = {HarnessX: A Composable, Self-Evolving Agent Harness Foundry},
author = {Darwin Agent Team},
year = {2026},
url = {https://github.com/Darwin-Agent/HarnessX},
license = {MIT},
}
176 followers · starred Jul 2026
3 followers · starred Jul 2026
1,439 followers · starred Jun 2026
56 followers · starred Jul 2026