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.
- 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
- Python 3.8+
- Neo4j Database instance
- Claude API access (for the AI model)
- Clone the repository:
git clone <repository-url>
cd neo4j-ai-agent- Install the required dependencies:
pip install -r requirements.txt- Create a
.envfile in the project root with your Neo4j credentials:
NEO4J_URI=your_neo4j_uri
NEO4J_USERNAME=your_username
NEO4J_PASSWORD=your_passwordThe 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")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
The agent understands natural language queries and converts them into appropriate Cypher queries while maintaining data integrity.
- Automatic schema detection
- Dynamic schema creation and modification
- Schema visualization capabilities
- Intelligent creation of bi-directional relationships
- Proper handling of complex relationship patterns
- Prevention of duplicate relationships
- Graceful error management
- Clear user feedback
- Connection verification
Contributed to AGNO repo!