What is an AI harness?
Large language models predict text. They do not, on their own, plan a task, call tools, remember what happened, retry when something fails, or know when to stop. The harness is everything around the model that makes those things happen. A useful shorthand:
Agent = Model + Harness
The model is the reasoning. The harness is the loop, the tools, the budgets — and, above all, the memory. This page explains what a harness does and where agent memory fits, because memory is the part most teams improvise and the part MemQL is built to be.
What is an AI harness?
An AI harness is the runtime scaffolding around a language model that turns a single model call into an agent that completes whole tasks. The model predicts text; the harness gives it a loop, tools, memory, budgets, retries, and stopping rules. A useful shorthand is Agent = Model + Harness: the model is the reasoning, the harness is everything that lets that reasoning act, persist, and be held to account.
What is the difference between the model and the harness?
The model (the LLM) takes a prompt and returns text — it is stateless and forgets everything between calls. The harness is the surrounding system: it plans the work, decides which tool to call, feeds the model the right context, stores what happened, retries failed steps, and stops when the task is done. Swap the model and the harness still works; remove the harness and you are back to one-shot prompting.
What does an AI harness actually do?
A harness runs a loop. It decomposes a goal into steps, routes each step to a tool or a model call, records an observation of what happened, and repeats — tick, route, converge — until the task is done or a budget is hit. Along the way it enforces stopping rules, retries steps that fail, and keeps a durable record so the run can be inspected, replayed, and graded. That record — the plan, its steps, and the observations — is state, and state needs somewhere to live.
Where does memory fit in an AI harness?
Memory is the pillar of the harness that makes an agent more than a stateless chatbot. It is two things: the agent's working state (the current plan and steps) and its long-term memory (what it has learned and done before). Without durable, queryable memory an agent cannot resume a task, avoid repeating mistakes, or explain what it did. Memory is where most agent harnesses are improvised — a vector store bolted next to a database next to a log file.
How does MemQL fit into an AI harness?
MemQL is the memory and state layer of the harness, as a database rather than glue code. The harness spine — plan, step, observation — is modeled as first-class, append-only, time-series data, so an agent's working state and its history are the same queryable substrate. recall() blends recency and relevance to surface the right memories; consolidation distills what happened into what is generally true; and because every run is recorded with provenance, it can be traced, replayed, and evaluated. You declare the behavior in one DSL and the engine handles persistence, time-awareness, retries, and isolation.
Is an AI harness the same as an agent framework like LangChain?
They overlap but solve different problems. Prompt/agent frameworks help you compose chains and tool calls in application code. A harness is the runtime that actually carries a task to completion — the loop, the budgets, the convergence. MemQL is neither a prompt framework nor a model; it is the memory and state layer a harness relies on, so the agent's plan, steps, and observations are durable, time-aware, and inspectable instead of living in process memory.
- Memory & the agent harness — how recall, consolidation, and the plan/step/observation loop work in MemQL.
- MemQL vs. vector memory — why a time-series graph differs from embed-and-retrieve.
- Agent-memory glossary — the terms, defined.