Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/neo4j-labs/create-context-graph/llms.txt

Use this file to discover all available pages before exploring further.

Create Context Graph is like create-next-app, but for AI agents with graph memory. Give it an industry domain and an agent framework, and it generates a complete full-stack application in under 5 minutes: a FastAPI backend with a configured AI agent, a Next.js frontend with streaming chat and interactive graph visualization, a Neo4j schema tailored to your domain, and realistic demo data ready to query.

Quick start

Get a running context graph app in under 5 minutes

Domain catalog

Browse all 22 built-in industry domains

Framework comparison

Compare all 8 supported agent frameworks

CLI reference

Every flag and option, with defaults and examples

Key features

22 built-in domains

Healthcare, financial services, real estate, manufacturing, software engineering, wildlife management, and 16 more. Each ships with a complete ontology, agent tools, demo scenarios, and fixture data.

8 agent frameworks

PydanticAI, Claude Agent SDK, OpenAI Agents SDK, LangGraph, CrewAI, Strands, Google ADK, and Anthropic Tools. Pick the framework you know, or try something new.

Streaming chat

Responses stream token-by-token via Server-Sent Events. Tool calls appear as a live timeline with spinner indicators as each executes. The graph visualization updates incrementally after each tool completes.

Interactive graph visualization

An NVL-powered graph explorer with schema view, double-click to expand nodes, drag and zoom, node hover tooltips, and a property detail panel. Clicking any node surfaces an “Ask about this” button that sends a chat query directly.

Three-memory architecture

Every generated agent uses short-term memory (conversation history), long-term memory (entity knowledge graph), and reasoning memory (decision traces with full provenance). Powered by neo4j-agent-memory.

Custom domains

Describe your domain in plain English and the LLM generates a complete ontology with entity types, relationships, agent tools, and demo scenarios. Or write your own YAML definition from scratch.

SaaS connectors

Import real data from GitHub, Slack, Jira, Notion, Gmail, Google Calendar, or Salesforce to populate your graph instead of (or alongside) synthetic demo data.

Rich demo data

Each domain ships with LLM-generated fixture data: 80–90 entities, 25+ professional documents (discharge summaries, trade confirmations, lab reports), and 3–5 multi-step decision traces. Loaded via make seed.

What gets generated

Running create-context-graph produces a complete project directory:
my-app/
├── backend/
│   └── app/
│       ├── main.py                  # FastAPI application
│       ├── agent.py                 # AI agent (framework-specific)
│       ├── routes.py                # REST API endpoints
│       ├── models.py                # Pydantic models from ontology
│       ├── context_graph_client.py  # Neo4j CRUD + memory
│       ├── gds_client.py            # Graph Data Science algorithms
│       └── vector_client.py         # Vector search
├── frontend/
│   └── components/
│       ├── ChatInterface.tsx        # Streaming chat with SSE
│       ├── ContextGraphView.tsx     # Interactive NVL graph
│       ├── DecisionTracePanel.tsx   # Reasoning trace viewer
│       └── DocumentBrowser.tsx     # Document browser
├── cypher/
│   ├── schema.cypher               # Constraints and indexes
│   └── gds_projections.cypher      # GDS algorithm config
├── data/
│   ├── ontology.yaml               # Domain ontology definition
│   └── fixtures.json               # Pre-generated sample data
├── .env                            # Neo4j + API key configuration
├── docker-compose.yml              # Local Neo4j (Docker mode)
├── Makefile                        # install, seed, start, reset, test
└── README.md                       # Domain-specific documentation
The FastAPI backend exposes a POST /chat/stream endpoint for Server-Sent Events streaming and a GET /expand endpoint for graph neighbor queries. The Next.js frontend connects to these at runtime — no extra configuration needed.

Architecture overview

The CLI reads a domain ontology YAML, merges it with a base POLE+O schema, and renders Jinja2 templates into a complete project. Only the agent implementation differs between frameworks — the FastAPI layer, Neo4j client, and frontend are identical across all 8 options.

Supported domains

22 industry domains, each with a purpose-built ontology, sample data, agent tools, and demo scenarios:
DomainKey entities
Financial ServicesAccount, Transaction, Decision, Policy
HealthcarePatient, Provider, Diagnosis, Treatment
Retail & E-CommerceCustomer, Product, Order, Review
ManufacturingMachine, Part, WorkOrder, Supplier
Scientific ResearchResearcher, Paper, Dataset, Grant
GenAI / LLM OpsModel, Experiment, Prompt, Evaluation
Agent MemoryAgent, Conversation, Memory, ToolCall
GamingPlayer, Character, Quest, Guild
Personal KnowledgeNote, Contact, Project, Topic
Digital TwinAsset, Sensor, Reading, Alert
Product ManagementFeature, Epic, UserPersona, Metric
Real EstateProperty, Listing, Agent, Inspection
Vacation & HospitalityResort, Booking, Guest, Activity
Oil & GasWell, Reservoir, Equipment, Permit
Data JournalismSource, Story, Claim, Investigation
Trip PlanningDestination, Hotel, Activity, Itinerary
GIS & CartographyFeature, Layer, Survey, Boundary
Wildlife ManagementSpecies, Sighting, Habitat, Camera
ConservationSite, Species, Program, Funding
Golf & Sports ManagementCourse, Player, Round, Tournament
Software EngineeringRepository, Issue, PR, Deployment
HospitalityHotel, Room, Reservation, Service
Don’t see your industry? Pass --custom-domain "your description" and the LLM generates a complete ontology from scratch.

Supported agent frameworks

FrameworkStreamingRequired API key
PydanticAIFull (token-by-token)ANTHROPIC_API_KEY
Claude Agent SDKFull (token-by-token)ANTHROPIC_API_KEY
OpenAI Agents SDKFull (token-by-token)OPENAI_API_KEY
LangGraphFull (token-by-token)ANTHROPIC_API_KEY
CrewAITool events + text at endANTHROPIC_API_KEY
StrandsTool events + text at endANTHROPIC_API_KEY
Google ADKFull (token-by-token)GOOGLE_API_KEY
Anthropic ToolsFull (token-by-token)ANTHROPIC_API_KEY
Conversation memory uses local sentence-transformers embeddings by default — no OPENAI_API_KEY required. If you set OPENAI_API_KEY in your .env, the generated app automatically upgrades to OpenAI text-embedding-3-small.

What’s next

Quick start

Scaffold your first context graph app step by step

Why context graphs?

How graph memory differs from RAG and why it matters

Neo4j setup options

Aura, Docker, or neo4j-local — pick the right option

Custom domains

Generate a full ontology from a plain-English description

Build docs developers (and LLMs) love