How to create AI agents with Neo4j Aura Agent

You may be hearing a lot of buzz about knowledge graphs, GraphRAG, and ontologies in the AI space right now, especially around improving agent accuracy, explainability, and governance. But actually creating and deploying your own agents that leverage these concepts can be challenging and ambiguous. At Neo4j, we’re trying to make building and deploying agents more straightforward.

Neo4j Aura Agent is an end-to-end platform for creating agents, connecting them to knowledge graphs, and deploying to production in minutes. In this post, we’ll explore the features of Neo4j Aura Agent that make this all possible, along with links to coded examples to get hands-on with the platform. 

Knowledge graphs, GraphRAG, and ontology-driven AI

Let’s define some key terms before we begin. 

Knowledge graphs

Knowledge graphs are a design pattern for organizing and accessing interrelated data. There are many ways to implement them. At Neo4j, we use a Property Label graph, as shown below. Knowledge graphs provide context, standardization, and flexibility in the data layer, making them well-suited for semantic layers, long-term memory stores, and retrieval-augmented generation (RAG) stores.

Neo4j

GraphRAG

GraphRAG is retrieval-augmented generation where a knowledge graph is included somewhere on the retrieval path. GraphRAG improves accuracy and explainability over vector/document search and other SQL queries by leveraging the knowledge graph structure, which symbolically represents context in an expressive and compact manner, allowing you to retrieve more relevant data and, critically, more efficiently fit the relevant context in the context window of the large language model (LLM).

Neo4j Aura Agent 02

Neo4j

There are lots of GraphRAG retrieval techniques, but the three primary ones are:

  1. Graph-augmented vector search: Vector search is used to match relevant entities (as nodes or relationships), followed by graph traversal operations to identify and aggregate related context.
  2. Text-to-query: Text2Cypher (Cypher being the most popular graph query language) query that enables agents to query the graph based on its schema dynamically.
  3. Query templates: Parameterized, premade graph queries that enable precise, expertly reviewed graph query logic to be executed upon choice by the agent.

Ontology

