samples: add AgentMemory (Neo4j-agent memory reimplemented in NET ) shopping assistant sample#7096
Open
joslat wants to merge 2 commits into
Open
samples: add AgentMemory (Neo4j-agent memory reimplemented in NET ) shopping assistant sample#7096joslat wants to merge 2 commits into
joslat wants to merge 2 commits into
Conversation
…ory 1.0.1) The .NET port of the official Neo4j Agent Memory "retail assistant" example (neo4j-labs/agent-memory examples/microsoft_agent_retail_assistant, referenced from the Learn integration page), which is currently Python-only. Wires Neo4jMemoryContextProvider (AIContextProvider), MemoryToolFactory memory tools, and a ProductCatalog of retail tools over a Neo4j :Product graph, via the published AgentMemory + AgentMemory.AgentFramework 1.0.1 NuGet packages. Lives at the repo root rather than under dotnet/samples/: that tree is .NET 10 + Central Package Management + Microsoft.Agents.AI ~1.13 with source ProjectReferences, while AgentMemory currently targets net9.0 + Microsoft.Agents.AI 1.9.0. A repo-native version needs AgentMemory bumped to track the newer Agents.AI/Extensions.AI line first. Cross-linked from dotnet/samples/02-agents/AgentWithMemory/README.md as a "See also" entry, same pattern already used for the cross-folder Custom Memory Implementation link. Verified: dotnet build succeeds (0 warnings, 0 errors) against the published packages, proving the AgentMemory public surface is package-consumable. Matches sibling AgentWithMemory samples' conventions (BOM + copyright file header on .cs files, README sections: Features Demonstrated / Prerequisites / Environment Variables / Run the Sample / Expected Output). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Relocates the standalone shopping-assistant sample from the repo root into dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step06_MemoryUsingAgentMemory, following that folder's naming/README/solution conventions. Renames its identity from "Neo4j" to "AgentMemory" (the library it actually demonstrates) since this is a community .NET port, not an officially recognized Neo4j integration - Neo4j is still referenced where it's a genuine technical detail (the graph backing store, env vars, Cypher). Adds empty Directory.Build.props/targets markers so it stays isolated from the repo's net10.0/CPM build, and registers it (skipped, like the Mem0 sample) in the CI sample-verification list since it needs a live Neo4j instance. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
AgentMemory is a native .NET reimplementation of the graph-native agent memory, inspired by Neo4j Agent Memory and verified against its compatibility kit.
It:
dotnet/samples/02-agents/AgentWithMemory/AgentWithMemory_Step06_MemoryUsingAgentMemory, following that folder's naming/README/solution conventions (AgentWithMemory_StepNN_...).AgentMemorylibrary's Microsoft Agent Framework adapter (Neo4jMemoryContextProvider,MemoryToolFactory) for durable, graph-backed memory: the agent learns a shopper's preferences and recommends products via Neo4j graph traversal, with memory persisting across brand-new sessions.AgentMemoryNuGet packages (which targetMicrosoft.Agents.AI1.9.0) rather than this repo's source projects, so it targetsnet9.0with explicit package versions. EmptyDirectory.Build.props/Directory.Build.targetsmarkers keep it isolated from the repo'snet10.0/ Central-Package-Management build (verified it restores/builds cleanly in isolation).eng/verify-samples/AgentsSamples.cs) with aSkipReason, matching the existing Mem0 sample, since it requires a live Neo4j instance.Test plan
dotnet buildsucceeds for the new project in isolation (confirmedDirectory.Build.props/targetsmarkers correctly block inheritance of the repo'snet10.0/CPM settings —TargetFrameworks,TreatWarningsAsErrorsevaluate empty/false as expected).