AI Memory Processing

Every memory stored in AgentRecall is automatically processed by Qwen2.5-7B to extract structured information.

What Happens When You Store a Memory

  1. Ingestion — Your text is received and validated
  2. AI Processing — Qwen2.5-7B analyzes the content
  3. Entity Extraction — Named entities are identified and typed
  4. Relationship Detection — Connections between entities are mapped
  5. Auto-Categorization — Content is classified into categories
  6. Importance Scoring — Relevance score is computed
  7. Graph Storage — Everything is stored in Neo4j
  8. Vector Indexing — Embeddings are generated for semantic search

Entity Extraction

The model identifies and types entities from your memories:

Entity TypeExample
Person"Alice", "the user"
Organization"Acme Corp", "OpenAI"
Location"San Francisco", "the office"
Concept"dark mode", "machine learning"
Technology"Python", "Neo4j", "React"
Preference"prefers X", "likes Y"

Relationship Detection

The model infers relationships between extracted entities:

// Input memory:
// "Alice works at Acme Corp in San Francisco and prefers Python"

// Extracted relationships:
// [Alice] --works_at--> [Acme Corp]
// [Acme Corp] --located_in--> [San Francisco]
// [Alice] --prefers--> [Python]
// [Python] --is_a--> [Technology]

Auto-Categorization

If no category is provided, the AI assigns one automatically:

How It Works Under the Hood

Processing Pipeline

Memory Text
    |
    v
+---------------------+
|   Qwen2.5-7B LLM    |
|  (entity extraction, |
|   relationships,     |
|   categorization,    |
|   importance)        |
+----------+----------+
           |
    +------+------+
    v             v
+--------+  +--------+
| Neo4j  |  | Vector |
| Graph  |  | Index  |
+--------+  +--------+

The entire pipeline runs asynchronously. Your store() call returns immediately after the memory is persisted. The AI processing happens in the background, and the graph/vector indices are updated within seconds.

Disabling AI Processing

If you want raw storage without AI enrichment:

memory.store(
    content="Raw text without processing",
    agent_id="my-agent",
    process=False  # Skip AI processing
)