How Agents Think and Act
Context and Memory
An agent is only as good as the information it has access to. Understanding how agents manage context and memory helps you work with them more effectively.
Two Types of Context
1. Conversation Context (Short-term)
Everything said in the current conversation:
- Your initial request
- Any clarifications you've provided
- Actions the agent has taken
- Results from tool calls
Limitation: This context has a maximum size. Very long conversations may cause the agent to "forget" earlier details.
2. External Context (Retrieved)
Information the agent fetches during the task:
- Documents from your knowledge base
- Database query results
- Web search findings
- File contents
Key insight: Agents don't "know" everything. They actively retrieve what they need.
Memory Systems
Advanced agents use different memory types:
Working Memory
The active information being processed right now. Like what you hold in your head while solving a problem.
Episodic Memory
Records of past interactions. "Last time the user asked about travel, they preferred business class."
Semantic Memory
Learned facts and relationships. "The company's fiscal year ends in March."
Why Memory Matters for Business
Personalization: An agent with memory can:
- Remember your preferences
- Build on previous conversations
- Avoid asking the same questions repeatedly
Continuity: Projects spanning multiple sessions stay coherent.
Learning: The agent improves its responses based on what worked before.
Current Limitations
Be aware of these common constraints:
-
Context windows — Even the best models have limits. GPT-4 and Claude can handle large contexts, but very long documents may need to be processed in chunks.
-
Memory persistence — Not all agents save memories between sessions. Ask about this capability when evaluating tools.
-
Information freshness — Agents may have knowledge cutoff dates. For current information, they need to search the web or access live databases.
Practical Tip
When starting a new task with an agent, provide relevant context upfront:
- "Based on our previous discussion about..."
- "Using the data from our Q3 report..."
- "Following the same format as last time..."
This primes the agent's working memory with the right information.
:::