In previous chapters, we described what agents are and how they work in modern distributed systems. As the agents work in a loop, they produce a large amount of data, where only parts of the data are useful. Given the ability of the agents to operate autonomously, a supervisor agent may decide that some of the data clearly improves the process, saves time, or is simply repetitive enough to become a system constant.
In this chapter, we will outline several terms that are commonly misused or misinterpreted in agentic systems. As we established in the “What makes a system agentic?” chapter, an agentic system commonly has a state that is one of the inputs of the system. It may evolve over time and effectively represent the state of the world of an agentic system.
There are several battle-tested approaches and layers, as well as several practices that are proven to be problematic. The majority of limitations come from either cost-saving (we cannot feed an infinite amount of data into each call’s system context) or quality (noisy or overly specific state steers the system towards poorer reasoning outcomes) requirements.
Forms of agent state
- Raw execution history
- Execution summary
- Structured data
- Event log
- Vector store
- Knowledge graph (and temporal knowledge graph)
- Hybrid
Layers of agent state
Fundamental layers of state:
- Short term
- Long term
Types of agent state
- Working state (control, intermediate, active memory reconstruction, and buffer states)
- Persistent state (episodic, semantic, procedural, parametric, programmatic, belief states)
- System state (configurations, schemas, token limits, system prompts)
The first two types are quite often used with the word “memory”. It doesn’t change the understanding or the implementation and is rather a personal preference. In any case, everyone understands that an agentic system records its steps both in-context and globally.
There’s no strict scientific classification as the area evolves every day. I’m sure new or hybrid approaches appear, but in the absolute majority of cases, the listed kinds will suffice.
State (memory) management
A naive approach to the state is to programmatically record it between or during execution.
Following the agentic system principles we defined, a system is truly autonomous if it can alter its world state. This way, the agent can respond to novelty and optimize its own execution pipeline without interruption.
This is commonly achieved by giving the supervisor (or worker agents) tools that record data on different layers.