Reference

Technical reference for neo4j-agent-memory APIs, configuration, and tools.

Reference guides are information-oriented. They describe the machinery and how to operate it. They are accurate and complete.

Configuration

Reference Description

Configuration Reference

All configuration options for MemorySettings, extraction, embeddings, and more.

Environment Variables

Complete list of environment variables and their effects.

API Reference

Reference Description

MemoryClient API

Main entry point for all memory operations.

ShortTermMemory API

Conversation and message storage API.

LongTermMemory API

Entity, preference, and fact storage API.

ReasoningMemory API

Reasoning trace and tool call API.

Extraction Reference

Reference Description

Extractor Classes

SpacyEntityExtractor, GLiNEREntityExtractor, LLMEntityExtractor, ExtractionPipeline.

Domain Schemas

Built-in schemas (POLE+O, podcast, news, etc.) and custom schema creation.

Tools

Reference Description

CLI Reference

Command-line interface for extraction and schema management.

Deployment Guide

Deploy documentation and applications to Vercel, Netlify, etc.

Installation

# Basic installation
pip install neo4j-agent-memory

# With all extras
pip install neo4j-agent-memory[all]

# Specific extras
pip install neo4j-agent-memory[gliner,openai,cli]

Minimal Example

from neo4j_agent_memory import MemoryClient, MemorySettings

settings = MemorySettings(
    neo4j={"uri": "bolt://localhost:7687", "password": "password"}
)

async with MemoryClient(settings) as client:
    # Store a message
    await client.short_term.add_message(
        session_id="session-1",
        role="user",
        content="Hello, I'm interested in AI agents"
    )

    # Get context for LLM
    context = await client.get_context("AI agents")

Reference Philosophy

Reference documentation:

  • Describes: What things are and how they work

  • Accurate: Matches the actual code behavior

  • Complete: Documents all options, not just common ones

  • Neutral: States facts without opinions

For learning the library from scratch, see the Tutorials.

For solving specific problems, see the How-To Guides.

For understanding concepts and design decisions, see the Explanation section.