# Neo4j Context Graph

A one-click Render template to scaffold domain-specific Neo4j graph applications with your chosen agent framework in minutes.

- Repository: https://github.com/render-examples/create-context-graph/tree/main
- Demo: https://ccg-demo-frontend.onrender.com/
- Stack: docker, python, fastapi, nextjs
- Tags: ai, ai-agent
- URL: https://render.com/templates/neo4j-context-graph

## Why deploy Neo4j Context Graph on Render?

Neo4j Context Graph is a CLI scaffolding tool that generates full-stack applications with AI agents backed by Neo4j graph databases for contextual memory. It solves the problem of quickly bootstrapping domain-specific AI chat applications that need persistent, relationship-aware memory (entity extraction, multi-turn conversations) without manual setup of the backend, frontend, and graph infrastructure.

This template wires together a Neo4j graph database, FastAPI backend with AI agent, Next.js frontend, and seed data service—all pre-configured to communicate with the correct connection strings and environment variables. Instead of manually setting up Neo4j, configuring the agent memory system, and debugging service-to-service networking, you get a working context graph application with one click. Render's service discovery handles the internal routing between your four services automatically, and you're only two environment variables away from a running demo.

## Architecture

```mermaid
flowchart LR
    classDef default fill:#1a1a2e,stroke:#a78bfa,color:#fff

    User([User])
    Anthropic([Anthropic API])
    
    Frontend[ccg-demo-frontend]
    Backend[ccg-demo-backend]
    Seed[[ccg-demo-seed]]
    Neo4j((ccg-demo-neo4j))
    
    User -->|"browses"| Frontend
    Frontend -->|"API calls"| Backend
    Backend -->|"LLM requests"| Anthropic
    Backend -->|"queries"| Neo4j
    Seed -->|"seeds data"| Neo4j
```

## What you can build

After deploying, you'll have a full-stack app with a chat interface connected to a Neo4j knowledge graph, where an AI agent can query domain-specific entities and relationships you select during setup. The frontend includes graph visualization, a document browser, and real-time tool call tracing, while the backend exposes a FastAPI service with agent memory for multi-turn conversations. You can start with synthetic demo data for any of 22 industry domains or connect your own data sources like GitHub, Slack, or Notion.

## Key features

- *Interactive CLI scaffolding*: Wizard-driven project generator that produces a complete full-stack app with FastAPI backend and Next.js frontend based on your selected domain and agent framework.
- *22 pre-built domain ontologies*: Industry-specific schemas for healthcare, financial services, manufacturing, and 19 other verticals with constraints, indexes, GDS projections, and tailored Cypher queries.
- *Agent memory integration*: Built-in neo4j-agent-memory v0.1.0 providing multi-turn conversation persistence with automatic entity extraction and preference detection.
- *SaaS data connectors*: Import data from GitHub, Slack, Gmail, Jira, Notion, Google Calendar, and Salesforce directly into the Neo4j knowledge graph.
- *MCP server generation*: Optional --with-mcp flag generates Model Context Protocol server config enabling Claude Desktop to query the same knowledge graph.

## Use cases

- Healthcare developer builds patient-provider chat agent with automatic entity extraction
- Data journalist scaffolds investigation graph connecting sources, claims, and evidence
- Product manager imports Jira and Notion to visualize feature dependencies
- Wildlife researcher creates sighting tracker with habitat relationships and camera data

## What's included

| Service | Type | Purpose |
|---------|------|---------|
| neo4j-data | Private Service | Application service |
| ccg-demo-backend | Web Service | Handles API requests and business logic |
| ccg-demo-frontend | Web Service | Serves the user interface |
| ccg-demo-seed | Cron Job | Application service |

## Next steps

1. Open http://localhost:3000 and ask the agent a domain-specific question like 'Show me recent patients' or 'What transactions happened today' — You should see a streaming response with tool calls appearing in the Timeline panel and relevant entities highlighted in the graph visualization
2. Double-click an entity node in the graph visualization panel — You should see the node expand to reveal its connected relationships and neighbors, with a property panel showing entity details on the right
3. Open the Document Browser tab and click on any generated document — You should see the full document content (discharge summary, trade confirmation, or lab report) with extracted entities highlighted and linked to the knowledge graph

## Resources

- [Create Context Graph official site](https://create-context-graph.dev/)
