Knowledge & Memory

What is Memory

Understand how AI agents remember past conversations to provide personalized and consistent interactions.

March 18, 2024
5 min read

Memory allows your AI agent to remember information from past conversations, providing more personalized and context-aware interactions over time.

How Memory Works

When memory is enabled, your agent:

  1. Extracts important information from conversations
  2. Stores these memories persistently
  3. Retrieves relevant memories in future conversations
  4. Uses this context to provide better responses

Unlike knowledge (which you upload), memories are learned automatically from conversations.

Memory vs Knowledge

AspectMemoryKnowledge
SourceLearned from conversationsUploaded documents
ContentUser preferences, past topics, contextReference material, data
UpdatesAutomaticManual upload
PurposePersonalizationInformation retrieval

What Gets Remembered

Your agent automatically extracts and remembers:

  • User preferences: "I prefer detailed explanations"
  • Personal context: "I work in marketing"
  • Past decisions: "We decided to use React for the frontend"
  • Important facts: "The project deadline is March 15th"
  • Conversation topics: Key subjects discussed

Enabling Memory

Memory is enabled by default for new agents. To manage this setting:

  1. Open your agent's configuration
  2. Navigate to the "Memory" tab
  3. Toggle "Enable Long-Term Memory" on/off

Memory Settings

Viewing Memories

To see what your agent remembers:

  1. Open agent configuration → Memory tab
  2. View the list of stored memories
  3. Each memory shows:
    • The extracted information
    • When it was learned
    • Source conversation

Managing Memories

Editing Memories

If a memory is incorrect:

  1. Find the memory in the list
  2. Click Edit
  3. Correct the information
  4. Save changes

Deleting Memories

To remove a memory:

  1. Find the memory in the list
  2. Click the trash icon
  3. Confirm deletion

[!TIP] Regularly review memories to ensure your agent has accurate information.

Clearing All Memories

To start fresh:

  1. Go to Memory tab
  2. Click "Clear All Memories"
  3. Confirm the action

[!WARNING] Clearing memories cannot be undone. The agent will lose all learned context.

How Memory Improves Responses

Without Memory

User: What framework should I use?
Agent: There are many options like React, Vue, Angular...

[New conversation]

User: Should I add TypeScript?
Agent: TypeScript is a good choice for many projects...
(No context from previous conversation)

With Memory

User: What framework should I use?
Agent: There are many options like React, Vue, Angular...

[New conversation]

User: Should I add TypeScript?
Agent: Since you chose React for your project, adding TypeScript
would be a great choice. It integrates well with React...
(Remembers previous decision)

Memory Best Practices

Regular Maintenance

  • Review monthly: Check that memories are accurate
  • Remove outdated info: Delete memories that are no longer relevant
  • Correct errors: Fix any misremembered information

Privacy Considerations

  • Avoid sensitive data: Don't share highly sensitive information
  • Clear when needed: Remove memories before changing agent purpose
  • Review shared agents: Check memories if sharing agent access

Optimal Usage

DoDon't
Let agent learn preferences naturallyOverload with personal information
Correct inaccurate memoriesIgnore incorrect memories
Clear memories for fresh startsKeep outdated information
Review before important conversationsAssume all memories are accurate

Memory and Workflows

When agents are used in workflows:

  • Shared threads: Memories can span the workflow
  • Isolated tasks: Each task starts fresh
  • Orchestrator: Manager may access worker memories

Configure context control in workflow tasks to manage how memory is used.

Troubleshooting

Agent not remembering

  • Verify memory is enabled
  • Check if the information was significant enough to extract
  • Try explicitly stating important information
  • Review if memory was accidentally deleted

Incorrect memories

  • Edit or delete the incorrect memory
  • Provide correct information in a new conversation
  • The agent will learn the updated information

Too many memories

  • Review and prune unnecessary memories
  • Delete outdated information
  • Focus on keeping essential context

Related Guides