Navigating AI Buzzwords
With developments in AI happening so quickly, it can be difficult to keep up sometimes. Every month, a new trendy term comes in. Last month was “harness engineering,” and this month it seems to be “loop engineering.” I wanted to write this to better understand how AI agents work and how agent architectures are designed. Hopefully this can help whoever is reading this as well.
What's the difference between an LLM and an AI agent?
A large language model (LLM) is a system designed to understand and generate human language. At a high level, LLMs predict the next logical word in a sequence based on the context of a user's prompt. When using ChatGPT, a user asks a question, which sends that question to an LLM, and the LLM returns the response.
Meanwhile, an AI agent is an LLM inside a loop that can reason, take actions, observe intermediate results, and decide what to do next until a task is finished. To do this, agents have access to tools that allow the LLM to interact with information outside of its training data.
What are “tools” for AI agents?
Like I said in the previous paragraph, tools allow LLMs to interact with the outside world. One example of a tool could be searching the web.
If you ask a standalone LLM, “What's the weather in New York right now?”, it will respond that it doesn't have access to current weather data. But if the LLM operates as an agent with access to the web search tool, the LLM can reason that it needs external information, call the web search tool, retrieve the current weather for New York, and formulate a response.
One thing to remember is tools are not intelligence. The LLM reasons and decides which tools to use. These tools can be provided by model developers (like OpenAI and Anthropic) or built by application developers who are creating agentic systems.
What is memory in AI agents?
Memory allows an agent to retain and use information across interactions and tasks. Without memory, an agent is just a stateless chatbot that only sees the current input.
There are two broad categories of memory for AI agents: short-term (working) memory and long-term memory.
Short-term (working) memory can be thought of as the AI system's RAM. It holds the information needed for the current task. This memory is primarily bounded by the model's context window, which is the maximum amount of information the model can process at once. Context windows are measured in tokens (chunks of text), and when that window is exceeded, older information is pushed out for new information. Some agent systems also use caches that store information actively being used while solving a task.
Long-term memory persists across different tasks, days, and user sessions. This allows agents to develop knowledge and adapt their behavior. There are three types of long-term memory: episodic, semantic, and procedural. I really like this Reddit post that explains that memory.
- Episodic memory
- Stores past events, user interactions, successful outcomes, and past mistakes.
- Semantic memory
- Stores factual knowledge and information about the world, often implemented using RAG and vector databases for storage and retrieval.
- Procedural memory
- Stores learned workflows from failures, enabling the agent to improve how it performs tasks.
What is a harness?
A harness is the infrastructure that wraps around an LLM to turn it into a functioning AI agent. A good mental model is:
Agent = LLM + HarnessThe harness provides capabilities that the LLM does not have on its own, such as access to tools, memory management, and feedback loops.
At its core, an AI agent is an LLM wrapped in systems that give it additional capabilities. Tools let agents interact with the real world, memory lets agents retain information and learn across tasks, and harnesses provide the infrastructure that ties everything together.
While AI technology develops quickly, most innovations are variations or improvements on these same foundational building blocks.