An agent has a model, loop, tools and memory.
In 2024, most AI products were chatbots: a single LLM inference call, one prompt in, one completion out. In 2026, the default architecture is an AI agent: an agentic system that plans, calls tools, and iterates toward a goal across many steps.
Instead of returning the first model response, teams wrap the LLM in an agent harness, expose tool calling (APIs, databases, code execution), and let the system work toward an objective. Frameworks such as LangChain, Agno, CrewAI, and the OpenAI Agents SDK exist to make it easier to build the harness.
This article decomposes an AI agent into its core components. We define each part of the AI harness and walk through one complete agent run.
The five components of an AI agent
Strip an agentic system down and you get five components. Four you assemble and the fifth is what they produce.
- Model. Selects the next action given goal and state.
- Harness. Runs the loop: reason, act, observe, repeat.
- Tools. How the agent interacts with external systems.
- Memory. How the agent persists and retrieves state.
- Trajectory. The record of one complete agent run.
The model
The language model is the only component that reasons, and the only one you can train or fine-tune. Conditioned on the goal and the observations so far, it chooses the next action. Most teams start on a frontier model API and some migrate to an open-weights model they host themselves or run through a third-party provider.
More on that trade-off in open-weights LLMs vs frontier APIs.
The harness
The harness assembles what the model sees, reads the action it picks, calls the matching tool, and feeds the result back in. It also decides everything the model does not: which tools exist and how they are described, what stays in the context window, what happens when a tool call fails or comes back malformed, and when to stop, whether that is the goal being met, a step limit, or an error.
This is what agent frameworks give you. It is the part of an agent you can change immediately.
Tools and tool calling
Tools are how the agent reaches outside the model: query a database, call an HTTP API, run code, send an email. OpenAI shipped function calling in June 2023, letting the model emit a structured request to invoke a function instead of prose. Anthropic open-sourced the Model Context Protocol (MCP) in November 2024 to standardise how agents connect to those tools, and now everything is an MCP server.
Memory and context
Memory is how the agent carries state across loop iterations. Short-term memory is the context window: the running transcript of the goal, prior steps, and tool outputs. Longer-term memory is retrieval, pulling documents or past runs from outside the window (often via RAG or a vector store). Without memory, the agent loses its way.
The trajectory
The trajectory, also called the agent trace, is the full ordered record of a single run: the goal, every LLM call, every tool invocation, every observation, and the final outcome. It is the agent's stack trace. You do not build it; the other four components produce it. It is also the only unit of analysis at which you can honestly say whether the agent succeeded. Capture it.
One agent run, start to finish
Watch a support agent handle a refund. The user goal enters, the agentic loop runs, an outcome exits.
- The user goal arrives: refund this customer.
- The model calls get_order(id); the tool returns the order details.
- The model checks the order against the refund policy.
- The model calls issue_refund(amount); the tool returns a confirmation.
- The model reports back: refund done.
Four model calls, two tool calls, one outcome. That entire sequence is the agent trajectory. Change the goal, the tool responses, or the model's sampling behaviour and the next run takes a different path. Agents are non-deterministic: the same prompt does not guarantee the same execution path.
Defining your AI stack
Each layer of a typical AI stack controls an aspect of the agent. Almost none control the whole run.
- LLM gateway. Observes one request/response at a time. Cannot update the model.
- Agent observability. Sees the full trace, after the fact. Cannot update the model.
- Agent evals. Produce a score for the run. Cannot update the model.
- Closed training loop. Judged trajectories fed back into training. The only layer that can update the model.
Improving your agent
Improving an AI agent means operating at the level of the trajectory, not the individual LLM call: capture the full run, judge it against your definition of success, and feed judged trajectories back into the system. There are two distinct ways to improve an agent. You can improve the harness: rewrite prompts, tighten tool definitions, and so on. Or you can improve the model itself, retraining it on the failure modes in the traces.
This is the loop Overmind is built to close.
Overmind is the model training platform for AI teams. It turns your production traces into specialised models you own. Get started.




