Context management drives your agent’s behavior. What the agent knows at any moment determines how it responds—so understanding how context works helps you design more effective agents.
Global context
Some information is always available to your agent, no matter what it’s doing. Whether responding to a chat message, processing an incoming email, or waking up for a scheduled task, the agent has access to:
- Instructions — The agent’s mission, guidelines, and core knowledge
- Agent documents — Files, databases, and reference materials (depending on visibility settings—by default the agent knows which documents it has and can read them when needed)
These are included by default and are often sufficient for most use cases. If you need more, you can enable the Memory capability to give your agent a dedicated store for facts and preferences—see The Memory capability below.
Local context
Each interaction has its own isolated context that the agent sees alongside the global context:
- Chat conversations — When you’re in a chat, the agent knows all previous messages in that conversation. But it doesn’t know about other chats—each conversation is independent.
- Triggers — When responding to an email, scheduled task, or webhook, the agent sees the trigger details (email content, task instructions, etc.) but not any chat conversations.
The platform optimizes what context to include for each trigger type. For example, when triggered by a Slack message, the agent receives the 5 previous messages in that channel for context. If needed, the agent can actively search for more information.
What is memory?
Memory is the ability to remember information across different contexts. For example, the agent might remember which company you work for, your communication preferences, or decisions made in previous conversations.
Instructions and documents work as memory
Since agents can read and write their own instructions and documents, these already serve as memory. The agent can store facts, preferences, and accumulated knowledge—and access it in any future context.
You can guide this behavior in your agent’s instructions:
- “Create a database to store personal preferences for everyone on my team. Whenever someone expresses a preference, store it. When communicating with someone, check their preferences first.”
- “Keep a running log of all decisions we make in our conversations”
- “When you learn something important about a client, add it to the client notes document”
Your agent can also read its own diary—a log of its activities across all contexts. The agent won’t read its diary automatically, but will access it when asked or when it determines that reviewing past activities would help with the current task.
The Memory capability
The Memory capability is a convenience feature that gives your agent a dedicated memory store with semantic search. You don’t strictly need it—you could create an agent database instead—but this capability saves you from having to explain that to the agent.
To view and manage memories, go to the Memory capability card and click View memories. You can search semantically, add new memories, or remove existing ones.
How the Memory capability works
When your agent saves a memory, the content is converted into a vector embedding and stored. This enables semantic search—finding memories by meaning, not exact text match.
For example, if your agent stored “The client prefers email over phone calls”, it can find this memory when you ask “How should I contact this client?” even though the words don’t match exactly.
| Feature | Description |
|---|
| Semantic search | Finds memories by meaning using vector similarity |
| Namespaces | Optionally organize memories into categories (e.g., “research”, “preferences”) |
| Time filtering | Search within memories from the last N days |
| Agent-scoped | Each agent has its own isolated memory store |
Memories are not automatically recalled—the agent must actively query for relevant memories when needed. For information the agent should always be aware of, put it in the instructions instead.
When to use what
| Approach | Best for |
|---|
| Instructions | Core knowledge the agent needs in every interaction |
| Documents | Reference materials, templates, detailed procedures |
| Agent databases | Structured records (invoices, contacts, logs) |
| Memories | Accumulated facts and preferences to recall when relevant |
Example use cases
- “Remember that our fiscal year starts in April”
- “Store this client’s communication preferences”
- “What do you know about Project X?” (recalls stored memories)
- “Keep track of decisions made in our meetings”
Deduplication with semantic search
A powerful use of the Memory capability is avoiding duplicates when processing recurring information. For example:
“Search for news about renewable energy every morning at 9am. Send me a summary of the 3 most important news items. Use the memory capability to avoid duplicates—remember news items you’ve sent me, and check for similar news in your memory to eliminate duplicates.”
With semantic search, the agent can distinguish between:
- Exact same news item → skip
- Same story, different wording → skip (semantic similarity catches this)
- Same topic, but with new developments → include
- Entirely different news item → include
This works because the agent compares meaning, not just text—so it recognizes when two articles are essentially the same story even if the headlines differ.
Semantic search is also available in agent documents and agent databases, so you could build similar deduplication using a database. The Memory capability is often faster and simpler to set up for cases like this.
Learn more