Architecture
April 30, 2026 · View on GitHub
HarnessX organizes agent behavior into 9 orthogonal behavioral dimensions, mapped to the three pillars:
🧩 Compose = Model · Context · Memory · Tools · Sandbox ⚙️ Adapt = Evaluate · Control 🚀 Evolve = Observe · Train
| Slot | Dimension | What It Controls |
|---|---|---|
| Model Selection | Multi-provider routing + role assignment (main / judge / evaluator) — ModelConfig, separate from HarnessConfig | |
| Context Assembly | System prompt strategy + history truncation + user message wrapping — processors/context/ | |
| Memory Management | Extract → Store → Retrieve with 5 pluggable strategies incl. Light-Memory — processors/memory/ | |
| Tool Ecosystem | Built-in tools + MCP protocol + Skills + filtering — processors/tools/ + tools/ | |
| Execution Environment | Sandbox isolation: Local / Docker / E2B cloud — sandbox/ | |
| Evaluation & Reward | LLM Judge / SelfVerify / PRM / Benchmark evaluators — processors/evaluation/ | |
| Control & Safety | 13 processors: loop detection, cost guard, compaction, sycophancy check — processors/control/ | |
| Observability | HarnessJournal (JSONL) + OpenTelemetry + checkpoints + session recovery — processors/observability/ | |
| Training Bridge | Trajectory → SFT / RL records with token-level annotations — rl/ |
Event-Driven Processor Pipeline
All behavior is implemented as Processors at 8 hook points:
Compose with | and exhaustive conflict detection:
from harnessx.bundles.coding import make_coding
from harnessx.bundles.reliability import make_reliability
config = (make_coding(working_dir=".") | make_reliability()).build()
# HarnessConflictError if any singleton_group collides — no silent overwrites