Cognitive Memory enables agents to remember context across conversations and sessions. Store operational knowledge, incident history, and domain expertise that can be recalled later using natural language queries.
Overview
Cognitive Memory provides a persistent memory system for storing and recalling context:- Store Context: Save text content with metadata for later retrieval
- Recall Memories: Find relevant memories using natural language queries
- Relevance Scoring: Get memories ranked by relevance to your query
- Dataset Organization: Organize memories into logical datasets
- Async Operations: Non-blocking storage for large batches
Memories are stored in cognitive datasets and become searchable via semantic search and intelligent search features.
Quick Start
Core Concepts
Memory Storage
Memories are text-based context stored with:- Content: The actual text to remember
- Metadata: Optional structured data (tags, timestamps, etc.)
- Dataset: Logical grouping for organization
- Embeddings: Automatically generated for semantic search
Memory Recall
Recall uses semantic search to find relevant memories:- Query: Natural language question or keywords
- Relevance Scoring: Memories ranked by semantic similarity
- Filtering: Optional filtering by memory ID or metadata
Datasets
Memories are organized into datasets:- Scope: Organization, team, or user-level
- Permissions: Control who can read/write
- Lifecycle: Datasets can be created, listed, and deleted
Basic Usage
Store Memory (Blocking)
Example Response
Example Response
Store Memory (Async)
Use
store_memory_async() for large content or when you don’t need to wait for completion. The memory will be available for recall once processing completes.Recall Memories
Example Response
Example Response
Recall Specific Memory
Retrieve Memories
To retrieve memories, userecall_memory() with a query:
The SDK does not provide a
list_memories() method. Use recall_memory() with appropriate queries to retrieve memories.Practical Examples
1. Store Incident History
Build a searchable incident knowledge base:2. Recall Similar Incidents
Find similar historical incidents for current issues:3. Store Deployment Context
Remember successful deployments and rollback procedures:4. Build Team Knowledge Base
Create searchable team knowledge:5. Automated Memory Collection
Automatically store important events as memories:Error Handling
Best Practices
1. Use Descriptive Context
2. Add Rich Metadata
3. Organize with Datasets
4. Use Async for Large Batches
API Reference
Store Memory Methods
Recall Memory Methods
Memory Object Structure
Next Steps
Datasets
Manage cognitive datasets
Intelligent Search
AI-powered graph search
Semantic Search
Vector-based search
Context Graph
Complete graph operations