Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Neo4j AI Agent

A powerful AI agent that helps you interact with Neo4j databases using natural language. This agent leverages the AGNO framework and Claude AI to understand your queries and translate them into appropriate Cypher queries.

Features

  • Natural language to Cypher query translation
  • Dynamic schema management and creation
  • Intelligent relationship handling
  • Schema visualization capabilities
  • Error handling and user feedback
  • Support for complex multi-node operations

Prerequisites

  • Python 3.8+
  • Neo4j Database instance
  • Claude API access (for the AI model)

Installation

  1. Clone the repository:
git clone <repository-url>
cd neo4j-ai-agent
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Create a .env file in the project root with your Neo4j credentials:
NEO4J_URI=your_neo4j_uri
NEO4J_USERNAME=your_username
NEO4J_PASSWORD=your_password

Usage

The agent can be used to:

  • Query the database using natural language
  • Get database schema information
  • Create and modify database structures
  • Handle complex relationships and operations

Example usage:

from neo4j_agent import agent

# The agent will automatically handle the translation of natural language to Cypher queries
response = agent.chat("Show me all users who have made purchases in the last month")

Architecture

The project uses:

  • AGNO framework for AI agent capabilities
  • Claude AI model for natural language understanding
  • Neo4j Python driver for database operations
  • Custom toolkit for Neo4j-specific operations

Natural Language Processing

The agent understands natural language queries and converts them into appropriate Cypher queries while maintaining data integrity.

Schema Management

  • Automatic schema detection
  • Dynamic schema creation and modification
  • Schema visualization capabilities

Relationship Handling

  • Intelligent creation of bi-directional relationships
  • Proper handling of complex relationship patterns
  • Prevention of duplicate relationships

Error Handling

  • Graceful error management
  • Clear user feedback
  • Connection verification

Contribution

Contributed to AGNO repo!

About

A powerful AI agent that helps you interact with Neo4j databases using natural language. This agent leverages the AGNO framework and Claude AI to understand your queries and translate them into appropriate Cypher queries.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages