-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Python: Adds sample documentation for two separate Neo4j context providers for retrieval and memory #4010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
westey-m
merged 18 commits into
microsoft:main
from
neo4j-partners:docs/neo4j-context-provider
Apr 7, 2026
Merged
Python: Adds sample documentation for two separate Neo4j context providers for retrieval and memory #4010
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
8c103de
Python: Adds sample documentation for two separate Neo4j context prov…
retroryan 68afbcb
adding pypi links
retroryan eb96551
Merge branch 'main' into docs/neo4j-context-provider
retroryan e3145bd
Merge branch 'main' into docs/neo4j-context-provider
benofben db4053e
Merge remote-tracking branch 'upstream/main' into docs/neo4j-context-…
retroryan 90134b8
Merge branch 'docs/neo4j-context-provider' of github.com:neo4j-partne…
retroryan 022792b
Merge remote-tracking branch 'upstream/main' into docs/neo4j-context-…
retroryan aade778
adding dotnot examples
retroryan 85873a8
adding dotnot examples
retroryan 1ab9cc0
Merge remote-tracking branch 'upstream/main' into docs/neo4j-context-…
retroryan 80fe2eb
Merge remote-tracking branch 'upstream/main' into docs/neo4j-context-…
retroryan 7c38e4a
merge upstream samples
retroryan fb82d8d
Merge branch 'main' into docs/neo4j-context-provider
retroryan ebfd2ae
Merge remote-tracking branch 'upstream/main' into docs/neo4j-context-…
retroryan 2e7b96d
fixing docs
retroryan 3bc51a1
Merge branch 'docs/neo4j-context-provider' of github.com:neo4j-partne…
retroryan 0332dc4
Merge remote-tracking branch 'upstream/main' into docs/neo4j-context-…
retroryan 6f318c3
fix relative paths
retroryan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
python/samples/02-agents/context_providers/neo4j/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Neo4j Context Providers | ||
|
|
||
| Neo4j offers two context providers for the Agent Framework, each serving a different purpose: | ||
|
|
||
| | | [Neo4j Memory](../neo4j_memory/README.md) | [Neo4j GraphRAG](../../../05-end-to-end/neo4j_graphrag/README.md) | | ||
| |---|---|---| | ||
| | **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 | | ||
| | **Data source** | Agent interactions (grows over time) | Pre-loaded documents and indexes | | ||
| | **Python package** | [`neo4j-agent-memory`](https://pypi.org/project/neo4j-agent-memory/) | [`agent-framework-neo4j`](https://pypi.org/project/agent-framework-neo4j/) | | ||
| | **Database setup** | Empty — creates its own schema | Requires pre-indexed documents with vector or fulltext indexes | | ||
| | **Example use case** | "Remember my preferences", "What did we discuss last time?" | "Search our documents", "What risks does Acme Corp face?" | | ||
|
|
||
| ## Which should I use? | ||
|
|
||
| **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. | ||
|
|
||
| **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. | ||
|
|
||
| You can use both together: GraphRAG for domain knowledge retrieval, Memory for personalization and learning. | ||
9 changes: 9 additions & 0 deletions
9
python/samples/02-agents/context_providers/neo4j_memory/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Neo4j Memory Context Provider | ||
|
|
||
| [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. | ||
|
|
||
| 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). | ||
|
|
||
| For a runnable example, see the [retail assistant sample](https://github.com/neo4j-labs/agent-memory/tree/main/examples/microsoft_agent_retail_assistant). | ||
|
|
||
| For help choosing between the Memory and GraphRAG providers, see the [Neo4j Context Providers overview](../neo4j/README.md). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.