ML & AI engineering · Fabian Tax
What an agent harness adds
A harness turns a model call into a controlled loop: decide, use tools, observe and verify. A chat answer alone does not make an agent; the harness manages the work around the model.
The harness loop
From a goal to a verified result, with state and observation throughout.
- 01 · Goal and context
-
Give the agent a task, relevant instructions and evidence. Use context engineering and progressive disclosure to load detail when needed; keep retrieved material separate from trusted instructions.
Technologies and practices: retrieval pipeline · knowledge graphs · context engineering - 02 · Decide and plan
-
Choose a next step and, when useful, break work into smaller tasks. A plan is a proposal, not permission to act.
Technologies and practices: LLM inference · task decomposition · agent pipelines - 03 · Use tools
-
Call an authorised tool, validate its result and return it as data. Restrict permissions, sandbox risky actions and repeat the loop until the task is done or needs escalation.
Technologies and practices: MCP · CLI and API tools · sandboxing · structured tool contracts - Across the loop · Protect data
-
Detect and handle personally identifiable information before it reaches models, tools, memory or logs. Detection can miss data; redaction, access controls and retention rules are separate safeguards.
Technologies and practices: PII detection · redaction · access controls · retention - 04 · Coordinate and retain state
-
Track task status, dependencies and ownership across agents. Checkpoint progress so work can resume after an interruption without mistaking a planned action for a completed one.
Technologies and practices: multi-agent orchestration · task queues · checkpointing - 05 · Verify and learn
-
Check outcomes against explicit criteria, inspect the trajectory and tool calls—not just the final answer—and use failures to improve the process.
Technologies and practices: test and review gates · LLM-as-judge · trajectory embeddings · anomaly detection - Across all stages · Observe
-
Record enough telemetry to diagnose latency, failures and unsafe behaviour without treating a log as proof of correctness.
Technologies and practices: OpenTelemetry · Prometheus / OpenObserve
Memory, compaction and routing
Patterns and research directions as of November 2026. These are not all claims about features deployed in my own harness.
- Context compaction
- Summarise older turns so a long task can continue. Preserve goals, constraints, decisions and unresolved work; test what the summary loses.
- Persistent agent memory
- Store useful notes and searchable experience outside the context window, with provenance and freshness checks. Memory across sessions is different from compaction within a task.
- Dreaming and sleep-time compute
- Use background runs between interactions to review transcripts, correct or consolidate memories and build navigable knowledge. This is an emerging technique, not model sleep or automatic weight training; it costs compute and can introduce errors.
- Model routing and cost budgets
- Choose models and execution paths by task, latency, quality and cost. Measure outcomes instead of assuming a larger model always wins.