Schema Objects Reference
Complete inventory of the constraints, regular indexes, vector indexes,
and point indexes that neo4j-agent-memory creates on first connection.
Use this page to answer "what schema changes will this library make to
my Neo4j database?" before deploying.
All schema objects are created by SchemaManager.setup_all(), which
runs as part of MemoryClient.connect(). Existing constraints/indexes
with the same name are skipped; the operation is idempotent.
The authoritative source is
src/neo4j_agent_memory/graph/schema.py. This page is a human-readable
reference to the schema objects the library creates, but consult that
file for the complete current inventory used in deployments.
Unique constraints
| Name | Label | Property | Purpose |
|---|---|---|---|
|
|
|
Unique conversation identifier. |
|
|
|
Unique message identifier. |
|
|
|
Unique entity identifier across all subtypes. |
|
|
|
Unique preference identifier. |
|
|
|
Unique fact identifier. |
|
|
|
Unique reasoning-trace identifier. |
|
|
|
Unique reasoning-step identifier. |
|
|
|
One |
|
|
|
Unique tool-call identifier. |
|
|
|
Unique user identifier (multi-tenancy). |
|
|
|
Unique consolidation-job run identifier. |
|
|
|
Unique memory-read audit event identifier. |
Regular indexes
Lookup indexes for common filter / equality queries.
| Name | Label | Property | Purpose |
|---|---|---|---|
|
|
|
Look up conversations by session. |
|
|
|
Filter active vs. archived conversations. |
|
|
|
Order messages chronologically. |
|
|
|
Filter messages by role ( |
|
|
|
Filter entities by POLE+O (or custom) type. |
|
|
|
Look up entities by display name. |
|
|
|
Look up entities by deduplicated canonical name. |
|
|
|
Filter preferences by category. |
|
|
|
Reasoning traces for a session. |
|
|
|
Successful vs. failed traces. |
|
|
|
Filter failed traces by error classification. |
|
|
|
Filter consolidation runs by kind. |
|
|
|
Filter memory-read audit events by kind. |
|
|
|
Filter tool calls by status. |
Vector indexes
Created with the embedding dimensions configured at construction time
(SchemaManager(client, vector_dimensions=…)). Default is 1536.
| Vector indexes require Neo4j 5.11+. On older databases the library silently skips creation — semantic search via these indexes won’t work, but the rest of the library functions normally. |
| Name | Label | Property | Purpose |
|---|---|---|---|
|
|
|
Semantic search over message content. |
|
|
|
Semantic search over entity descriptions. |
|
|
|
Semantic search over preferences. |
|
|
|
Semantic search over facts. |
|
|
|
Search past reasoning traces by task similarity. |
|
|
|
Semantic search over individual reasoning steps (used by |
Point indexes
Created for geospatial queries on Location entities.
| Name | Label | Property | Purpose |
|---|---|---|---|
|
|
|
Geospatial proximity queries ( |
Removing the schema
SchemaManager.drop_all() removes every constraint and index whose name
starts with one of conversation_, message_, entity_,
preference_, fact_, reasoning_, trace_, tool_, task_,
step_, user_, consolidation_, or memory_read_. It does not
delete data — only schema definitions.
async with MemoryClient(settings) as client:
await client.schema.drop_all()
See Also
-
Configuration Reference — how to override
vector_dimensionsand other schema-related options. -
Graph Architecture — the relationships these constraints/indexes support.