Skip to content

Commit 090b88a

Browse files
retroryanbenofben
andauthored
Python: Adds sample documentation for two separate Neo4j context providers for retrieval and memory (microsoft#4010)
* Python: Adds sample documentation for two separate Neo4j context providers for retrieval and memory * adding pypi links * adding dotnot examples * adding dotnot examples * merge upstream samples * fixing docs * fix relative paths --------- Co-authored-by: Ben Lackey <ben.lackey@neo4j.com>
1 parent 746c7da commit 090b88a

3 files changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Neo4j Context Providers
2+
3+
Neo4j offers two context providers for the Agent Framework, each serving a different purpose:
4+
5+
| | [Neo4j Memory](../neo4j_memory/README.md) | [Neo4j GraphRAG](../../../05-end-to-end/neo4j_graphrag/README.md) |
6+
|---|---|---|
7+
| **What it does** | Read-write memory — stores conversations, builds knowledge graphs, learns from interactions | Read-only retrieval from a pre-existing knowledge base with optional graph traversal |
8+
| **Data source** | Agent interactions (grows over time) | Pre-loaded documents and indexes |
9+
| **Python package** | [`neo4j-agent-memory`](https://pypi.org/project/neo4j-agent-memory/) | [`agent-framework-neo4j`](https://pypi.org/project/agent-framework-neo4j/) |
10+
| **Database setup** | Empty — creates its own schema | Requires pre-indexed documents with vector or fulltext indexes |
11+
| **Example use case** | "Remember my preferences", "What did we discuss last time?" | "Search our documents", "What risks does Acme Corp face?" |
12+
13+
## Which should I use?
14+
15+
**Use [Neo4j Memory](../neo4j_memory/README.md)** when your agent needs to remember things across sessions — user preferences, past conversations, extracted entities, and reasoning traces. The memory provider writes to the database on every interaction, building a knowledge graph that grows over time.
16+
17+
**Use [Neo4j GraphRAG](../../../05-end-to-end/neo4j_graphrag/README.md)** when your agent needs to search an existing knowledge base — documents, articles, product catalogs — and optionally enrich results by traversing graph relationships. The GraphRAG provider is read-only and does not modify your data.
18+
19+
You can use both together: GraphRAG for domain knowledge retrieval, Memory for personalization and learning.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Neo4j Memory Context Provider
2+
3+
[Neo4j Agent Memory](https://github.com/neo4j-labs/agent-memory) is a graph-native memory system for AI agents that stores conversations, builds knowledge graphs from interactions, and lets agents learn from their own reasoning — all backed by Neo4j.
4+
5+
For full documentation, installation instructions, code examples, and configuration details, see the [Neo4j Memory integration guide on Microsoft Learn](https://learn.microsoft.com/agent-framework/integrations/neo4j-memory).
6+
7+
For a runnable example, see the [retail assistant sample](https://github.com/neo4j-labs/agent-memory/tree/main/examples/microsoft_agent_retail_assistant).
8+
9+
For help choosing between the Memory and GraphRAG providers, see the [Neo4j Context Providers overview](../neo4j/README.md).

python/samples/05-end-to-end/neo4j_graphrag/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ The [Neo4j GraphRAG context provider](https://github.com/neo4j-labs/neo4j-maf-pr
44

55
This sample keeps setup lightweight by using a pre-built Neo4j fulltext index plus a graph-enrichment query.
66

7+
For full documentation, see the [Neo4j GraphRAG integration guide on Microsoft Learn](https://learn.microsoft.com/agent-framework/integrations/neo4j-graphrag).
8+
79
## Example
810

911
| File | Description |

0 commit comments

Comments
 (0)