An ontology is a formal representation of knowledge that defines the concepts, categories, properties, and relationships within a particular domain or area of study. You may have heard about ontologies in the AI space lately. In practice, it is just a data model in the form of a graph schema with additional metadata about the involved domain(s) and use case(s). Ontologies enable AI to reason and make inferences over your data easily. While often associated with Resource Description Framework (RDF) and triple stores, a property graph database (such as that in Neo4j provides the equivalent functionality with a graph schema when paired with an Aura agent system and system and tool prompts. 

Neo4j Aura features

Neo4j Aura is a fully managed graph intelligence platform that includes a graph database and data services for importing, dashboarding, exploring, and deploying AI agents on top of data. You can create knowledge graphs to use with agents from structured or unstructured data, or a mix of both.

You can import structured data with Data Importer from a variety of data warehouses including RDBMS stores such as Snowflake, Databricks, and Postgres.

Neo4j Aura Agent 03

Neo4j

You can also import documents and unstructured data, performing entity extraction and merging graph data according to your schema, using the GraphRAG Python package by Neo4j, or by using other ecosystem tools with supported integrations such as Unstructured, LangChain, and LlamaIndex.

Once the data is imported into Neo4j, you can build an Aura agent on top of it. There are three basic steps:

  1. Creating your agent
  2. Adding tools
  3. Saving, testing, and deploying

You can find step-by-step details on the entire process, including all the necessary query and code snippets here. Below is a summary of the process.

First, creating an agent is easy. Simply provide some basic information: title, description, system prompt, and the database to serve as the agent’s knowledge graph.

Neo4j Aura Agent 04

Neo4j

Users can autogenerate an initial agent out of the box that they can further edit and tailor by providing a system prompt. The Aura agent will then use the graph schema and other metadata to configure the agent and its retrieval tools.

Neo4j Aura Agent 05

Neo4j

Neo4j Aura Agent provides three basic tool types, aligning the GraphRAG categories discussed above:

  1. Vector similarity search
  2. Text2Cypher
  3. Cypher templates
Neo4j Aura Agent 06

Neo4j

These three different types of tools can be used in combination by the agent to chain responses together, improving overall accuracy, especially when compared to using just vector search alone. 

The knowledge graph provides an essential structure, allowing Text2Cypher queries to retrieve exactly the right data using the graph schema and user prompt to infer the right patterns. Templatized queries allow for even greater precision by using pre-specified query logic to retrieve exactly the right data. 

When responding to users, Neo4j Aura Agent includes its reasoning. During testing, this can be opened in the response tab. This explains the agent’s reasoning and the tool query logic used. Because the Cypher query language expresses relationship patterns in a human-readable format, it can be translated easily to the user and to downstream AI systems, allowing for improved explainability across the entire AI system.

Neo4j Aura Agent 07

Neo4j

Neo4j Aura Agent can deploy into a production setting automatically, and this is perhaps one of its most significant benefits. Once you are satisfied with the agent’s performance in the UI testing playground, you can select a publicly available endpoint. Doing this will automatically deploy the agent to a secure endpoint that is authenticated via an API key/secret pair.

Neo4j Aura Agent 08

Neo4j

Neo4j Aura Agent provides managed LLM inference and embeddings for agent runtime, making it easy for users and removing the need to maintain separate accounts and provide API credentials from other model providers. 

Once deployed, the Aura agent can be called directly or wrapped in a Model Context Protocol (MCP) server to invoke other downstream AI systems and applications.

Example: Calling through API

url --request POST "$ENDPOINT_URL" 
 -H 'Content-Type: application/json' 
 -H 'Accept: application/json' 
 -H "Authorization: Bearer $BEARER_TOKEN" 
 -d '{"input": "find Motorola contracts"}' --max-time 60 
 | jq .

{
  "content": [
    {
      "thinking": "The user is asking to find contracts related to a specific organization, "Motorola". The `identify_contracts_for_organization` tool is designed for this purpose, taking the organization name as input.",
      "type": "thinking"
    },
    {
      "id": "fdfa4d22-334d-44d1-861d-749f436097de",
      "input": {
        "organization_name": "Motorola"
      },
      "name": "identify_contracts_for_organization",
      "type": "cypher_template_tool_use"
    },
    {
      "output": {
        "keys": [
          "contract_id",
          "agreement_type",
          "contract_name",
          "effective_date",
          "renewal_term",
          "expiration_date",
          "party_names",
          "party_roles",
          "party_incorporated_countries"
        ],
        "records": [
          {
            "agreement_type": "Intellectual Property Agreement",
            "contract_id": 18,
            "contract_name": "Intellectual Property Agreement",
            "effective_date": "2014-04-14",
            "expiration_date": "unable to determine",
            "party_incorporated_countries": [
              "United States",
              "United States"
            ],
            "party_names": [
              "Motorola Solutions, Inc.",
              "Zebra Technologies Corporation"
            ],
            "party_roles": [
              "Seller",
              "Purchaser"
            ],
            "renewal_term": "unable to determine"
          }
        ],
        "summary": {}
      },
      "tool_use_id": "fdfa4d22-334d-44d1-861d-749f436097de",
      "type": "cypher_template_tool_result"
    },
    {
      "thinking": "I have already identified the contracts associated with Motorola using the `identify_contracts_for_organization` tool. The output provides a list of contracts with relevant details, directly answering the original query.",
      "type": "thinking"
    },
    {
      "text": "Here are the contracts associated with Motorola:nn| contract_id | contract_name | agreement_type | effective_date | expiration_date | party_names | party_roles | party_incorporated_countries |n|---|---|---|---|---|---|---|---|n| 18 | Intellectual Property Agreement | Intellectual Property Agreement | 2014-04-14 | unable to determine | Motorola Solutions, Inc., Zebra Technologies Corporation | Seller, Purchaser | United States, United States |",
      "type": "text"
    }
  ],
  "end_reason": "FINAL_ANSWER_PROVIDED",
  "role": "assistant",
  "status": "SUCCESS",
  "type": "message",
  "usage": {
    "candidates_token_count": 226,
    "prompt_token_count": 7148,
    "thoughts_token_count": 301,
    "total_token_count": 7675
  }

Example: Wrapping in an MCP server and calling through Claude Desktop

Neo4j Aura Agent 09

Neo4j

Connecting agents to knowledge graphs

The promise of knowledge graphs for AI agents has been clear for some time—better accuracy, transparency in reasoning, and more reliable outputs. But turning that promise into reality has been another story entirely. The complexity of building knowledge graphs, configuring GraphRAG retrieval, and deploying production-ready agents has kept these benefits out of reach for many teams.

Neo4j Aura Agent represents an important first step in changing that. By providing a unified platform that connects agents to knowledge graphs in minutes rather than months, it removes much of the ambiguity that has held teams back. The low-code tool creation simplifies how agents achieve accuracy through vector search, Text2Cypher, and query templates working in concert. The built-in reasoning response and human-readable Cypher queries make explainability straightforward rather than aspirational. And the progression from playground testing to secure API deployment with managed inference eliminates the operational friction that often derails AI projects before they reach production.

This is not the final word on knowledge graph-powered agents, but it is a critical step forward. As organizations continue exploring how to make their AI systems more accurate, explainable, and governable, platforms that reduce complexity while preserving power will be essential. Neo4j Aura Agent points the way toward that future, making sophisticated GraphRAG capabilities accessible to teams ready to move beyond vector search and rigid knowledge management systems.

New Tech Forum provides a venue for technology leaders—including vendors and other outside contributors—to explore and discuss emerging enterprise technology in unprecedented depth and breadth. The selection is subjective, based on our pick of the technologies we believe to be important and of greatest interest to InfoWorld readers. InfoWorld does not accept marketing collateral for publication and reserves the right to edit all contributed content. Send all inquiries to doug_dineley@foundryco.com.

Go to Source

Author: