Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:

- name: Pack
working-directory: dotnet
run: dotnet pack src/Neo4j.AgentFramework --configuration Release --no-build -p:Version=${{ steps.version.outputs.VERSION }} -o nupkg/
run: dotnet pack src/Neo4j.AgentFramework.GraphRAG --configuration Release --no-build -p:Version=${{ steps.version.outputs.VERSION }} -o nupkg/

- name: Store NuGet package
uses: actions/upload-artifact@v4
Expand All @@ -86,7 +86,7 @@ jobs:
runs-on: ubuntu-latest
environment:
name: nuget
url: https://www.nuget.org/packages/Neo4j.AgentFramework
url: https://www.nuget.org/packages/Neo4j.AgentFramework.GraphRAG
steps:
- name: Download NuGet package
uses: actions/download-artifact@v4
Expand Down
18 changes: 9 additions & 9 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ neo4j-maf-provider/
│ ├── tests/ # Library tests
│ └── docs/ # Python documentation
├── dotnet/ # .NET implementation
│ ├── src/Neo4j.AgentFramework/ # NuGet library
│ ├── src/Neo4j.AgentFramework.GraphRAG/ # NuGet library
│ ├── samples/Neo4j.Samples/ # Demo console app
│ └── tests/Neo4j.AgentFramework.Tests/ # Unit tests
│ └── tests/Neo4j.AgentFramework.GraphRAG.Tests/ # Unit tests
├── infra/ # Shared infrastructure
│ ├── SETUP.md # Setup guide
│ ├── main.bicep # Azure Bicep template
Expand Down Expand Up @@ -72,7 +72,7 @@ cd dotnet
dotnet build # Build all projects
dotnet test # Run unit tests
dotnet run --project samples/Neo4j.Samples # Run demos
dotnet pack src/Neo4j.AgentFramework # Create NuGet package
dotnet pack src/Neo4j.AgentFramework.GraphRAG # Create NuGet package
```

### Infrastructure Setup (from repo root)
Expand All @@ -99,12 +99,12 @@ python infra/scripts/seed_data.py # Load demo data into Neo4j

| Component | Location | Purpose |
|-----------|----------|---------|
| `Neo4jContextProvider` | `dotnet/src/Neo4j.AgentFramework/Neo4jContextProvider.cs` | `AIContextProvider` implementation |
| `Neo4jContextProviderOptions` | `dotnet/src/Neo4j.AgentFramework/Neo4jContextProviderOptions.cs` | Configuration with validation |
| `Neo4jSettings` | `dotnet/src/Neo4j.AgentFramework/Neo4jSettings.cs` | Environment variable loader |
| `VectorRetriever` | `dotnet/src/Neo4j.AgentFramework/Retrieval/VectorRetriever.cs` | Vector search via Cypher |
| `FulltextRetriever` | `dotnet/src/Neo4j.AgentFramework/Retrieval/FulltextRetriever.cs` | Fulltext search via Cypher |
| `HybridRetriever` | `dotnet/src/Neo4j.AgentFramework/Retrieval/HybridRetriever.cs` | Combined vector + fulltext |
| `Neo4jContextProvider` | `dotnet/src/Neo4j.AgentFramework.GraphRAG/Neo4jContextProvider.cs` | `AIContextProvider` implementation |
| `Neo4jContextProviderOptions` | `dotnet/src/Neo4j.AgentFramework.GraphRAG/Neo4jContextProviderOptions.cs` | Configuration with validation |
| `Neo4jSettings` | `dotnet/src/Neo4j.AgentFramework.GraphRAG/Neo4jSettings.cs` | Environment variable loader |
| `VectorRetriever` | `dotnet/src/Neo4j.AgentFramework.GraphRAG/Retrieval/VectorRetriever.cs` | Vector search via Cypher |
| `FulltextRetriever` | `dotnet/src/Neo4j.AgentFramework.GraphRAG/Retrieval/FulltextRetriever.cs` | Fulltext search via Cypher |
| `HybridRetriever` | `dotnet/src/Neo4j.AgentFramework.GraphRAG/Retrieval/HybridRetriever.cs` | Combined vector + fulltext |

### Search Flow

Expand Down
10 changes: 5 additions & 5 deletions dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A .NET library that provides Neo4j knowledge graph context to AI agents built wi
## Installation

```bash
dotnet add package Neo4j.AgentFramework
dotnet add package Neo4j.AgentFramework.GraphRAG
```

## Quick Start
Expand All @@ -24,7 +24,7 @@ using Azure.AI.OpenAI;
using Azure.Identity;
using Microsoft.Agents.AI;
using Microsoft.Extensions.AI;
using Neo4j.AgentFramework;
using Neo4j.AgentFramework.GraphRAG;
using Neo4j.Driver;

// Create embedding generator (any IEmbeddingGenerator implementation works)
Expand Down Expand Up @@ -174,7 +174,7 @@ dotnet run --project samples/Neo4j.Samples

```
dotnet/
├── src/Neo4j.AgentFramework/ # Library
├── src/Neo4j.AgentFramework.GraphRAG/ # Library
│ ├── Neo4jContextProvider.cs # AIContextProvider implementation
│ ├── Neo4jContextProviderOptions.cs # Configuration
│ ├── Neo4jSettings.cs # Environment variable loader
Expand All @@ -187,7 +187,7 @@ dotnet/
│ ├── FulltextRetriever.cs
│ └── HybridRetriever.cs
├── samples/Neo4j.Samples/ # Demo console app
├── tests/Neo4j.AgentFramework.Tests/ # Unit tests
├── tests/Neo4j.AgentFramework.GraphRAG.Tests/ # Unit tests
└── neo4j-provider.sln
```

Expand All @@ -206,5 +206,5 @@ The library uses `IEmbeddingGenerator<string, Embedding<float>>` from `Microsoft
cd dotnet
dotnet build # Build all projects
dotnet test # Run unit tests
dotnet pack src/Neo4j.AgentFramework # Create NuGet package
dotnet pack src/Neo4j.AgentFramework.GraphRAG # Create NuGet package
```
4 changes: 2 additions & 2 deletions dotnet/neo4j-provider.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neo4j.AgentFramework", "src\Neo4j.AgentFramework\Neo4j.AgentFramework.csproj", "{B82B2997-5008-40E1-A5CF-FB894EFE36EC}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neo4j.AgentFramework.GraphRAG", "src\Neo4j.AgentFramework.GraphRAG\Neo4j.AgentFramework.GraphRAG.csproj", "{B82B2997-5008-40E1-A5CF-FB894EFE36EC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{5D20AA90-6969-D8BD-9DCD-8634F4692FDA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neo4j.Samples", "samples\Neo4j.Samples\Neo4j.Samples.csproj", "{1CB8F8D8-E194-435F-80AD-C5146697320F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0AB3BF05-4346-4AA6-1389-037BE0695223}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neo4j.AgentFramework.Tests", "tests\Neo4j.AgentFramework.Tests\Neo4j.AgentFramework.Tests.csproj", "{3037B841-A074-48F9-9BE1-2B30082E0C45}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Neo4j.AgentFramework.GraphRAG.Tests", "tests\Neo4j.AgentFramework.GraphRAG.Tests\Neo4j.AgentFramework.GraphRAG.Tests.csproj", "{3037B841-A074-48F9-9BE1-2B30082E0C45}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
2 changes: 1 addition & 1 deletion dotnet/samples/Neo4j.Samples/Neo4j.Samples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="../../src/Neo4j.AgentFramework/Neo4j.AgentFramework.csproj" />
<ProjectReference Include="../../src/Neo4j.AgentFramework.GraphRAG/Neo4j.AgentFramework.GraphRAG.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion dotnet/samples/Neo4j.Samples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.Agents.AI;
using Microsoft.Agents.AI.OpenAI;
using Microsoft.Extensions.AI;
using Neo4j.AgentFramework;
using Neo4j.AgentFramework.GraphRAG;
using Neo4j.Driver;

// ── Load .env from repo root ─────────────────────────────────────────────────
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Neo4j.AgentFramework;
namespace Neo4j.AgentFramework.GraphRAG;

/// <summary>
/// The type of search to perform against Neo4j indexes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>Neo4j.AgentFramework</PackageId>
<PackageId>Neo4j.AgentFramework.GraphRAG</PackageId>
<Description>Neo4j Context Provider for Microsoft Agent Framework. Retrieves knowledge graph context using vector, fulltext, or hybrid search with optional graph enrichment.</Description>
<PackageTags>neo4j;agent-framework;rag;context-provider;knowledge-graph;vector-search</PackageTags>
<!-- Microsoft.Agents.AI.Abstractions is still prerelease (rc2); suppress until it goes stable -->
Expand All @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Neo4j.AgentFramework.Tests" />
<InternalsVisibleTo Include="Neo4j.AgentFramework.GraphRAG.Tests" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using System.Globalization;
using Microsoft.Agents.AI;
using Microsoft.Extensions.AI;
using Neo4j.AgentFramework.Retrieval;
using Neo4j.AgentFramework.GraphRAG.Retrieval;
using Neo4j.Driver;

namespace Neo4j.AgentFramework;
namespace Neo4j.AgentFramework.GraphRAG;

/// <summary>
/// Context provider that retrieves knowledge graph context from Neo4j.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.Extensions.AI;

namespace Neo4j.AgentFramework;
namespace Neo4j.AgentFramework.GraphRAG;

/// <summary>
/// Configuration options for <see cref="Neo4jContextProvider"/>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Neo4j.AgentFramework;
namespace Neo4j.AgentFramework.GraphRAG;

/// <summary>
/// Loads Neo4j connection settings from environment variables.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Neo4j.Driver;

namespace Neo4j.AgentFramework.Retrieval;
namespace Neo4j.AgentFramework.GraphRAG.Retrieval;

/// <summary>
/// Retriever using fulltext search over Neo4j fulltext indexes.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.Extensions.AI;
using Neo4j.Driver;

namespace Neo4j.AgentFramework.Retrieval;
namespace Neo4j.AgentFramework.GraphRAG.Retrieval;

/// <summary>
/// Retriever combining vector and fulltext search.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Neo4j.AgentFramework.Retrieval;
namespace Neo4j.AgentFramework.GraphRAG.Retrieval;

/// <summary>
/// Interface for retrieving search results from Neo4j.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Neo4j.AgentFramework.Retrieval;
namespace Neo4j.AgentFramework.GraphRAG.Retrieval;

/// <summary>
/// A single item from a retriever search result.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.Extensions.AI;
using Neo4j.Driver;

namespace Neo4j.AgentFramework.Retrieval;
namespace Neo4j.AgentFramework.GraphRAG.Retrieval;

/// <summary>
/// Retriever using vector search over Neo4j vector indexes.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Text.RegularExpressions;

namespace Neo4j.AgentFramework;
namespace Neo4j.AgentFramework.GraphRAG;

/// <summary>
/// Common English stop words for fulltext search query filtering.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Moq;
using Neo4j.AgentFramework.Retrieval;
using Neo4j.AgentFramework.GraphRAG.Retrieval;
using Neo4j.Driver;

namespace Neo4j.AgentFramework.Tests;
namespace Neo4j.AgentFramework.GraphRAG.Tests;

public class FulltextRetrieverTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
global using Neo4j.AgentFramework.GraphRAG;
global using Xunit;
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.Extensions.AI;
using Moq;
using Neo4j.AgentFramework.Retrieval;
using Neo4j.AgentFramework.GraphRAG.Retrieval;
using Neo4j.Driver;

namespace Neo4j.AgentFramework.Tests;
namespace Neo4j.AgentFramework.GraphRAG.Tests;

public class HybridRetrieverTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<ProjectReference Include="../../src/Neo4j.AgentFramework/Neo4j.AgentFramework.csproj" />
<ProjectReference Include="../../src/Neo4j.AgentFramework.GraphRAG/Neo4j.AgentFramework.GraphRAG.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.Extensions.AI;
using Moq;

namespace Neo4j.AgentFramework.Tests;
namespace Neo4j.AgentFramework.GraphRAG.Tests;

public class Neo4jContextProviderOptionsTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.Extensions.AI;
using Moq;
using Neo4j.AgentFramework.Retrieval;
using Neo4j.AgentFramework.GraphRAG.Retrieval;
using Neo4j.Driver;

namespace Neo4j.AgentFramework.Tests;
namespace Neo4j.AgentFramework.GraphRAG.Tests;

public class Neo4jContextProviderTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Neo4j.AgentFramework.Retrieval;
using Neo4j.AgentFramework.GraphRAG.Retrieval;

namespace Neo4j.AgentFramework.Tests;
namespace Neo4j.AgentFramework.GraphRAG.Tests;

public class ResultFormattingTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Neo4j.AgentFramework.Tests;
namespace Neo4j.AgentFramework.GraphRAG.Tests;

public class StopWordsTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Microsoft.Extensions.AI;
using Moq;
using Neo4j.AgentFramework.Retrieval;
using Neo4j.AgentFramework.GraphRAG.Retrieval;
using Neo4j.Driver;

namespace Neo4j.AgentFramework.Tests;
namespace Neo4j.AgentFramework.GraphRAG.Tests;

public class VectorRetrieverTests
{
Expand Down
2 changes: 0 additions & 2 deletions dotnet/tests/Neo4j.AgentFramework.Tests/GlobalUsings.cs

This file was deleted.

Loading