Integration guides and working examples for connecting Neo4j to 20+ AI agent platforms and frameworks.
This repository provides self-contained integration guides showing how to build agents that use Neo4j as their knowledge layer. Each integration demonstrates the same reference implementation adapted to the platform's patterns.
- Choose a platform from Platform Coverage
- Navigate to its folder (e.g.,
langraph/,aws-agentcore/) - Follow the README for setup and examples
- Use the demo database to test
All examples use a read-only Neo4j instance with company and news data:
NEO4J_URI = "neo4j+s://demo.neo4jlabs.com:7687"
NEO4J_USERNAME = "companies"
NEO4J_PASSWORD = "companies"
NEO4J_DATABASE = "companies"Dataset: 250k entities from Diffbot's knowledge graph
- Organizations, people, locations, industries
- News articles with vector embeddings
Data model:
(Organization)-[:LOCATED_IN]->(Location)
(Organization)-[:IN_INDUSTRY]->(Industry)
(Person)-[:WORKS_FOR]->(Organization)
(Article)-[:MENTIONS]->(Organization)
(Article)-[:HAS_CHUNK]->(Chunk) [vector embeddings]
See EXAMPLE_AGENT.md for the canonical "Industry Research Agent" that each platform implements.
The reference agent demonstrates:
- Querying company data from Neo4j
- Vector search over news articles
- Analyzing organizational relationships
- Synthesizing research reports
This provides a consistent pattern for comparing integration approaches across platforms.
- aws-agentcore - AWS AgentCore Bedrock (native MCP + A2A)
- microsoft-foundry - Azure AI Foundry (native MCP + A2A)
- google-gemini-enterprise - Google Gemini Enterprise (MCP + Vertex AI Extensions)
- databricks-agent-bricks - Databricks (MCP Catalog + Unity Catalog)
- snowflake-cortex - Snowflake Cortex
- servicenow-ai-agents - ServiceNow (MCP + A2A)
- salesforce-agentforce - Salesforce Agentforce
- langgraph - LangGraph (MCP adapters)
- langchain - LangChain (MCP adapters)
- microsoft-agent-framework - Microsoft Agent Framework (AutoGen + Semantic Kernel)
- openai-agents-sdk - OpenAI Agents SDK
- strands-agents - AWS Strands
- google-adk - Google ADK
- crewai - CrewAI
- pydantic-ai - Pydantic AI
- llamaindex - LlamaIndex
- haystack - Haystack
- claude-agent - Claude Agent
- ibm-watsonx - IBM watsonx Orchestrate
- n8n - n8n
- langflow - Langflow
Use the Neo4j MCP server for standardized tool interface:
from mcp_client import MCPClient
client = MCPClient(url="http://localhost:8000/mcp")
tools = client.list_tools() # Neo4j query tools availableThe MCP server can run:
- Locally via stdio
- As HTTP service (SSE or streamable-http)
- Deployed to cloud (Cloud Run, Lambda, etc.)
Use Neo4j driver directly for more control:
from neo4j import GraphDatabase
driver = GraphDatabase.driver(
"neo4j+s://demo.neo4jlabs.com:7687",
auth=("companies", "companies")
)
def query_company(company_name: str):
query = """
MATCH (o:Organization {name: $company})
RETURN o.name as name,
[(o)-[:LOCATED_IN]->(loc:Location) | loc.name] as locations,
[(o)-[:IN_INDUSTRY]->(ind:Industry) | ind.name] as industries
LIMIT 1
"""
records, summary, keys = driver.execute_query(
query,
company=company_name,
database_="companies"
)
return records[0].data() if records else {}Use dedicated extension points of the agent framework to implement a specific integration.
Different platforms support different auth mechanisms. See mcp-auth-support.md for detailed comparison.
Common patterns:
- API Keys - Simplest, supported everywhere
- OAuth M2M - Enterprise platforms (AWS, Azure, Databricks, ServiceNow)
- Platform IAM - Cloud-native (AWS IAM, Azure AD, GCP Service Accounts)
platform-name/
├── README.md # Integration guide with working examples
├── examples/ # Complete code samples (optional)
└── challenges.md # Known issues and workarounds (optional)
Each platform README includes:
- Platform overview and official links
- Extension points (how to integrate)
- Authentication setup
- Complete implementation of the reference agent
- Challenges and limitations
- Additional integration opportunities
See INTEGRATION_TEMPLATE.md for the template.
Get company information:
MATCH (o:Organization {name: $company})
RETURN o.name as name,
[(o)-[:LOCATED_IN]->(loc:Location) | loc.name] as locations,
[(o)-[:IN_INDUSTRY]->(ind:Industry) | ind.name] as industries,
[(o)<-[:WORKS_FOR]-(p:Person) | {name: p.name, title: p.title}] as leadership
LIMIT 1Vector search news articles:
MATCH (o:Organization {name: $company})<-[:MENTIONS]-(a:Article)
MATCH (a)-[:HAS_CHUNK]->(c:Chunk)
CALL db.index.vector.queryNodes('news', 5, $embedding)
YIELD node, score
WHERE node = c
RETURN a.title, a.date, c.text, score
ORDER BY score DESCWhen adding a new integration:
- Use INTEGRATION_TEMPLATE.md as starting point
- Implement the reference agent from EXAMPLE_AGENT.md
- Include working code examples
- Document authentication setup clearly
- Note platform-specific challenges and workarounds
- Keep examples self-contained (no external dependencies beyond Neo4j MCP server)
- Neo4j MCP Server: https://github.com/neo4j/mcp
- MCP Specification: https://modelcontextprotocol.io/
- Neo4j Driver Docs: https://neo4j.com/docs/
- Demo Database: neo4j+s://demo.neo4jlabs.com:7687 (companies/companies)