> ## Documentation Index
> Fetch the complete documentation index at: https://spacesail.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Neo4j Tools

> Neo4jTools enables agents to interact with Neo4j graph databases for querying and managing graph data.

## Code

```python cookbook/tools/neo4j_tools.py theme={null}
from agno.agent import Agent
from agno.tools.neo4j import Neo4jTools

agent = Agent(
    instructions=[
        "You are a graph database assistant that helps with Neo4j operations",
        "Execute Cypher queries to analyze graph data and relationships",
        "Provide insights about graph structure and patterns",
    ],
    tools=[Neo4jTools()],
    markdown=True,
)

agent.print_response("Show me the schema of the graph database and list all node labels")
```

## Usage

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Set your credentials">
    ```bash theme={null}
    export NEO4J_URI=bolt://localhost:7687
    export NEO4J_USERNAME=neo4j
    export NEO4J_PASSWORD=your-password
    export OPENAI_API_KEY=xxx
    ```
  </Step>

  <Step title="Install libraries">
    ```bash theme={null}
    pip install -U neo4j openai agno
    ```
  </Step>

  <Step title="Run Agent">
    <CodeGroup>
      ```bash Mac theme={null}
      python cookbook/tools/neo4j_tools.py
      ```

      ```bash Windows theme={null}
      python cookbook/tools/neo4j_tools.py
      ```
    </CodeGroup>
  </Step>
</Steps>
