Architecture

April 30, 2026 · View on GitHub

HarnessX Architecture

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

SlotDimensionWhat It Controls
1Model SelectionMulti-provider routing + role assignment (main / judge / evaluator) — ModelConfig, separate from HarnessConfig
2Context AssemblySystem prompt strategy + history truncation + user message wrapping — processors/context/
3Memory ManagementExtract → Store → Retrieve with 5 pluggable strategies incl. Light-Memory — processors/memory/
4Tool EcosystemBuilt-in tools + MCP protocol + Skills + filtering — processors/tools/ + tools/
5Execution EnvironmentSandbox isolation: Local / Docker / E2B cloud — sandbox/
6Evaluation & RewardLLM Judge / SelfVerify / PRM / Benchmark evaluators — processors/evaluation/
7Control & Safety13 processors: loop detection, cost guard, compaction, sycophancy check — processors/control/
8ObservabilityHarnessJournal (JSONL) + OpenTelemetry + checkpoints + session recovery — processors/observability/
9Training BridgeTrajectory → SFT / RL records with token-level annotations — rl/

Event-Driven Processor Pipeline

All behavior is implemented as Processors at 8 hook points:

Event-Driven Processor Pipeline

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