Skip to main content
Cognitive memory enables your organization to store and recall contextual knowledge using AI-powered semantic search. Store runbooks, configurations, best practices, and any organizational knowledge in datasets, then retrieve relevant information using natural language queries.
For an overview of cognitive memory architecture and how agents use it, see the Cognitive Memory core concepts guide.

Quick Start

Output:
Output:
Output:

Datasets

Datasets are containers for organizing memories with different access scopes. Each memory must be stored in a dataset.

Dataset Scopes

  • user: Private to your user account
  • org: Shared across your entire organization
  • role: Accessible to specific roles (requires --allowed-roles)

Create Dataset

List Datasets

Output:

Get Dataset Details

Output:

Get Dataset Data

View all data entries in a dataset:

Purge Dataset Data

Clear all data from a dataset while preserving the dataset container, permissions, and metadata:
Output:
This is useful when you want to refresh dataset content without recreating the dataset or losing permissions.
Purge vs Delete: Use purge to clear data while keeping the dataset structure. Use delete to remove the entire dataset including permissions and metadata.

Delete Dataset

Deleting a dataset removes all associated memories. This action cannot be undone.

Upload Files to Dataset

Upload local files or entire directories to a dataset:
Output:
Supported Flags:
  • --title - Title for the uploaded content
  • --tags - Comma-separated tags for categorization
  • --metadata-json - Additional metadata as JSON string
  • --output - Output format (json, yaml)
Automatic Features:
  • Skips hidden files (starting with .)
  • Skips binary files (executables, images, archives)
  • Recursively processes directories
  • Adds file metadata (filename, path, size)

Code Ingestion

