Skip to main content
Memory gives agents continuity. Without memory, every message starts a fresh context. With memory enabled, an agent maintains context across a conversation and, with Lyzr Cognis, across separate sessions entirely.

Enabling memory on an agent

Memory is enabled per agent from the Features section in the Agent Builder, not from a global setting.
  1. Open the agent in the Agent Builder.
  2. Scroll to the Features section at the bottom of the Build tab.
  3. Select the Memory card. It has a dashed border when enabled.
  4. Select the settings icon on the Memory card to open the Configure Memory panel.
  5. Choose a provider: Lyzr Cognis, Lyzr Memory, or Amazon Bedrock AgentCore Memory.
  6. If using Amazon Bedrock, enter your AWS credentials and resource details.
  7. Optionally add Extraction Instructions (see below).
  8. Select Update to save.
Screenshot of the Agent Builder Features section showing Memory, Data Query, and Responsible AI feature cards, with Memory selected and highlighted with a dashed border.

Extraction instructions

Extraction instructions tell the memory system what to pay attention to and store from each conversation. Without instructions, Cognis extracts memories automatically based on what it determines is significant. With instructions, you can tune what gets remembered for your specific use case. Examples:
  • “Remember the user’s name, role, and preferred communication style.”
  • “Store any product names, pricing, or deal stages the user mentions.”
  • “Track action items and decisions the user commits to.”
More specific extraction instructions improve recall precision, particularly for domain-specific agents where generic memory extraction may surface irrelevant context.

Memory providers

Lyzr Cognis (default)

Lyzr Cognis is the default memory provider for all agents in Lyzr Studio. It is designed for production workloads where cross-session context and temporal accuracy matter. Key capabilities:
  • Cross-session persistence: Cognis remembers users across separate sessions. If a user returns days or weeks later, the agent retains knowledge of previous interactions, preferences, and outcomes.
  • Temporal awareness: Cognis understands the timing and sequence of interactions, so references like “last week” resolve correctly relative to the conversation history.
  • Matryoshka embeddings: An embedding technique that optimizes both search accuracy and storage efficiency across retrieval tasks.
Benchmark results: 92.4% accuracy on LongMemEval (500 multi-session reasoning questions), highest F1 on LoCoMo in single-hop, multi-hop, temporal, and open-domain recall.

Lyzr Memory

Standard built-in memory for simpler single-session use cases. Lower overhead than Cognis, suitable for agents that do not need long-term user context.

Amazon Bedrock AgentCore Memory

For organizations that require data sovereignty, this option stores all memory data within your own AWS account. Requires valid AWS credentials (access key and secret key), an existing Bedrock AgentCore Memory resource, and IAM permissions for that resource.

Memory vs. Knowledge Base

MemoryKnowledge Base
What it storesConversation history and user profileDocuments, websites, structured data
Updated byConversations automaticallyManual upload or scheduled sync
Retrieved bySession ID or user IDSemantic search query
Use casePersonalizing responses, maintaining continuityGrounding answers in source material

How memory works at runtime

  1. The user sends a message. The agent looks up relevant memories by session ID or user ID.
  2. Relevant memories are injected into the agent’s context window alongside the current conversation and any Knowledge Base results.
  3. The agent generates a response.
  4. Cognis automatically stores and updates memories from the new interaction. Older memories are summarized; the most relevant are surfaced first.

Cognis as a standalone service

Cognis is also available as a standalone API you can add to any agent framework outside Lyzr Studio. Access it via REST API (add, search, update, and delete memories programmatically) or via MCP Server (plug Cognis into Cursor, Claude Desktop, Zed, or any MCP-compatible host). See Cognis in Lyzr Blocks for API endpoints, MCP setup, memory types, and advanced configuration.