Agent State
Also known as: State Management, Agent Context
Definition
The information an agent maintains and updates during execution to track progress, store intermediate results, and inform decisions. State includes: current goal, completed steps, pending actions, accumulated observations, and any working data. State management determines how information flows between iterations of the agent loop.
What this is NOT
- Not the same as memory (state is active/working; memory is long-term storage)
- Not the model's internal state (we mean application-level state)
- Not the full conversation history (state is typically structured, not raw text)
Alternative Interpretations
Different communities use this term differently:
llm-practitioners
The data structure passed between nodes in an agent graph or between iterations of an agent loop. Frameworks like LangGraph make state explicit with typed state schemas that are read and updated by each step.
Sources: LangGraph state documentation, Temporal workflow state patterns
software-engineering
The stored information that affects a system's behavior. Stateful systems remember past interactions; stateless systems treat each request independently.
Sources: General software architecture literature
Examples
- LangGraph state object tracking: current_step, gathered_information, pending_tools
- A research agent's state: query, sources_found, notes, draft_answer
- A coding agent's state: task_description, files_modified, test_results, errors
Counterexamples
Things that might seem like Agent State but are not:
- The model's internal hidden states (those are not accessible)
- Training data (that's static, not execution state)
- System prompt (that's configuration, not dynamic state)
Relations
- overlapsWith agent-memory (Memory is long-term state; state is working/session state)
- requires agent-loop (State is passed between loop iterations)
- overlapsWith context-window (State may be serialized into the context)
Implementations
Tools and frameworks that implement this concept:
- LangGraph primary
- Letta (MemGPT) primary