Ingest code repositories for semantic code search and analysis:
Output:
Default File Patterns:
  • Included: **/*.py, **/*.js, **/*.ts, **/*.tsx, **/*.jsx, **/*.go, **/*.java, **/*.rs, **/*.c, **/*.cpp, **/*.h
  • Excluded: **/__pycache__/**, **/node_modules/**, **/dist/**, **/build/**, **/.git/**, **/venv/**, **/target/**
Code Analysis Features:
  • Language detection by file extension
  • Dependency extraction (imports, requires)
  • Export detection (functions, classes)
  • Lines of code calculation
  • File deduplication via SHA256 hash
Flags:
  • --patterns - File patterns to include (comma-separated)
  • --exclude-patterns - Patterns to exclude (comma-separated)
  • --batch-size - Files per batch (1-100, default: 50)
  • --output - Output format (json, yaml)

Check Code Ingestion Status

Track the progress of code ingestion jobs:
Output:

Memory Operations

Store Memory

Store contextual knowledge with semantic embeddings for later retrieval.
Supported Flags:
  • --title (required) - Descriptive title for the memory
  • --content - Direct content input (or use --content-file)
  • --content-file - Read content from a file
  • --dataset-id (required) - Target dataset identifier
  • --tags - Comma-separated tags for categorization
  • --metadata-json - Additional structured metadata as JSON
  • --output - Output format (text, json, yaml)

Recall Memories

Search stored memories using natural language queries with semantic understanding.
Search Types:
  • GRAPH_COMPLETION (default) - Standard semantic search with graph context
  • TEMPORAL - Time-aware search emphasizing recent information
  • FEEDBACK - Search incorporating user feedback and interactions
  • RAG_COMPLETION - Retrieval-augmented generation for comprehensive answers
  • CHUNKS - Search at the chunk level for precise results
Query Tips:
  • Use natural language descriptions
  • Be specific: “production database failover” vs “database”
  • Combine with tags for precision
  • Adjust --min-score to filter by relevance (0.0-1.0)
  • Use --top-k to limit results (default: 10)
  • Choose appropriate search type based on your needs

List Memories

View all stored memories:
Output:

Check Job Status

Some memory operations are asynchronous. Check their status:
Output:

Output Formats

All memory commands support multiple output formats for different use cases:

Best Practices

Dataset Organization

Scope Strategy:
  • Use org scope for shared team knowledge (runbooks, documentation)
  • Use user scope for personal notes and drafts
  • Use role scope for sensitive information (credentials, SRE procedures)
Naming Conventions:
Tagging Taxonomy: Establish consistent tags across your organization:

Memory Storage

Craft Effective Titles:
Provide Rich Context:
Use Multiple Tags:
Structure Metadata:
Query Clarity:
Combine Filters:
Iterate on Queries:
  1. Start broad: "deployment"
  2. Add specificity: "kubernetes deployment"
  3. Add filters: --tags production
  4. Adjust threshold: --min-score 0.7

Use Cases

Runbook Storage

Store operational procedures and incident response playbooks:

Configuration Management

Centralize configuration documentation:

Knowledge Sharing

Build a team knowledge base:

Onboarding Documentation

Create searchable onboarding materials:

Integration with Agents

Cognitive memory enhances agent capabilities by providing contextual knowledge. Agents can automatically access organization-wide datasets to recall relevant information when executing tasks and store learnings for future use.
Learn more about how agents use cognitive memory in the Agent Integration guide.
Example Agent Usage:

Command Reference

memory store

Store new contextual memory with semantic embeddings. Syntax:
Required Flags:
  • --title - Memory title (descriptive and searchable)
  • --dataset-id - Target dataset identifier
  • --content OR --content-file - Memory content
Optional Flags:
  • --tags - Comma-separated tags for categorization
  • --metadata-json - Additional structured metadata as JSON
  • --output - Output format: text, json, yaml

memory recall

Search memories using semantic understanding. Syntax:
Arguments:
  • query - Natural language search query (positional or --query flag)
Optional Flags:
  • --tags - Filter results by tags (comma-separated)
  • --top-k - Number of results to return (default: 10)
  • --min-score - Minimum similarity score: 0.0-1.0 (default: 0.0)
  • --search-type - Search type: GRAPH_COMPLETION, TEMPORAL, FEEDBACK, RAG_COMPLETION, CHUNKS
  • --output - Output format: text, json, yaml

memory list

List all stored memories. Syntax:
Optional Flags:
  • --output - Output format: text, json, yaml, table

memory status

Check the status of an asynchronous memory processing job. Syntax:
Arguments:
  • job-id - Job identifier (returned from async operations)
Optional Flags:
  • --output - Output format: text, json, yaml

memory dataset create

Create a new dataset for organizing memories. Syntax:
Required Flags:
  • --name - Dataset name (descriptive and unique)
  • --scope - Access scope: user, org, or role
Optional Flags:
  • --description - Dataset description
  • --allowed-roles - Comma-separated roles (required if scope is role)
  • --output - Output format: text, json, yaml
Examples:

memory dataset list

List all accessible datasets. Syntax:
Optional Flags:
  • --output - Output format: text, json, yaml, table

memory dataset get

Get detailed information about a specific dataset. Syntax:
Arguments:
  • dataset-id - Dataset identifier
Optional Flags:
  • --output - Output format: text, json, yaml

memory dataset delete

Delete a dataset and all its associated memories. Syntax:
Arguments:
  • dataset-id - Dataset identifier
This action is irreversible. All memories in the dataset will be permanently deleted.

memory dataset purge

Clear all data from a dataset while preserving the dataset container. Syntax:
Arguments:
  • dataset-id - Dataset identifier
Optional Flags:
  • --output - Output format: text, json
Examples:

memory dataset get-data

Retrieve all data entries from a dataset. Syntax:
Arguments:
  • dataset-id - Dataset identifier
Optional Flags:
  • --output - Output format: text, json, yaml

memory dataset upload

Upload local files or directories to a dataset. Syntax:
Arguments:
  • dataset-id - Dataset identifier
  • file-or-dir - Path to file or directory to upload
Optional Flags:
  • --title - Title for the uploaded content
  • --tags - Comma-separated tags for categorization
  • --metadata-json - Additional metadata as JSON string
  • --output - Output format: text, json, yaml
Examples:

memory dataset code ingest

Ingest code repository into a dataset for semantic code search. Syntax:
Arguments:
  • dataset-id - Dataset identifier
  • path - Path to code repository or directory
Optional Flags:
  • --patterns - File patterns to include (comma-separated glob patterns)
  • --exclude-patterns - File patterns to exclude (comma-separated glob patterns)
  • --batch-size - Files per batch, 1-100 (default: 50)
  • --output - Output format: text, json, yaml
Examples:

memory dataset code status

Check the status of a code ingestion job. Syntax:
Arguments:
  • dataset-id - Dataset identifier
  • job-id - Job identifier (returned from ingest command)
Optional Flags:
  • --output - Output format: text, json, yaml
Example:

Next Steps

Context Graph

Explore the organizational knowledge graph and graph queries

Intelligent Search

AI-powered natural language search for the context graph

Core Resources

Manage agents, teams, and projects

On-Demand Execution

Execute tasks with agents using stored context