Skip to main content

Advanced Memory System

The advanced memory system provides sophisticated memory management with short-term, long-term, entity, and user-specific storage, enhanced by quality scoring and optional graph database support.

Key Features

Separate short-term and long-term memory systems

4-metric quality assessment for stored memories

User, agent, and run-specific memory scoping

Automatic entity extraction and storage

Optional Neo4j/Memgraph for relationships

Quality-based filtering and relevance ranking

Quick Start

Memory Tiers

Short-term Memory (STM)

Short-term memory is cleared between sessions and used for immediate context.

Long-term Memory (LTM)

Long-term memory persists across sessions and stores important information.

Entity Memory

Entity memory stores information about specific people, places, or things.

User Memory

User memory stores personalised information and preferences.

Configuration Options

RAG Configuration (Default)

Mem0 Configuration

Dakera Configuration

Requires: pip install "praisonaiagents[dakera]"
See Dakera Memory for the full guide.

Graph Memory Configuration

Quality Scoring System

Quality Metrics

Completeness

Measures how complete and comprehensive the information is

Relevance

Measures how relevant the information is to the context

Clarity

Measures how clear and understandable the information is

Accuracy

Measures the factual accuracy of the information

Quality Calculation

Advanced Features

Context Building

Build comprehensive context for tasks:

Task Output Finalisation

Store task results with quality assessment:

Memory Citations

Automatically cite memory sources:

Memory Reranking

Enhance search results with intelligent reranking based on relevance scores:

Reranking Features

  1. Semantic Reranking: Re-scores results based on semantic similarity
  2. Context-Aware Ranking: Considers current context when ranking
  3. Quality-Weighted Ranking: Combines relevance with quality scores

Custom Reranking Logic

Implement custom reranking strategies:

Reranking Performance

Optimize reranking for large result sets:

Performance Optimisation

Complete Example

Best Practices

  • Set minimum quality for critical information (0.8+)
  • Use lower thresholds for exploratory searches
  • Regular quality audits

  • Periodically review and clean old memories
  • Update quality scores as information ages
  • Deduplicate similar memories

  • Use user_id for personalisation
  • Use agent_id for agent-specific knowledge
  • Use run_id for session isolation

  • Enable embeddings for semantic search
  • Use quality filters to reduce search space
  • Implement caching for frequent queries

Next Steps

Knowledge

Integrate with document knowledge bases

Sessions

Learn about stateful sessions