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 supports 8 agent frameworks. The framework choice only affects backend/app/agent.py in the generated project — everything else (FastAPI backend, Neo4j client, frontend, data, and schema) stays the same.

Choosing a framework

Interactive wizard

Run the CLI and select your framework at the relevant step:
uvx create-context-graph my-app

CLI flag

uvx create-context-graph my-app --domain healthcare --framework langgraph
The --framework flag accepts one of the eight keys listed below.

Supported frameworks

Key: pydanticaiType-safe agents with @agent.tool decorators and dependency injection via RunContext. PydanticAI validates tool inputs and outputs against Pydantic models. Full token-by-token text streaming via agent.run_stream().
uvx create-context-graph my-app \
  --domain healthcare \
  --framework pydanticai \
  --demo-data
Required API key: ANTHROPIC_API_KEYStreaming: Full (token-by-token text + real-time tool calls)

Framework comparison

FrameworkKeyAPI keyStreaming
PydanticAIpydanticaiANTHROPIC_API_KEYFull
Claude Agent SDKclaude-agent-sdkANTHROPIC_API_KEYFull
OpenAI Agents SDKopenai-agentsOPENAI_API_KEYFull
LangGraphlanggraphANTHROPIC_API_KEYFull
CrewAIcrewaiANTHROPIC_API_KEYTools only
StrandsstrandsANTHROPIC_API_KEYTools only
Google ADKgoogle-adkGOOGLE_API_KEYFull
Anthropic Toolsanthropic-toolsANTHROPIC_API_KEYFull
Full streaming means token-by-token text delivery plus real-time tool call visualization. Tools only means tool call events stream in real-time, but the text response arrives all at once after the agent finishes. All frameworks use the same SSE (Server-Sent Events) protocol.

What changes between frameworks

Only one file varies between frameworks: backend/app/agent.py. This file contains:
  • Agent initialization and model configuration
  • Tool definitions generated from your domain’s agent_tools ontology
  • The handle_message() async function that the FastAPI routes call
  • For full-streaming frameworks: the handle_message_stream() async function for SSE text streaming
Each framework template uses idiomatic patterns for that framework (decorators, classes, registries) but exposes the same interface to the rest of the application.

What stays the same

Regardless of which framework you choose, the generated project always includes:
  • FastAPI backend (main.py, config.py, routes.py, models.py) — identical across all frameworks
  • Neo4j clients (context_graph_client.py, gds_client.py, vector_client.py) — shared graph access layer
  • Frontend (Next.js + Chakra UI v3 + NVL graph visualization) — framework-agnostic
  • Data and schema (cypher/schema.cypher, fixture data, ontology YAML)
  • Infrastructure (docker-compose.yml, Makefile, .env)

Generating a second project with a different framework

To compare frameworks side by side, re-run the CLI with a new output directory:
uvx create-context-graph my-app-langgraph --domain healthcare --framework langgraph
uvx create-context-graph my-app-crewai    --domain healthcare --framework crewai
The two projects share the same schema, data, and frontend. Only agent.py and the agent-specific dependencies in pyproject.toml differ.

Framework-specific dependencies

The generated backend/pyproject.toml includes only the dependencies needed for the chosen framework. Examples:
  • pydanticaipydantic-ai
  • langgraphlanggraph, langchain-anthropic
  • strandsstrands-agents[anthropic]
  • google-adkgoogle-adk, nest-asyncio
All frameworks share common dependencies: fastapi, uvicorn, neo4j, pydantic, and python-dotenv.
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 project automatically upgrades to OpenAI text-embedding-3-small embeddings.

Build docs developers (and LLMs) love