Generated banner for Create Context Graph
Generated logo for Create Context Graph

Create Context Graph

Memory frameworkOfficial neo4j-labs project

Created by neo4j-labs

Published in neo4j-labs/create-context-graph. Publisher page

747 GitHub stars

What it is

AI agents with graph based reasoning memory, scaffolded in seconds
— the description by neo4j-labs

AutoGineer overview, from the brain’s own files

Create Context Graph is an interactive scaffolding tool designed to accelerate the development of AI agents that utilize graph-based memory. By walking developers through a wizard, it generates a complete, domain-specific application stack including a FastAPI backend, a Next.js frontend with interactive graph visualization, and a configured AI agent. The tool supports multiple agent frameworks and offers a choice between a hosted memory backend (NAMS) or a self-hosted Neo4j instance. It includes built-in support for importing data from various SaaS platforms, generating domain-specific ontologies, and creating MCP servers for integration with Claude Desktop.

How it works

Memory model: Hybrid

AutoGineer overview, from the brain’s own files

The tool operates as a CLI that uses Jinja2 templates to generate project code based on a selected industry domain and agent framework. It creates a FastAPI backend for agent logic and a Next.js frontend for visualization. Memory is managed either via the hosted NAMS service or a self-hosted Neo4j database. The system supports data ingestion from various connectors and can generate domain-specific ontologies, schemas, and agent tools automatically.

Folders
FolderRoleFiles
.githubagent-config2
docsdocs105
scriptsscripts2
srcsource-code168
teststests48
.serenafolder1
npm-wrapperfolder3

The agent reads

The agent writes

Requirements

Runtimes: Python >=3.11

Databases: Neo4j

API keys (by name): ANTHROPIC_API_KEY, GOOGLE_API_KEY, LINEAR_API_KEY, MEMORY_API_KEY, OPENAI_API_KEY

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Google Antigravity, Kiro, OpenCode, Amp, Roo Code, Cline, JetBrains Junie, Devin (ex-Windsurf)

Set it up

  1. This brain runs code automatically: 1 script. Review Makefile before opening the folder in Claude Code. No step below turns a hook on for you.

    • Makefile: uv venv && uv pip install -e ".[dev]"
  2. Not scanned by AutoGineerIts dependencies are installed by pip or uv when you run it and were not scanned by AutoGineer (7 declared). https://pypi.org/project/create-context-graph/
  3. Created by neo4j-labs. Published in neo4j-labs/create-context-graph. Licence: Apache License 2.0.

Usage

AutoGineer overview, from the brain’s own files

  • Scaffold a new project using the interactive CLI wizard.
  • Generate a project with a specific domain and agent framework via CLI flags.
  • Connect SaaS data sources like GitHub, Slack, or Notion to populate the graph.
  • Configure the memory backend for either hosted NAMS or self-hosted Neo4j.
  • Generate an MCP server configuration for Claude Desktop integration.
  • Re-import data or seed the graph using generated make commands.
“uvx create-context-graph my-app --domain healthcare --framework strands --nams-api-key sk-nams-...”
Generates a healthcare-focused agent application using the Strands framework and hosted NAMS memory.
“uvx create-context-graph my-app --domain personal-knowledge --framework pydanticai --self-hosted --connector github”
Generates a personal knowledge application with self-hosted Neo4j, pre-populated with GitHub data.

Documentation by neo4j-labs

Create Context Graph

This is an experimental Neo4j Labs project and not part of Neo4j's supported product lineup. See the Neo4j Labs disclaimer.

Image: Neo4j Labs Image: Docs

Neo4j Labs Project — This project is part of Neo4j Labs. It is maintained by Neo4j staff and the community, but not officially supported. For help, use GitHub Issues or the Neo4j Community Forum.

Interactive CLI scaffolding tool that generates fully-functional, domain-specific context graph applications. Pick your industry domain, pick your agent framework, and get a complete full-stack app in under 5 minutes.

<p align="center"> <img src="docs/static/img/app-three-panel.png" alt="Generated app: chat interface, graph visualization, and document browser" width="800" /> </p>

# Python — NAMS-default (hosted memory)
uvx create-context-graph my-app --domain healthcare --framework strands --nams-api-key sk-nams-...

# Self-hosted Neo4j with full demo fixtures
uvx create-context-graph my-app --domain healthcare --framework pydanticai --self-hosted --demo

# Node.js / interactive wizard
npx create-context-graph

What It Does

Create Context Graph walks you through an interactive wizard and generates a complete project:

  • FastAPI backend with an AI agent configured for your domain, powered by neo4j-agent-memory v0.4 for multi-turn conversations with automatic entity extraction. Memory backend is configurable: hosted NAMS (default) or self-hosted bolt Neo4j (--self-hosted).

  • LiteLLM provider injection for the memory layer — pick any LLM + embedding provider via MEMORY_LLM / MEMORY_EMBEDDING env vars (Anthropic, OpenAI, Bedrock, Vertex AI, Ollama, Groq, Together, …). Native adapters resolve first; everything else routes through LiteLLM.

  • Next.js + Chakra UI v3 frontend with streaming chat (Server-Sent Events), real-time tool call visualization (Timeline with live spinners), interactive graph visualization (schema view, double-click expand, drag/zoom, property panel), entity detail panel, document browser, and decision trace viewer

  • Neo4j schema with domain-specific constraints, indexes, and GDS projections (self-hosted mode)

  • Rich demo data — LLM-generated entities, relationships, professional documents (discharge summaries, trade confirmations, lab reports), and multi-step decision traces

  • SaaS data import — connect GitHub, Slack, Gmail, Jira, Notion, Google Calendar, Salesforce, Linear, Google Workspace, Claude Code, Claude AI, ChatGPT, or local files

  • Custom domains — describe your domain in plain English and the LLM generates a complete ontology

  • Domain-specific agent tools with Cypher queries tailored to your industry

  • MCP server for Claude Desktop — optionally generates an MCP server config so Claude Desktop can query the same knowledge graph (--with-mcp)

  Creating context graph application...

  Domain:     Wildlife Management
  Framework:  PydanticAI
  Data:       Demo (synthetic)
  Neo4j:      Docker (neo4j://localhost:7687)

  [1/6] Generating domain ontology...          ✓
  [2/6] Creating project scaffold...           ✓
  [3/6] Configuring agent tools & system prompt...  ✓
  [4/6] Generating synthetic documents (25 docs)... ✓
  [5/6] Writing fixture data...                ✓
  [6/6] Bundling project...                    ✓

  Done! Your context graph app is ready.

  cd my-app
  make install && make start

Quick Start

There are two flows depending on what you want:

  • NAMS (default) — hosted memory backend. No Neo4j to install or operate. Graph starts empty; the agent populates it as you chat.

  • Self-hosted (--self-hosted) — bolt Neo4j you run yourself (Aura, Docker, neo4j-local). Full demo fixtures available via make seed.

Prerequisites
  • Python 3.11+ (with uv recommended)

  • Node.js 18+ (for the frontend)

  • NAMS path: a NAMS API key from memory.neo4jlabs.com

  • Self-hosted path: Neo4j 5+ (Docker, Aura, or local install)

  • Either path: ANTHROPIC_API_KEY for the agent (or OPENAI_API_KEY/GOOGLE_API_KEY depending on framework)

NAMS path (default, hosted memory)
uvx create-context-graph my-app \
  --domain healthcare \
  --framework strands \
  --nams-api-key sk-nams-...

cd my-app
echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .env   # Strands needs Anthropic
make install
make start

Open http://localhost:3000. Graph starts empty — chat with the agent and entities populate via auto-extraction.

Self-hosted path (bolt Neo4j + full demo data)
uvx create-context-graph my-app \
  --domain healthcare \
  --framework pydanticai \
  --self-hosted \
  --demo

cd my-app
echo 'ANTHROPIC_API_KEY=sk-ant-...' >> .env
make install
make docker-up   # or: make neo4j-start  (for neo4j-local)
make seed
make start

Open http://localhost:3000. Pre-populated graph with ~85 entities, 180 relationships, 25 documents, and decision traces.

Other scaffold patterns
# Interactive wizard (asks 6 prompts, autocomplete domain picker)
uvx create-context-graph

# Custom domain from description
uvx create-context-graph my-app \
  --custom-domain "veterinary clinic management" \
  --framework pydanticai \
  --self-hosted --demo \
  --anthropic-api-key $ANTHROPIC_API_KEY

# Import real data from SaaS services
uvx create-context-graph my-app \
  --domain personal-knowledge --framework pydanticai --self-hosted \
  --connector github --connector slack

# With MCP server for Claude Desktop (works on either backend)
uvx create-context-graph my-app \
  --domain healthcare --framework strands \
  --nams-api-key sk-nams-... --with-mcp

# Pick a specific LiteLLM provider for memory entity extraction
uvx create-context-graph my-app \
  --domain healthcare --framework strands --nams-api-key sk-nams-... \
  --memory-llm bedrock/anthropic.claude-3-haiku-20240307-v1:0 \
  --memory-embedding sentence-transformers/all-MiniLM-L6-v2
Explore the running app
NAMS write-path caveats (v0.4)

The NAMS REST API has a narrower write surface than bolt Cypher. The CLI and the generated import_data.py work around it with a hybrid write shape:

  • Relationships encoded as ccg-edges YAML blocks inside each source entity's description. The frontend graph view parses them out and renders edges; a future migration replays them as native edges when NAMS adds add_relationship.

  • Entity properties collapse into description as a markdown block (NAMS REST accepts only name/type/description).

  • Documents are dual-tracked — long_term.add_entity(type=OBJECT) (queryable, matches bolt :Document) AND short_term.add_message(role="document") (extraction fuel).

  • No preferences or facts via REST. auto_preferences forced off on NAMS.

  • GDS endpoints and arbitrary Cypher writes return 501 on NAMS.

For native graph edges + GDS + arbitrary Cypher, use --self-hosted --demo.

Supported Domains

27 industry domains, each with a purpose-built ontology, sample data, agent tools, and demo scenarios:

DomainKey EntitiesDomainKey Entities
Financial ServicesAccount, Transaction, Decision, PolicyReal EstateProperty, Listing, Agent, Inspection
HealthcarePatient, Provider, Diagnosis, TreatmentVacation & HospitalityResort, Booking, Guest, Activity
Retail & E-CommerceCustomer, Product, Order, ReviewOil & GasWell, Reservoir, Equipment, Permit
ManufacturingMachine, Part, WorkOrder, SupplierData JournalismSource, Story, Claim, Investigation
Scientific ResearchResearcher, Paper, Dataset, GrantTrip PlanningDestination, Hotel, Activity, Itinerary
GenAI / LLM OpsModel, Experiment, Prompt, EvaluationGIS & CartographyFeature, Layer, Survey, Boundary
Agent MemoryAgent, Conversation, Memory, ToolCallWildlife ManagementSpecies, Sighting, Habitat, Camera
GamingPlayer, Character, Quest, GuildConservationSite, Species, Program, Funding
Personal KnowledgeNote, Contact, Project, TopicGolf & Sports MgmtCourse, Player, Round, Tournament
Digital TwinAsset, Sensor, Reading, AlertSoftware EngineeringRepository, Issue, PR, Deployment
Product ManagementFeature, Epic, UserPersona, MetricHospitalityHotel, Room, Reservation, Service
Options IntelligenceUnderlying, OptionsContract, Regime, KeyLevelLegalCase, Matter, Contract, Filing
EducationStudent, Instructor, Course, AssessmentCybersecurityAsset, Vulnerability, Alert, Incident
GovernmentAgency, Program, Policy, Regulation
# List all available domains
create-context-graph --list-domains

Custom domains: Don't see your industry? Select "Custom (describe your domain)" in the wizard or use --custom-domain "your description". The LLM generates a complete ontology with entity types, relationships, agent tools, and more.

SaaS Data Connectors

<p align="center"> <img src="docs/static/img/connector-data-flow.png" alt="SaaS connector data flow into Neo4j knowledge graph" width="700" /> </p>

Import real data from your existing tools instead of (or in addition to) synthetic demo data:

ServiceWhat's ImportedAuth
GitHubIssues, PRs, commits, contributorsPersonal access token
NotionPages, databases, usersIntegration token
JiraIssues, sprints, usersAPI token
SlackChannel messages, threads, usersBot OAuth token
GmailEmails (last 30 days)Google Workspace CLI or OAuth2
Google CalendarEvents, attendees (last 90 days)Google Workspace CLI or OAuth2
SalesforceAccounts, contacts, opportunitiesUsername/password
LinearIssues, projects, cycles, teams, users, labels, comments, milestones, initiatives, attachments + decision traces from historyPersonal API key
Google WorkspaceDrive files, comment threads (as decision traces), revisions, Drive Activity, Calendar events, Gmail metadataGoogle OAuth 2.0
Claude CodeSession history, messages, tool calls, files, decisions, preferences, errorsNone (local files)
Claude AIConversations, messages, tool calls, thinking traces from Claude AI web/app exportNone (local file)
ChatGPTConversations, messages, tool results from ChatGPT data exportNone (local file)

The Google Workspace connector extracts resolved comment threads from Google Docs as first-class decision traces — capturing the question, deliberation, resolution, and participants. Combined with Linear, it provides the full decision lifecycle: from meeting discussion to code execution.

The Claude Code connector reads your local session history from ~/.claude/projects/ — no API keys needed. It extracts decision traces from user corrections and error-resolution cycles, identifies developer preferences from explicit statements and behavioral patterns, and automatically redacts secrets before storage.

The Claude AI and ChatGPT connectors import your conversation exports directly from the official data export features. Export your data from Settings, pass the .zip file to the CLI with --import-type claude-ai or --import-type chatgpt, and get a fully populated context graph from your real conversations — no API keys needed.

Connectors run at scaffold time to populate initial data. They're also generated into your project so you can re-import with make import:

cd my-app
make import            # Re-import from connected services
make import-and-seed   # Import and seed into Neo4j

Agent Frameworks

Select your preferred agent framework at project creation time:

FrameworkDescription
PydanticAIStructured tool definitions with Pydantic models and RunContext
Claude Agent SDKAnthropic tool-use with agentic loop
OpenAI Agents SDK@function_tool decorators with Runner.run()
LangGraphStateful graph-based agent workflow with create_react_agent()
CrewAIMulti-agent crew with role-based tools
StrandsTool-use agents with Anthropic model
Google ADKGemini agents with FunctionTool calling
Anthropic ToolsModular tool registry with Anthropic API agentic loop

All frameworks share the same FastAPI HTTP layer, Neo4j client, and frontend. Only the agent implementation differs. "Full streaming" means token-by-token text + real-time tool calls. "Tool streaming" means real-time tool calls with text delivered at the end.

Note on memory providers: Conversation memory uses local sentence-transformers/all-MiniLM-L6-v2 embeddings by default — no API key required. Override with MEMORY_EMBEDDING (LiteLLM provider string) for OpenAI, Vertex AI, Bedrock, or others. The entity-extraction LLM defaults to anthropic/claude-haiku-4-5 when ANTHROPIC_API_KEY is set, or openai/gpt-4o-mini if only OPENAI_API_KEY is set. Override with MEMORY_LLM for full control. See Configure Memory Providers.

Generated Project Structure

<p align="center"> <img src="docs/static/img/ontology-pipeline.png" alt="From domain YAML through Jinja2 templates to generated code" width="750" /> </p>

A single domain YAML drives the entire generated application — schema, models, agent tools, and visualization — through the Jinja2 template engine.

my-app/
├── backend/
│   ├── app/
│   │   ├── main.py                # FastAPI application
│   │   ├── agent.py               # AI agent (framework-specific)
│   │   ├── config.py              # Settings from .env
│   │   ├── routes.py              # REST API endpoints
│   │   ├── models.py              # Pydantic models (from ontology)
│   │   ├── context_graph_client.py # Neo4j CRUD operations
│   │   ├── memory.py              # Memory integration (MemoryIntegration)
│   │   ├── gds_client.py          # Graph Data Science algorithms
│   │   ├── vector_client.py       # Vector search
│   │   └── connectors/            # SaaS connectors (if selected)
│   ├── scripts/
│   │   ├── generate_data.py       # Data seeding script
│   │   └── import_data.py         # SaaS import script (if connectors selected)
│   └── pyproject.toml
├── frontend/
│   ├── app/                       # Next.js pages
│   ├── components/
│   │   ├── ChatInterface.tsx      # Streaming AI chat (SSE) with real-time tool calls + graph data flow
│   │   ├── ContextGraphView.tsx   # Interactive NVL graph (schema view, expand, drag/zoom, properties)
│   │   ├── DecisionTracePanel.tsx  # Reasoning trace viewer with step details
│   │   ├── DocumentBrowser.tsx    # Document browser with template filtering
│   │   └── Provider.tsx           # Chakra UI v3 provider
│   ├── lib/config.ts              # Domain configuration
│   ├── theme/index.ts             # Chakra theme with domain colors
│   └── package.json
├── cypher/
│   ├── schema.cypher              # Constraints & indexes
│   └── gds_projections.cypher     # GDS algorithm config
├── data/
│   ├── ontology.yaml              # Domain ontology definition
│   └── fixtures.json              # Pre-generated sample data
├── .env                           # Neo4j + API key configuration
├── .env.example                   # Configuration template (tracked in git)
├── .dockerignore                  # Docker build context exclusions
├── docker-compose.yml             # Local Neo4j instance (Docker mode only)
├── Makefile                       # start, seed, reset, install, test, test-connection, lint
├── mcp/                           # MCP server config (only if --with-mcp)
└── README.md                      # Domain-specific documentation (with framework docs + troubleshooting)

CLI Reference

create-context-graph [PROJECT_NAME] [OPTIONS]

Arguments:
  PROJECT_NAME              Project name (optional — auto-generated from domain+framework if omitted)

Options:
  --domain TEXT             Domain ID (e.g., healthcare, gaming)
  --framework TEXT          Agent framework (strands [default], pydanticai, claude-agent-sdk, openai-agents, langgraph, crewai, google-adk, anthropic-tools)
  --self-hosted             Use self-hosted Neo4j (bolt) instead of NAMS hosted memory
  --nams-api-key TEXT       NAMS API key [env: MEMORY_API_KEY] — obtain at https://memory.neo4jlabs.com
  --nams-endpoint TEXT      Override NAMS endpoint URL (default: https://memory.neo4jlabs.com/v1)
  --memory-llm TEXT         LiteLLM provider string for memory entity extraction (e.g. anthropic/claude-haiku-4-5)
  --memory-embedding TEXT   LiteLLM provider string for memory embeddings (e.g. sentence-transformers/all-MiniLM-L6-v2)
  --demo-data               Generate synthetic demo data
  --custom-domain TEXT      Generate custom domain from description (requires --anthropic-api-key)
  --connector TEXT          SaaS connector to enable; repeatable (github, slack, jira, notion, gmail, gcal, salesforce, linear, google-workspace, claude-code, claude-ai, chatgpt)
  --import-type TEXT        Chat history import: claude-ai or chatgpt (requires --import-file)
  --import-file PATH        Path to chat export file (.zip, .json, .jsonl)
  --import-depth TEXT       Import extraction depth: fast (default) or deep
  --import-filter-after TEXT Only import conversations after this date (ISO 8601)
  --import-filter-before TEXT Only import conversations before this date (ISO 8601)
  --import-filter-title TEXT Only import conversations matching title pattern (regex)
  --import-max-conversations INT Max conversations to import, 0=all (default: 0)
  --linear-api-key TEXT    Linear API key (required for --connector linear) [env: LINEAR_API_KEY]
  --linear-team TEXT       Linear team key to filter import (e.g., ENG) [env: LINEAR_TEAM]
  --gws-folder-id TEXT     Google Drive folder ID to scope import [env: GWS_FOLDER_ID]
  --gws-include-comments / --gws-no-comments  Import comment threads (default: on)
  --gws-include-revisions / --gws-no-revisions  Import revision history (default: on)
  --gws-include-activity / --gws-no-activity  Import Drive Activity (default: on)
  --gws-include-calendar   Import Calendar events (default: off)
  --gws-include-gmail      Import Gmail thread metadata (default: off)
  --gws-since TEXT         Import data since date (ISO format, default: 90 days ago)
  --gws-mime-types TEXT    MIME types to include (default: docs,sheets,slides)
  --gws-max-files INT      Maximum files to import (default: 500)
  --claude-code-scope TEXT Import current project or all (default: current)
  --claude-code-project TEXT Explicit project path to import sessions for
  --claude-code-since TEXT Import sessions since date (ISO format)
  --claude-code-max-sessions INT Max sessions to import, 0=all (default: 0)
  --claude-code-content TEXT Content mode: truncated, full, none (default: truncated)
  --with-mcp                Generate MCP server configuration for Claude Desktop
  --mcp-profile TEXT        MCP tool profile: core (6 tools) or extended (16 tools, default)
  --session-strategy TEXT   Memory session strategy: per_conversation (default), per_day, persistent
  --auto-extract/--no-auto-extract  Auto-extract entities from messages (default: on)
  --auto-preferences/--no-auto-preferences  Auto-detect user preferences (default: on)
  --ingest                  Ingest data into Neo4j after generation
  --neo4j-uri TEXT          Neo4j connection URI [env: NEO4J_URI] (--self-hosted only)
  --neo4j-username TEXT     Neo4j username [env: NEO4J_USERNAME] (--self-hosted only)
  --neo4j-password TEXT     Neo4j password [env: NEO4J_PASSWORD] (--self-hosted only)
  --neo4j-aura-env PATH    Path to Neo4j Aura .env file with credentials (--self-hosted only)
  --neo4j-local             Use @johnymontana/neo4j-local for local Neo4j (--self-hosted only)
  --anthropic-api-key TEXT  Anthropic API key for LLM generation [env: ANTHROPIC_API_KEY]
  --openai-api-key TEXT    OpenAI API key for LLM generation [env: OPENAI_API_KEY]
  --google-api-key TEXT    Google/Gemini API key (required for google-adk) [env: GOOGLE_API_KEY]
  --output-dir PATH         Output directory (default: ./<project-name>)
  --demo                    Shortcut for --reset-database --demo-data --ingest
  --reset-database          Clear all Neo4j data before ingesting
  --dry-run                 Preview what would be generated without creating files
  --verbose                 Enable verbose debug output
  --list-domains            List available domains and exit
  --version                 Show version and exit
  --help                    Show help and exit

Context Graph Architecture

<p align="center"> <img src="docs/static/img/architecture-overview.png" alt="Architecture: generation pipeline and runtime components" width="800" /> </p>

Every generated app demonstrates the three-memory-type architecture from neo4j-agent-memory:

<p align="center"> <img src="docs/static/img/memory-architecture.png" alt="Three memory types: short-term, long-term, and reasoning memory in Neo4j" width="700" /> </p>

  • Short-term memory — Conversation history and document content stored as messages

  • Long-term memory — Entity knowledge graph built on the POLE+O model (Person, Organization, Location, Event, Object)

  • Reasoning memory — Decision traces with full provenance: thought chains, tool calls, causal relationships

This is what makes context graphs different from simple RAG — the agent doesn't just retrieve text, it reasons over a structured knowledge graph with full decision traceability.

With --with-mcp, the generated project also includes an MCP server configuration that connects Claude Desktop to the same knowledge graph. This dual-interface architecture means the web app and Claude Desktop share one context graph — entities, conversations, and reasoning traces are available everywhere.

Development

# Clone and install
git clone https://github.com/neo4j-labs/create-context-graph.git
cd create-context-graph
uv venv && uv pip install -e ".[dev]"

# Run tests (no Neo4j or API keys required)
source .venv/bin/activate
pytest tests/ -v               # Fast: 1,177 tests
pytest tests/ -v --slow        # Full: 1,398 tests (includes domain x framework matrix + perf + generated project tests)
pytest tests/ --integration    # Integration tests (requires running Neo4j)

# Test a specific scaffold
create-context-graph /tmp/test-app --domain software-engineering --framework pydanticai --demo-data
Makefile Targets
TargetDescriptionRequirements
make testRun fast unit tests (1,177 tests)None
make test-slowFull suite including matrix + perf + generated project tests (1,398 tests)None
make test-matrixDomain × framework matrix only (176 combos)None
make test-coverageTests with HTML coverage reportNone
make smoke-testE2E smoke tests for 3 key frameworksNeo4j + LLM API keys
make lintRun ruff linterruff
make scaffoldScaffold a test project to /tmp/test-scaffoldNone
make buildBuild Python package (sdist + wheel)None
make docsStart Docusaurus dev serverNode.js
E2E Smoke Tests

The smoke tests scaffold a real project, install dependencies, start the backend, and send chat prompts to verify the full pipeline works end-to-end. Pass --backend nams to test the hosted-memory path (requires MEMORY_API_KEY env); the default bolt exercises self-hosted Neo4j with full demo fixtures:

# Run all 3 smoke tests (requires Neo4j + at least one LLM API key)
make smoke-test

# Or run individual framework tests directly (default: --backend bolt)
python scripts/e2e_smoke_test.py --domain financial-services --framework pydanticai --quick
python scripts/e2e_smoke_test.py --domain real-estate --framework google-adk --quick
python scripts/e2e_smoke_test.py --domain trip-planning --framework strands --quick

# Test against NAMS hosted backend (requires MEMORY_API_KEY env)
python scripts/e2e_smoke_test.py --domain healthcare --framework strands --backend nams --quick

# Test all 27 domains with one framework
python scripts/e2e_smoke_test.py --all-domains --framework pydanticai --quick

# Full mode (all prompts per scenario, not just first)
python scripts/e2e_smoke_test.py --domain healthcare --framework claude-agent-sdk

Required environment variables:

  • NEO4J_URI, NEO4J_USERNAME, NEO4J_PASSWORD — Neo4j connection (Aura, Docker, or local) for --backend bolt

  • MEMORY_API_KEY — NAMS API key for --backend nams

  • ANTHROPIC_API_KEY — for Claude-based frameworks (PydanticAI, Claude Agent SDK, Anthropic Tools, Strands, CrewAI)

  • OPENAI_API_KEY — for OpenAI-based frameworks (OpenAI Agents, LangGraph)

  • GOOGLE_API_KEY — for Google ADK (Gemini)

CI Pipeline

GitHub Actions (.github/workflows/ci.yml) runs automatically:

JobTriggerDescription
testAll pushes + PRsUnit tests on Python 3.11 and 3.12 (1,177 tests including security, doc snippets, frontend logic, NAMS adapter, wizard, route integration)
lintAll pushes + PRsRuff linter on src/ and tests/
matrixPush to main onlyFull suite + 176 domain × framework matrix + perf + generated project tests (1,398 tests)
smoke-testPush to main onlyNeo4j integration tests + E2E for all 8 frameworks (scaffold → install → start → chat)

The smoke-test CI job is gated behind a SMOKE_TESTS_ENABLED repository variable. To enable it:

  1. Go to Settings → Variables → Repository variables and add SMOKE_TESTS_ENABLED = true

  2. Go to Settings → Secrets → Repository secrets and add:

    • NEO4J_URI — e.g., neo4j+s://xxxxx.databases.neo4j.io

    • NEO4J_USERNAME

    • NEO4J_PASSWORD

    • ANTHROPIC_API_KEY

    • OPENAI_API_KEY

    • GOOGLE_API_KEY

The smoke-test job uses fail-fast: false so one framework failure doesn't block the others, and it only runs after the unit test job passes.

The npm package is a thin wrapper that delegates to the Python CLI via uvx, pipx, or python3 -m. It requires Python 3.11+ to be installed.

Automated Publishing (GitHub Actions)

Both packages are published automatically when you push a version tag:

# 1. Update version in pyproject.toml and npm-wrapper/package.json
# 2. Commit the version bump (and any CHANGELOG.md update)
# 3. Tag and push
git tag v0.13.0
git push origin v0.13.0

This triggers a GitHub Actions workflow, release.yml with jobs:

  • publish-pypi — Builds and publishes to PyPI

  • publish-npm — Publishes the npm wrapper to npmjs.com Both use trusted publishing/OIDC.

Version Bumping

Both packages must use the same version. Update in two places:

  1. pyproject.toml → version = "X.Y.Z"

  2. npm-wrapper/package.json → "version": "X.Y.Z"

Note: a job called validate-version-consistency in release.yml ensures that the correct versions exist in both places.

License

Apache-2.0

ROADMAP.md

Roadmap — Create Context Graph

Last updated: March 22, 2026

Overview

Create Context Graph was built in 6 phases. The goal was to go from an empty repository to a published CLI tool that generates domain-specific context graph applications for 22 industry verticals with 8 agent framework options, powered by neo4j-agent-memory for multi-turn conversations.


Phase 1: Core CLI & Template Engine — COMPLETE

Timeline: Weeks 1–3 Status: Done

Built the foundational scaffolding tool: Python package structure, CLI, interactive wizard, template engine, and initial templates.

What was built
  • Python package (src/create_context_graph/) with hatchling build, src layout, entry point via create-context-graph command

  • Click CLI (cli.py) with both interactive and non-interactive (flag-based) modes

  • Interactive wizard (wizard.py) — 7-step flow using Questionary + Rich: project name, data source, domain selection, agent framework, Neo4j connection, API keys, confirmation

  • ProjectConfig model (config.py) — Pydantic model holding all wizard outputs, computed slug, framework display names and dependency mappings for all 8 planned frameworks

  • Domain ontology system (ontology.py) — YAML loader with two-layer inheritance (_base.yaml + domain YAML), Pydantic validation models for all ontology sections, code generation helpers (Cypher schema, Pydantic models, NVL visualization config)

  • Jinja2 template engine (renderer.py) — PackageLoader-based renderer with custom filters (snake_case, camel_case, pascal_case, kebab_case), renders full project directory from templates + ontology context

  • 3 initial domain ontologies — Financial Services, Healthcare, Software Engineering (complete with entity types, relationships, document templates, decision traces, demo scenarios, agent tools, system prompts, visualization config)

  • Backend templates — FastAPI main, config, Neo4j client, GDS client, vector search client, Pydantic models, REST routes, pyproject.toml, data generation script, agent stub fallback

  • 2 agent framework templates — PydanticAI (structured tool definitions with RunContext) and Claude Agent SDK (Anthropic tool-use with agentic loop)

  • Frontend templates — Next.js 15 + Chakra UI v3 + NVL: layout, page (3-panel), ChatInterface, ContextGraphView, DecisionTracePanel, Provider, domain config, theme

  • Base templates — .env, Makefile, docker-compose.yml, README.md, .gitignore

  • Cypher templates — Schema constraints/indexes from ontology, GDS graph projections

  • Neo4j connection validator (neo4j_validator.py)

Key design decisions made
  • Templates are domain-agnostic, data-driven — no per-domain template directories; the ontology YAML drives all customization

  • Only agent.py varies by framework; everything else is shared

  • JSX/Python dict literals in templates use {% raw %}...{% endraw %} blocks to avoid Jinja2 conflicts

  • Pre-built fixtures are bundled and copied into every generated project


Phase 2: Domain Expansion & Document Generation — COMPLETE

Timeline: Weeks 4–6 Status: Done

Expanded from 3 domains to 22, built the synthetic data generation pipeline, and created the Neo4j ingestion system.

What was built
  • 19 additional domain ontology YAMLs — All validated and scaffold-tested. Domains: Agent Memory, Conservation, Data Journalism, Digital Twin, Gaming, GenAI/LLM Ops, GIS & Cartography, Golf & Sports Mgmt, Hospitality, Manufacturing, Oil & Gas, Personal Knowledge, Product Management, Real Estate, Retail & E-Commerce, Scientific Research, Trip Planning, Vacation Industry, Wildlife Management

  • Synthetic data generation pipeline (generator.py) — 4-stage pipeline:

    1. Entity seeding — LLM-powered or static fallback, generates 5+ entities per type with properties matching ontology schema

    2. Relationship weaving — Connects entities based on ontology relationship definitions, avoids self-relationships

    3. Document generation — Produces 25+ documents across all template types defined in the ontology (LLM-powered for realistic content, static fallback for offline use)

    4. Decision trace injection — Creates reasoning traces from ontology scenarios with thought/action/observation steps

  • LLM client abstraction — Supports both Anthropic and OpenAI as generation providers, graceful fallback to static data when no API key is available

  • Data ingestion system (ingest.py) — Dual-backend ingestion:

    • Primary: neo4j-agent-memory MemoryClient (long-term entities, short-term documents, reasoning traces — all three memory types)

    • Fallback: Direct neo4j driver when neo4j-agent-memory isn't installed

    • Schema application from generated Cypher

  • Pre-generated fixture files — All 22 domains ship with static fixtures/{domain-id}.json files so projects work immediately without an LLM API key

  • CLI integration — --demo-data flag triggers generation, --ingest flag triggers Neo4j ingestion, --anthropic-api-key enables LLM-powered generation, pre-built fixtures always copied into data/fixtures.json

  • Comprehensive test suite (85 tests, all passing):

    • test_config.py — 10 unit tests for ProjectConfig

    • test_ontology.py — 20 unit tests including parametric validation of all 22 domains

    • test_renderer.py — 18 unit tests for rendering, file structure, framework selection, Python compile verification

    • test_generator.py — 14 unit tests for data generation across 6 domains

    • test_cli.py — 13 integration tests for CLI invocation, 6 domain/framework combinations

Verified
  • All 22 domains load and validate without errors

  • 18/18 domain+framework combinations scaffold successfully (9 domains x 2 frameworks)

  • Generated Python files pass compile() syntax check

  • 85/85 tests pass in 3.4 seconds


Phase 3: Framework Templates & Frontend — COMPLETE

Timeline: Weeks 7–8 Status: Done

Added all 8 agent framework templates, replaced NVL placeholder with real graph visualization, and expanded the test suite.

What was built
  • 6 new agent framework templates — All in templates/backend/agents/, each generating valid Python with domain-specific tools from ontology:

    • OpenAI Agents SDK (openai_agents/) — @function_tool decorators + Runner.run()

    • LangGraph (langgraph/) — @tool + create_react_agent() with ChatAnthropic

    • CrewAI (crewai/) — Agent + Task + Crew with @tool decorator

    • Strands (strands/) — Agent with @tool, Anthropic model

    • Google ADK (google_adk/) — Agent + FunctionTool, Gemini model, async runner

    • MAF (maf/) — Modular tool registry with decorator pattern

  • NVL graph visualization — Replaced placeholder in ContextGraphView.tsx with real @neo4j-nvl/react InteractiveNvlWrapper component: force-directed layout, domain-colored nodes via NODE_COLORS/NODE_SIZES, node click handler, color legend

  • Makefile improvements — Added make test and make lint targets

  • Expanded test suite (103 tests, all passing in 3.78s):

    • TestAllFrameworksRender — 8 parametric tests verifying each framework's agent.py compiles and contains framework-specific imports

    • TestAllFrameworksRender — 8 parametric tests verifying each framework's pyproject.toml contains correct dependencies

    • TestMultipleDomainScaffolds — Expanded from 6 to 8 domain/framework combinations covering all frameworks

Verified
  • All 8 frameworks scaffold, render, and compile without errors

  • All 8 frameworks produce correct pyproject.toml dependencies

  • Each framework's agent.py contains the expected framework marker (import/class name)

  • 103/103 tests pass in 3.78 seconds


Phase 4: SaaS Import & Custom Domains — COMPLETE

Timeline: Weeks 9–10 Status: Done

Implemented SaaS data connectors for 7 services and LLM-powered custom domain generation.

What was built
SaaS data connectors
  • Connectors package (connectors/) — BaseConnector ABC, NormalizedData Pydantic model matching fixture schema, connector registry with @register_connector decorator

  • 7 service connectors, each with authenticate(), fetch(), and get_credential_prompts():

ServiceConnectorAuth MethodDependencies
GitHubgithub_connector.pyPersonal access tokenPyGithub
Notionnotion_connector.pyIntegration tokennotion-client
Jirajira_connector.pyAPI tokenatlassian-python-api
Slackslack_connector.pyBot OAuth tokenslack-sdk
Gmailgmail_connector.pygws CLI or OAuth2google-api-python-client, google-auth-oauthlib
Google Calendargcal_connector.pygws CLI or OAuth2google-api-python-client, google-auth-oauthlib
Salesforcesalesforce_connector.pyUsername/password + security tokensimple-salesforce
  • Google Workspace CLI (gws) integration — Gmail and Google Calendar connectors detect gws on PATH, offer to install via npm if missing, fall back to Python OAuth2

  • OAuth2 local redirect flow (oauth.py) — Temporary HTTP server on random port, browser consent, auth code capture, token exchange

  • Dual-purpose connectors — Run at scaffold time to populate initial data AND generated into the scaffolded project for ongoing make import / make import-and-seed usage

  • Connector templates — 7 standalone connector .py.j2 templates + import_data.py.j2 generated into scaffolded projects (only for selected connectors)

  • Makefile targets — make import and make import-and-seed added to generated projects when SaaS connectors are selected

  • Wizard integration — Checkbox selection of connectors, credential prompts, gws CLI detection and install prompt

  • CLI flags — --connector (multiple) for non-interactive connector selection

  • Optional dependencies — New [connectors] extra in pyproject.toml

Custom domain generation
  • custom_domain.py — LLM-powered domain YAML generation:

    1. Loads _base.yaml + 2 reference domain YAMLs (healthcare, wildlife-management) as few-shot examples

    2. Builds prompt with complete YAML schema specification

    3. Calls LLM (Anthropic/OpenAI) via existing generator.py abstraction

    4. Parses YAML, validates against DomainOntology Pydantic model

    5. On validation failure, retries with error feedback (up to 3 attempts)

    6. Returns (DomainOntology, raw_yaml_string)

  • ontology.py extensions — load_domain_from_yaml_string(), load_domain_from_path(), list_available_domains() now scans ~/.create-context-graph/custom-domains/

  • Wizard integration — Description prompt → LLM generation with spinner → Rich summary table → accept/regenerate/edit → optional save for reuse

  • CLI flag — --custom-domain "description" for non-interactive custom domain generation

  • Renderer support — Custom domain YAML written directly to data/ontology.yaml

  • Persistence — Custom domains saved to ~/.create-context-graph/custom-domains/ and appear in future wizard runs

Bug fixes
  • Fixed cli.py:73 — data_source was always "demo" regardless of flags

Tests added (40 new tests)
  • test_custom_domain.py — 17 tests: YAML string loading, base merge, validation errors, prompt construction, mocked LLM generation (success, retry, max retries), display, save, custom domain listing

  • test_connectors.py — 23 tests: NormalizedData model, merge, registry (7 connectors), credential prompts, mocked fetch for GitHub/Notion/Jira/Slack/Gmail/GCal/Salesforce, OAuth helpers

Verified
  • All 7 connectors register and expose credential prompts

  • Mocked connector fetches return valid NormalizedData

  • Custom domain generation succeeds with mocked LLM

  • Custom domain retry loop works on validation failure

  • 182/182 tests pass in 5.2 seconds


Phase 5: Polish, Testing & Launch — COMPLETE

Timeline: Weeks 11–12 Status: Done

Prepared for public release with Docusaurus documentation, Neo4j Labs compliance, enhanced testing, and version 0.2.0.

What was built
Docusaurus documentation site
  • Docusaurus 3.x site in docs/ with TypeScript config, Diataxis-organized sidebar

  • 11 documentation pages following the Diataxis framework:

    • Tutorials: Your First Context Graph App, Customizing Your Domain Ontology

    • How-To Guides: Import Data from SaaS Services, Add a Custom Domain, Switch Agent Frameworks

    • Reference: CLI Options & Flags, Ontology YAML Schema, Generated Project Structure

    • Explanation: How Domain Ontologies Work, Why Context Graphs Need All Three Memory Types

  • GitHub Pages deployment via .github/workflows/deploy-docs.yml (triggers on docs/ changes to main)

  • Site URL: https://create-context-graph.vercel.app/

Neo4j Labs compliance
  • Apache-2.0 license headers added to all 32 Python source and test files

  • Labs badge added to README.md and generated project README template

  • Community support disclaimer updated to standard Neo4j Labs language

  • CONTRIBUTING.md — Getting started, adding domains/frameworks/connectors, testing, PR process

Testing improvements
  • Cypher syntax validation in test_generated_project.py — validates statement keywords and semicolons

  • Frontend syntax validation — TSX files checked for imports and exports, config.ts validated for required exports

  • Timed performance test (test_performance.py) — all 22 domains must scaffold in < 120 seconds each (slow marker)

Publishing
  • Version bumped to 0.2.0 across pyproject.toml, npm-wrapper/package.json, and __init__.py

  • Publishing workflows already in place from prior phases (PyPI + npm on version tags)

Success metrics achieved
MetricTargetActual
Time to running app< 5 minutes~2 minutes (scaffold + install + start)
Domain coverage22 domains22 domains
Framework coverage8 agent frameworks8 agent frameworks
Generation success rate>= 95%100% (176/176 matrix combos pass)
Test suite100+ tests262 tests (460 with slow matrix)

Post-Launch: Data Quality & UI Enhancements — COMPLETE

Status: Done

Fixture data quality overhaul
  • name_pools.py — Realistic name pools (25 person names, 20 org names, etc.) and contextual value generators (emails from names, realistic IDs, domain-appropriate ranges)

  • Improved static fallback in generator.py — produces passable data without an LLM (realistic names, structured documents, interpolated trace outcomes)

  • scripts/regenerate_fixtures.py — One-time script to regenerate all 22 fixtures using Claude API with coherent cross-entity prompts, validation, and retry logic

  • All 22 fixtures regenerated with LLM-quality data: 80-90 entities, 160-280 relationships, 25+ documents (200-1600 words each), 3-5 decision traces with specific observations and outcomes

  • Fixture quality tests — 66 parametrized tests across all 22 domains verify no placeholder names, documents >= 200 chars, no uninterpolated template variables

Full fixture data utilization in generated apps
  • generate_data.py.j2 updated — make seed now loads all 4 data types: entities, relationships, documents (as :Document nodes with :MENTIONS entity links), and decision traces (as :DecisionTrace → :HAS_STEP → :TraceStep chains)

  • 4 new API endpoints in routes.py.j2:

    • GET /documents — list with template filter, previews, mentioned entities

    • GET /documents/{title} — full document content

    • GET /traces — traces with full reasoning steps

    • GET /entities/{name} — all properties, labels, and connections

  • Document browser (DocumentBrowser.tsx.j2) — template type filter badges, scrollable list with previews, full document viewer with mentioned entity badges

  • Entity detail panel in ContextGraphView.tsx.j2 — click any graph node to see all properties, labels, and connections with relationship types/directions

  • Fixed DecisionTracePanel — uses new /traces endpoint, loads steps with observations (was previously broken: wrong node label, empty steps array)

  • Tabbed right panel in page.tsx.j2 — Traces and Documents tabs using Chakra UI v3 compound Tabs components

  • Schema indexes for Document and DecisionTrace nodes added to generate_cypher_schema()


Graph Visualization & Agent Fixes — COMPLETE

Status: Done

Interactive graph visualization
  • Schema view on load — Graph starts by calling db.schema.visualization() (via new GET /schema/visualization endpoint), showing entity type labels as nodes and relationship types as edges. No data query on initial load.

  • Agent-driven graph updates — CypherResultCollector in context_graph_client.py captures all Cypher results from agent tool calls. The /chat endpoint drains collected results and attaches them as graph_data in the response. ChatInterface passes graph_data to page.tsx via onGraphUpdate callback, which flows to ContextGraphView as externalGraphData. Works for all 8 agent frameworks without modifying any agent template.

  • Double-click to expand — Schema nodes load instances of that label (MATCH (n:\Label`)-[r]-(m) RETURN n,r,m LIMIT 50). Data nodes call new POST /expand` endpoint to fetch neighbors. Expanded data is merged with deduplication.

  • NVL d3Force layout — Replaced InteractiveNvlWrapper configuration: d3Force layout, zoom 0.1–5x, relationship thickness 2, dynamic import for SSR avoidance. Uses mouseEventCallbacks for node click, double-click, relationship click, canvas click.

  • Property details panel — Click any node to see labels (color badges), all properties (key-value list), and metadata. Click relationships to see type and properties. Canvas click deselects.

  • UI overlays — Color legend (top 6 node types), instructions overlay, loading spinner during expansion, back-to-schema button, schema/data mode indicator.

  • State management — page.tsx lifts graphData state with useState/useCallback. Props flow down, callbacks flow up. No external state library.

Neo4j driver serialization fix
  • _serialize() function in context_graph_client.py.j2 — Replaced result.data() (which strips metadata) with per-record iteration and custom serialization preserving Node (elementId, labels), Relationship (elementId, type, startNodeElementId, endNodeElementId), and Path objects.

MAF agent template fix
  • Bug: MAF agent used keyword-based tool dispatch (lines 75-114) that never called an LLM. Fallback echoed system prompt: "I'm your {SYSTEM_PROMPT}... Available tools: ...".

  • Fix: Rewrote handle_message() with Anthropic API tool-use loop (matching claude_agent_sdk pattern). Kept TOOL_REGISTRY + @register_tool decorator. Added _build_tool_definitions() that introspects registry via inspect.signature to generate Anthropic tool schemas. Added anthropic>=0.30 to MAF framework dependencies.

New backend endpoints
  • GET /schema/visualization — Returns schema graph via db.schema.visualization() (with fallback to basic labels/types)

  • POST /expand (body: {element_id}) — Returns immediate neighbors with nodes and relationships for graph expansion

Files modified
  • config.py — Added anthropic>=0.30 to MAF deps

  • templates/backend/agents/maf/agent.py.j2 — Full rewrite

  • templates/backend/shared/context_graph_client.py.j2 — _serialize(), CypherResultCollector, get_schema_visualization(), expand_node()

  • templates/backend/shared/routes.py.j2 — New endpoints, collector integration in /chat

  • templates/frontend/components/ContextGraphView.tsx.j2 — Complete rewrite (~480 lines)

  • templates/frontend/components/ChatInterface.tsx.j2 — onGraphUpdate prop

  • templates/frontend/app/page.tsx.j2 — State lifting

  • templates/frontend/lib/config.ts.j2 — GraphData type, schema constants


Phase 6: Memory Integration, Multi-Turn & DX — COMPLETE

Status: Done (v0.3.0)

Addressed all critical and high-priority feedback from the v0.2.0 product review. Core theme: make the generated apps actually use neo4j-agent-memory and deliver a compelling multi-turn conversation experience.

Critical fixes
  • neo4j-agent-memory integration — Generated context_graph_client.py now initializes MemoryClient alongside the Neo4j driver (with ImportError fallback). Exposes get_conversation_history() and store_message() functions used by all 8 agent frameworks for multi-turn conversation persistence.

  • Multi-turn conversations — All 8 agent templates retrieve conversation history before each LLM call and store messages after. Frontend ChatInterface captures session_id from the first response and sends it in all subsequent requests. "New Conversation" button resets session state.

  • CrewAI/Strands/Google ADK async fix — Added nest_asyncio to prevent asyncio.run() deadlocks inside FastAPI's async event loop. Added to FRAMEWORK_DEPENDENCIES for all three frameworks.

  • MAF → Anthropic Tools rebrand — Renamed framework from maf to anthropic-tools. Template directory moved to anthropic_tools/. Old maf key supported as deprecated alias via FRAMEWORK_ALIASES. Updated all tests.

High-priority fixes
  • GDS client — Changed default label from hardcoded "Entity" to "*" (wildcard). Exposed ENTITY_LABELS list generated from domain ontology.

  • Markdown rendering — Added react-markdown + remark-gfm to frontend. Assistant messages render through ReactMarkdown with CSS styles for headings, lists, code blocks, tables, blockquotes.

  • .env.example — Generated alongside .env with placeholder values (your-password-here). Added to renderer and gitignore correctly.

Neo4j setup options (new)
  • Neo4j Aura import — New wizard option "Neo4j Aura (cloud — free tier available)" with signup instructions panel and .env file parser. CLI flag: --neo4j-aura-env PATH.

  • neo4j-local — New wizard option "Local Neo4j via neo4j-local (no Docker required)". Generates make neo4j-start/stop/status targets using npx @johnymontana/neo4j-local. CLI flag: --neo4j-local.

  • neo4j_type expanded — Config Literal from "docker" | "existing" to "docker" | "existing" | "aura" | "local". Makefile, README, docker-compose all render conditionally based on type.

Medium-priority fixes
  • Port configurability — CORS reads from settings.frontend_port. Makefile uses include .env / export with $${BACKEND_PORT:-8000} and $${FRONTEND_PORT:-3000} defaults.

  • Process management — make start uses trap 'kill 0' EXIT to clean up child processes on Ctrl+C.

  • Docker version pin — neo4j:5 → neo4j:5.26.0 in docker-compose template.

  • README entity types — Split into "Base POLE+O Entities" and "Domain-Specific Entities" subsections.

  • Vector index creation — create_vector_index() called in app lifespan startup (try/except for Neo4j < 5.13).

Enhancements
  • Tool call visualization — CypherResultCollector extended with tool_calls tracking. ChatResponse includes tool_calls field. Frontend renders inline tool call cards (badge + abbreviated inputs) above assistant messages.

  • Test scaffold — Generated projects include backend/tests/test_routes.py with test_health() and test_scenarios() tests using mocked Neo4j.

Tests added (52 new tests → 314 total)
  • test_renderer.py (+18): .env.example, session_id, ReactMarkdown, memory functions, GDS labels, tool calls, README sections, CORS, vector index, docker pin, trap cleanup, neo4j-local/aura Makefile targets, markdown CSS

  • test_generated_project.py (+22): .env.example, ChatInterface features, memory integration, docker pin, neo4j type variations, test scaffold

  • test_config.py (+9): aura/local neo4j types, framework alias resolution (maf→anthropic-tools)

  • test_cli.py (+3): --neo4j-aura-env, --neo4j-local, maf alias backward compatibility

Files modified
  • config.py — SUPPORTED_FRAMEWORKS, FRAMEWORK_ALIASES, FRAMEWORK_DEPENDENCIES, neo4j_type Literal, resolved_framework property

  • cli.py — --neo4j-aura-env, --neo4j-local flags, alias resolution

  • wizard.py — 4 Neo4j options (Aura, local, Docker, existing), _parse_aura_env helper

  • renderer.py — .env.example rendering, base/domain entity type partition, test scaffold rendering, resolved_framework in context

  • templates/backend/shared/context_graph_client.py.j2 — MemoryClient init, get_conversation_history(), store_message(), tool call collector

  • templates/backend/shared/routes.py.j2 — tool_calls in ChatResponse

  • templates/backend/shared/main.py.j2 — CORS from settings, vector index startup

  • templates/backend/shared/gds_client.py.j2 — wildcard label, ENTITY_LABELS

  • templates/backend/agents/*/agent.py.j2 — all 8 frameworks: multi-turn history, tool_name tracking

  • templates/backend/agents/maf/ → templates/backend/agents/anthropic_tools/ — renamed

  • templates/frontend/components/ChatInterface.tsx.j2 — session_id, ReactMarkdown, tool call cards, new conversation button

  • templates/frontend/package.json.j2 — react-markdown, remark-gfm

  • templates/frontend/app/globals.css.j2 — .markdown-content styles

  • templates/base/Makefile.j2 — env vars, trap cleanup, neo4j-local targets

  • templates/base/docker-compose.yml.j2 — neo4j:5.26.0

  • templates/base/dot_env_example.j2 — new file

  • templates/base/README.md.j2 — entity sections, neo4j-type-aware instructions, .env.example docs

  • templates/backend/tests/test_routes.py.j2 — new test scaffold template


Phase 7 — Hardening, Security & DX (v0.4.0)

Based on comprehensive QA testing of all 176 domain-framework combinations.

Bug Fixes
  • B-01 (Critical): Enum identifier sanitization — A+, A-, 3d_model now generate valid Python identifiers (A_PLUS, A_MINUS, _3D_MODEL) with value aliases

  • B-02 (Critical): Graceful degradation when Neo4j is unavailable — backend starts in degraded mode with /health endpoint reporting status

  • B-03 (High): Cypher injection prevention in gds_client.py — label parameters validated against generated ENTITY_LABELS whitelist

  • B-04 (High): CrewAI async/sync fix — replaced bare asyncio.run() with _run_sync() helper using nest_asyncio, crew runs in thread via asyncio.to_thread()

  • B-05 (High): Claude Agent SDK model now configurable via ANTHROPIC_MODEL environment variable

  • B-06 (Medium): Silent exception swallowing replaced with structured warnings in ingest.py and vector_client.py

  • B-07 (Medium): JSON parsing error handling added to all 8 agent framework templates

  • B-08 (Medium): Input validation (max_length) on chat and search request models

  • B-09/B-10 (Low): CLI validates empty project names, adds --dry-run and --verbose flags

Security
  • CORS origins configurable via CORS_ORIGINS environment variable

  • Credential warnings in .env.example

  • Query timeouts (30s default) on all Neo4j operations

Code Quality
  • Magic strings extracted to constants.py module (index names, graph projections, embedding dimensions)

  • Frontend error messages: parse HTTP error responses, show actionable guidance

  • Document browser pagination (page size 20)

  • Semantic HTML landmarks (<main>, <section>, <aside>) and ARIA labels

  • 365 passing tests (51 new)


Phase 8 — Streaming Chat & Real-Time Tool Visualization (v0.5.0)

Streaming Architecture (SSE)
  • Event-driven CypherResultCollector — added asyncio.Queue-based event system to the global collector. When a streaming session is active, tool_start, tool_end, text_delta, and done events are pushed to the queue automatically as tools execute and text streams in

  • POST /chat/stream endpoint — new SSE endpoint alongside existing /chat (backward compatible). Uses StreamingResponse with text/event-stream content type. Emits session_id first, then tool and text events, terminated by done or error

  • execute_cypher() emits tool_start before query execution when tool_name is set — all 8 frameworks get real-time tool events with zero agent template changes

Text Streaming (5 of 8 frameworks)
  • Full streaming (handle_message_stream() added): PydanticAI (agent.run_stream()), Claude Agent SDK (client.messages.stream()), OpenAI Agents SDK (Runner.run_streamed()), LangGraph (graph.astream_events()), Anthropic Tools (client.messages.stream())

  • Tool-only streaming (no agent changes): CrewAI, Strands, Google ADK — tool call events fire in real-time via the collector; text arrives at the end. The /chat/stream route auto-detects and falls back gracefully

Frontend Streaming UI
  • SSE client — fetch + ReadableStream + TextDecoder for POST-based SSE (not EventSource which only supports GET)

  • Chakra UI Timeline — tool calls displayed as a vertical timeline with Spinner for running tools, checkmark Check icon for complete tools

  • Collapsible tool details — expandable view of tool inputs and output preview

  • Skeleton loading — Skeleton placeholders while waiting for first content

  • Throttled ReactMarkdown — text deltas batched at ~50ms to avoid excessive re-renders

  • Incremental graph updates — onGraphUpdate called on each tool_end event, so the NVL visualization updates after each tool completes rather than all at once

Tests added (23 new → 388 total)
  • TestStreamingEndpoint — /chat/stream endpoint, StreamingResponse, backward compat

  • TestCollectorEventQueue — event queue methods on CypherResultCollector

  • TestStreamingAgentTemplates — handle_message_stream presence in 5 frameworks, absence in 3

  • TestStreamingFrontend — Timeline, Skeleton, Collapsible, SSE parsing in ChatInterface

  • End-to-end validation: 8 frameworks × 3 domains + all 22 domains = 46 scaffold validations

Files modified
  • templates/backend/shared/context_graph_client.py.j2 — event queue on CypherResultCollector

  • templates/backend/shared/routes.py.j2 — /chat/stream SSE endpoint

  • templates/frontend/components/ChatInterface.tsx.j2 — SSE client + Timeline/Collapsible/Skeleton UI

  • templates/backend/agents/anthropic_tools/agent.py.j2 — handle_message_stream()

  • templates/backend/agents/claude_agent_sdk/agent.py.j2 — handle_message_stream()

  • templates/backend/agents/pydanticai/agent.py.j2 — handle_message_stream()

  • templates/backend/agents/openai_agents/agent.py.j2 — handle_message_stream()

  • templates/backend/agents/langgraph/agent.py.j2 — handle_message_stream()

  • tests/test_generated_project.py — 23 new streaming tests


Phase 9 — QA Hardening & DX Polish (v0.5.0)

Comprehensive QA pass across all 176 domain/framework combinations. 15 bugs fixed, 3 false alarms identified, 21 new tests added (409 total).

Critical Fixes
  • Settings extra: "ignore" — Neo4j Aura .env files with extra variables (NEO4J_DATABASE, AURA_INSTANCEID) no longer cause ValidationError

  • is_connected() state flag — replaced broken sync verify_connectivity() on AsyncDriver with tracked _connected flag set during connect_neo4j()/close_neo4j()

  • 503 guards on all endpoints — added _require_neo4j() guard to all 15 Neo4j-dependent routes (was only on /chat and /chat/stream); /cypher now returns 503 for connection errors, 400 for syntax errors

Async Safety
  • Removed nest_asyncio from Strands and CrewAI templates — replaced with asyncio.to_thread() + clean asyncio.run() in worker threads. Google ADK keeps nest_asyncio (needed for sync tools within async run_async())

Conversation History
  • Structured format — replaced flat "Previous conversation:\n" string concatenation with <conversation_history>[ROLE]\ncontent</conversation_history> format in OpenAI Agents, Strands, CrewAI, and Google ADK

  • ADK session leverage — Google ADK skips history injection for existing sessions (ADK manages multi-turn internally), only injects persisted history for new sessions after server restart

Streaming
  • Google ADK full streaming — added handle_message_stream() that emits text_delta events from runner.run_async() events. Google ADK promoted from "tools only" to "full streaming" (6 of 8 frameworks now stream)

Frontend Fixes
  • Unique message IDs — crypto.randomUUID() for React keys instead of array indices

  • Loading fallback — Spinner component in dynamic ContextGraphView import

  • Storage warning — console.warn() on sessionStorage failures

Domain & Build Fixes
  • Color collision resolution — fixed 12 entity color collisions across 7 domains (entities sharing hex colors with base POLE+O types)

  • LIMIT clause — added LIMIT 100 to software-engineering default Cypher query

  • ESLint dependencies — added eslint and eslint-config-next to frontend devDependencies

  • .dockerignore — new template excluding node_modules, .venv, .git, pycache from Docker builds

  • CrewAI Python 3.11+ — conditional requires-python = ">=3.11" in generated pyproject.toml

Developer Experience
  • make test-connection — Makefile target to validate Neo4j credentials

  • README troubleshooting — common issues with Neo4j connection, port conflicts, API keys (conditional on neo4j_type)

  • Framework-specific README — each generated README documents the chosen framework's architecture, streaming support, and required API keys

Tests added (21 new → 409 total)
  • TestQABugFixes — config extra ignore, connected flag, endpoint guards, cypher 503, message IDs, storage warning, loading fallback, ESLint deps, dockerignore

  • TestDeferredBugFixes — structured history format, ADK session reuse, ADK streaming, CrewAI Python version, strands deps

  • test_no_color_collisions_with_base — validates all 22 domains have unique entity colors

  • test_all_domains_default_cypher_has_limit — validates LIMIT clause in all domains

Files modified
  • templates/backend/shared/config.py.j2 — extra: "ignore"

  • templates/backend/shared/context_graph_client.py.j2 — _connected flag

  • templates/backend/shared/routes.py.j2 — _require_neo4j() guard

  • templates/backend/shared/pyproject.toml.j2 — conditional Python version

  • templates/backend/agents/{strands,crewai,google_adk,openai_agents}/agent.py.j2 — async safety, history format, streaming

  • templates/frontend/components/ChatInterface.tsx.j2 — message IDs, storage warning

  • templates/frontend/app/page.tsx.j2 — loading fallback

  • templates/frontend/package.json.j2 — ESLint deps

  • templates/base/Makefile.j2 — test-connection target

  • templates/base/README.md.j2 — troubleshooting, framework sections

  • templates/base/dockerignore.j2 — new file

  • src/create_context_graph/config.py — remove nest-asyncio from deps

  • src/create_context_graph/renderer.py — register dockerignore template

  • src/create_context_graph/domains/*.yaml — color fixes (7 domains), LIMIT clause (1 domain)

  • tests/test_generated_project.py — 19 new tests

  • tests/test_ontology.py — 2 new tests


Phase 10 — Framework Reliability, Data Quality & UX (v0.5.1)

Comprehensive testing of v0.4.6 revealed that 6 of 9 agent frameworks were non-functional (hanging or not executing tools), plus frontend UX bugs and static data quality issues. This phase addresses all feedback.

Critical: Fix Hanging Frameworks
  • Thread-safe CypherResultCollector: _push_event() now detects worker threads and uses loop.call_soon_threadsafe() instead of direct put_nowait() on the asyncio.Queue. Captures self._loop in set_event_queue().

  • CrewAI/Strands async bridging: Replaced asyncio.run() in _run_sync() with asyncio.run_coroutine_threadsafe(coro, _main_loop). Added _capture_loop() called before asyncio.to_thread() to capture the main event loop. 30s timeout per tool call.

  • Google ADK async bridging: Improved _run_sync() with cross-thread run_coroutine_threadsafe fallback alongside existing nest_asyncio for same-thread reentrant calls.

  • Bounded agentic loops: Anthropic Tools and Claude Agent SDK while True: loops replaced with for _iteration in range(15):. Added timeout=60.0 to API calls. Fallback message when max iterations exceeded.

Critical: Fix Tool Execution
  • Tool-use emphasis: All 8 agent templates now append "IMPORTANT: You MUST use the available tools to query the knowledge graph..." to the domain system prompt.

  • PydanticAI: Added retries=2 to Agent constructor for transient failure recovery.

  • OpenAI Agents JSON leak: Streaming now filters response.output_text.delta events only, skipping response.function_call_arguments.delta that leaked raw JSON into the text stream.

Frontend Fixes
  • Chat history scoping: STORAGE_KEY and SESSION_KEY now include DOMAIN.id to prevent cross-app pollution when running multiple domain apps.

  • SSR hydration fix: Deferred sessionStorage reads to useEffect instead of useState initializer. Added hydrated state.

  • Send button: Increased from size="sm" to size="md" with colorPalette="blue".

  • Timeout feedback: Added elapsed time counter (shown after 3s), reduced visible timeout from 120s to 60s.

  • Retry button: Error messages now include a "Retry" button that resends the original message.

Dependencies & CLI
  • neo4j-agent-memory[openai]: Added [openai] extra to fix "OpenAI package not installed" error on store_message().

  • --reset-database flag: New CLI flag that runs MATCH (n) DETACH DELETE n before ingestion. Added reset_neo4j() to ingest.py.

Static Demo Data Quality
  • Domain-specific name pools: Added 200+ names across 50+ entity labels (medical diagnoses, financial instruments, software repos, gaming items, etc.) in LABEL_NAMES dict in name_pools.py.

  • Label-aware ID prefixes: LABEL_ID_PREFIXES maps labels to domain-appropriate prefixes (PAT-, DX-, ACT-, REPO-, etc.).

  • get_names_for_label(): New function that checks LABEL_NAMES first, falls back to POLE+O pools.

  • Generator updated: _generate_static_entities() now uses get_names_for_label() instead of get_names_for_pole_type().

Decision Traces Expansion
  • All 22 domains: Expanded from 3-5 to 8-12 decision traces each. Added ~130 new traces total with domain-specific multi-step reasoning scenarios.

Streaming Endpoint
  • Overall timeout: SSE endpoint now has a 300s overall timeout alongside the 120s per-event idle timeout.

Tests added (26 new → 435 total)
  • TestAsyncBridgingFixes — CrewAI/Strands use run_coroutine_threadsafe, no bare asyncio.run()

  • TestMaxIterationGuards — Anthropic Tools/Claude Agent SDK have bounded iterations

  • TestOpenAIStreamFiltering — OpenAI agents filter tool argument deltas

  • TestCollectorThreadSafety — Collector uses call_soon_threadsafe and threading

  • TestToolPromptSuffix — All 8 frameworks include tool-use emphasis

  • TestChatHistoryScoping — Storage keys include DOMAIN.id

  • TestHydrationFix — No direct sessionStorage in useState, has hydrated state

  • TestNeo4jAgentMemoryDeps — pyproject includes [openai] extra

  • TestStreamingEndpointTimeout — Routes have overall_timeout

  • TestDomainSpecificNamePools — Label names exist and are used correctly

Files modified
  • src/create_context_graph/templates/backend/shared/context_graph_client.py.j2 — thread-safe collector

  • src/create_context_graph/templates/backend/agents/crewai/agent.py.j2 — async bridging + tool prompt

  • src/create_context_graph/templates/backend/agents/strands/agent.py.j2 — async bridging + tool prompt

  • src/create_context_graph/templates/backend/agents/google_adk/agent.py.j2 — async bridging + tool prompt

  • src/create_context_graph/templates/backend/agents/anthropic_tools/agent.py.j2 — max iterations + tool prompt

  • src/create_context_graph/templates/backend/agents/claude_agent_sdk/agent.py.j2 — max iterations + tool prompt

  • src/create_context_graph/templates/backend/agents/pydanticai/agent.py.j2 — tool prompt + retries

  • src/create_context_graph/templates/backend/agents/openai_agents/agent.py.j2 — JSON leak fix + tool prompt

  • src/create_context_graph/templates/backend/agents/langgraph/agent.py.j2 — tool prompt

  • src/create_context_graph/templates/frontend/components/ChatInterface.tsx.j2 — history scoping, hydration, retry, timeout, send button

  • src/create_context_graph/templates/backend/shared/pyproject.toml.j2 — openai extra

  • src/create_context_graph/templates/backend/shared/routes.py.j2 — overall timeout

  • src/create_context_graph/name_pools.py — domain-specific name pools

  • src/create_context_graph/generator.py — label-aware naming

  • src/create_context_graph/cli.py — --reset-database flag

  • src/create_context_graph/ingest.py — reset_neo4j() function

  • src/create_context_graph/domains/*.yaml — ~130 new decision traces across all 22 domains

  • tests/test_generated_project.py — 26 new tests


Phase 11 — v0.5.1 Testing Feedback Fixes

Comprehensive end-to-end testing of v0.5.0 across all 9 framework/domain combinations revealed 3 critical framework bugs, data quality issues, and UX improvements. This phase addresses all actionable findings from the testing feedback.

Critical: Framework Bug Fixes
  • PydanticAI tool serialization: Changed all @agent.tool return types from list[dict] to str with json.dumps(result, default=str). PydanticAI was the only framework returning raw Neo4j objects, causing silent serialization failures that prevented the LLM from seeing tool results.

  • Google ADK agent name sanitization: Added | replace('-', '_') to the agent name template. Hyphenated domain IDs (e.g., real-estate, financial-services) produced invalid Python identifiers like real-estate_agent, crashing ADK's LlmAgent validator.

  • Strands max_tokens configuration: Added max_tokens=4096 to AnthropicModel() initialization. The Anthropic API requires this parameter; without it, Strands returned a 'max_tokens' KeyError.

Cross-Domain Data Isolation
  • Domain property on entities: Both ingestion paths (MemoryClient and direct driver) now add domain=ontology.domain.id to all entity nodes. Enables future domain-scoped queries when sharing a Neo4j instance.

  • CLI ingestion tip: After --ingest, prints "Tip: Use --reset-database if you previously ingested a different domain into this Neo4j instance."

  • Conditional make seed messaging: Post-scaffold instructions now distinguish between "Seed sample data" (no --ingest) and "Re-seed sample data (already ingested)" (with --ingest).

Static Data Quality Improvements
  • 12 new property-specific value pools in name_pools.py: _CURRENCY_POOL (USD, EUR, GBP...), _TICKER_POOL (AAPL, MSFT...), _DRUG_CLASS_POOL (Biguanide, ACE Inhibitor...), _STATUS_POOL, _SEVERITY_POOL, _LANGUAGE_POOL, _COUNTRY_POOL, _COMPLAINT_POOL, _DISPOSITION_POOL, _SPECIALTY_POOL, plus blood_type and gender handling.

  • Float value clamping: confidence/score/rating fields clamped to 0.0-1.0 range. efficiency/accuracy/utilization clamped to 60-99%. Prevents absurd values like confidence=552.92.

  • Improved description templates: Replaced generic "X record for Y. Created as part of the Z management workflow." with varied, natural-sounding descriptions.

Frontend UX
  • Agent thinking text filter: New splitThinkingAndResponse() function in ChatInterface.tsx.j2 detects "thinking" patterns (lines starting with "Let me", "I'll", "First, I need to", etc.) and renders them in a collapsible "Show reasoning" <Collapsible> section, keeping responses focused.

Developer Experience
  • HuggingFace warning suppression: Added HF_HUB_DISABLE_TELEMETRY=1 to .env and .env.example templates to suppress unauthenticated Hub warnings on backend startup.

Tests added (75 new → 510 total)
  • TestCypherQueryValidation — 66 tests: validates node labels, relationship types, and deprecated syntax across all 22 domain YAMLs' agent_tools Cypher queries

  • TestV051Regressions — 9 tests: PydanticAI returns str not list[dict], Google ADK agent names have no hyphens, Strands has max_tokens, .env has HF telemetry setting, confidence/currency/ticker values are realistic, descriptions have no boilerplate, ChatInterface has thinking filter

Files modified
  • src/create_context_graph/templates/backend/agents/pydanticai/agent.py.j2 — tool return type str + json.dumps()

  • src/create_context_graph/templates/backend/agents/google_adk/agent.py.j2 — agent name hyphen sanitization

  • src/create_context_graph/templates/backend/agents/strands/agent.py.j2 — max_tokens=4096

  • src/create_context_graph/name_pools.py — 12 new property pools, float clamping, description improvements

  • src/create_context_graph/ingest.py — domain property on all entities (both ingestion paths)

  • src/create_context_graph/cli.py — post-ingest tip, conditional make seed messaging

  • src/create_context_graph/templates/frontend/components/ChatInterface.tsx.j2 — thinking text filter with collapsible reasoning

  • src/create_context_graph/templates/base/dot_env.j2 — HF_HUB_DISABLE_TELEMETRY=1

  • src/create_context_graph/templates/base/dot_env_example.j2 — HF telemetry + token guidance

  • tests/test_ontology.py — TestCypherQueryValidation class (66 tests)

  • tests/test_generated_project.py — TestV051Regressions class (9 tests)

Phase 12 — v0.6.0 Comprehensive Testing Feedback Fixes

End-to-end testing of v0.5.3 across 9 framework/domain combinations (6 working, 3 broken) revealed framework bugs, data ingestion issues, data quality gaps, and UI/UX improvements. This phase addresses all P0-P2 findings.

Critical: Framework Fixes
  • CrewAI hanging fix: Added explicit llm="anthropic/claude-sonnet-4-20250514" to Agent() constructor — CrewAI was defaulting to OpenAI and hanging when no OPENAI_API_KEY was set. Added ANTHROPIC_API_KEY environment setup, request-level logging, and reduced timeout from 90s to 60s.

  • Strands serialization fix: Added _extract_text() helper that tries .text, .message.content, and str() fallbacks — handles ParsedTextBlock serialization issues from newer Anthropic SDK versions.

  • Google ADK API key support: Added google_api_key field to ProjectConfig, --google-api-key CLI flag with GOOGLE_API_KEY env, wizard prompt when google-adk is selected, and warning when google-adk used without key.

Critical: Document & Trace Ingestion Fix

The Documents panel and Decision Traces panel appeared empty when using --ingest because the two ingestion paths created incompatible node structures:

  • Root cause: _ingest_with_memory_client() stored documents as conversation messages (short-term memory) and traces via the reasoning API, creating different node structures than the :Document and :DecisionTrace/:TraceStep nodes the frontend queries for.

  • Fix: Both ingestion paths (_ingest_with_memory_client and _ingest_with_driver) now create :Document and :DecisionTrace/:TraceStep nodes using direct Cypher, matching the generate_data.py.j2 pattern.

  • Entity MERGE fix: Direct driver path changed from MERGE (n:Label {all_props}) to MERGE (n:Label {name: $name}) SET ... to prevent duplicate nodes from property mismatches.

Data Quality
  • Domain-aware base entity pools: Added DOMAIN_PERSON_NAMES, DOMAIN_ORGANIZATION_NAMES, DOMAIN_LOCATION_NAMES, DOMAIN_EVENT_NAMES, DOMAIN_OBJECT_NAMES, and DOMAIN_ROLE_POOL for 6 domains (healthcare, financial-services, gaming, software-engineering, conservation, data-journalism).

  • Fixed templated property values: Added property pools for contraindications, dosage_form, allergies, sector, lead_reporter, manufacturer, mechanism_of_action, population_trend, habitat — replacing "{entity_name} - {PropertyName}" template pattern.

  • Domain-aware role generation: generate_property_value() for role/title now checks DOMAIN_ROLE_POOL before falling back to generic roles.

Frontend UI Improvements
  • Chat input redesign: Bordered container with focus highlight, keyboard shortcut hint ("Enter to send, Shift+Enter for new line"), compact send button (Chakra UI Pro AI template pattern).

  • Suggested questions: Flat wrapped HStack of pill-shaped buttons with full text (no 60-char truncation), "Try these" label with Sparkles icon.

  • Message avatars: User/assistant Circle avatars with User/Bot lucide-react icons.

  • Tool progress counter: Shows "Running tool N of M..." instead of generic "Generating response..."

CLI
  • --demo convenience flag: Shortcut for --reset-database --demo-data --ingest

  • --google-api-key flag: New CLI flag with GOOGLE_API_KEY env variable support

Tests added (35 new → 545 total)
  • TestV060GoogleApiKey — 2 tests: .env and .env.example include GOOGLE_API_KEY

  • TestV060CrewAIFix — 2 tests: explicit LLM config, logging

  • TestV060StrandsFix — 1 test: _extract_text helper

  • TestV060DomainAwareNamePools — 8 tests: healthcare person names, contraindications, dosage_form, allergies, sector, domain roles, population_trend

  • TestV060ChatInterfaceUI — 5 tests: avatars, keyboard hints, no truncation, sparkles icon, tool progress

  • TestGoogleApiKey in test_config.py — 2 tests

Files modified
  • src/create_context_graph/config.py — google_api_key field

  • src/create_context_graph/cli.py — --google-api-key, --demo flags, google-adk warning

  • src/create_context_graph/wizard.py — Google API key prompt, summary display

  • src/create_context_graph/renderer.py — pass google_api_key to template context

  • src/create_context_graph/ingest.py — direct Cypher for documents/traces in both paths, entity MERGE fix

  • src/create_context_graph/name_pools.py — domain-aware base pools, 9 new property pools, domain-aware roles

  • src/create_context_graph/generator.py — pass domain_id to name pool functions

  • src/create_context_graph/templates/backend/agents/strands/agent.py.j2 — _extract_text() helper

  • src/create_context_graph/templates/backend/agents/crewai/agent.py.j2 — explicit LLM, env setup, logging

  • src/create_context_graph/templates/base/dot_env.j2 — GOOGLE_API_KEY

  • src/create_context_graph/templates/base/dot_env_example.j2 — GOOGLE_API_KEY with comment

  • src/create_context_graph/templates/frontend/components/ChatInterface.tsx.j2 — avatars, input redesign, suggested questions, progress counter

  • tests/test_config.py — TestGoogleApiKey

  • tests/test_generated_project.py — 5 new test classes

Phase 13 — v0.6.1 Stability, Data Quality & Tool Coverage

Comprehensive v0.6.0 testing revealed dependency issues, data quality gaps, missing tool archetypes, and frontend UX improvements. This phase addresses all findings across v0.6.1 (bug fixes), v0.6.2 (data quality), and v0.7.0 (features + docs) in a single release.

Critical Bug Fixes
  • CrewAI [anthropic] dependency: Changed crewai>=0.1 to crewai[anthropic]>=0.1 in config.py FRAMEWORK_DEPENDENCIES. The crewai agent template uses Anthropic's Claude model, which requires the extra.

  • CLI auto-slug without PROJECT_NAME: When --domain and --framework flags are provided without a positional project name, the CLI now auto-generates a slug (e.g., healthcare-pydanticai-app). Added TTY detection with helpful error messages for CI/CD.

Data Quality
  • Document Markdown format: Static document content now uses ## Heading instead of RST ===/---. DocumentBrowser renders with ReactMarkdown.

  • Entity-derived document titles: Titles reference primary entities ("Discharge Summary: Maria Elena Gonzalez") instead of sequential numbers.

  • POLE-type-aware entity descriptions: Replaced "Comprehensive patient profile for..." with role/industry-specific descriptions using domain pools.

  • Domain-aware Organization.industry: Added DOMAIN_INDUSTRY_POOL for all 22 domains (healthcare → "Hospital Systems", not "Technology").

  • Realistic decision trace observations: Now reference actual entity names and vary by action type.

  • Improved thinking text filter: Added CONTINUATION_PATTERNS to catch multi-sentence thinking blocks.

Agent Tool Coverage
  • list_* and get_*_by_id tools for all 22 domains: Every domain now has aggregate listing and direct ID lookup tools alongside existing search/analysis tools. Each domain has 7-8+ tools (up from 5-6).

  • Gaming get_top_players: Domain-specific aggregate tool sorting by level.

Frontend Features
  • "Ask about this" button: Clicking a graph node shows a button that sends "Tell me about {entity}" to the chat. Wired via externalInput prop from ContextGraphView → page.tsx → ChatInterface.

  • Node hover tooltips: Full name, labels, and top 5 properties shown on hover.

  • Health polling 30s → 60s: Reduced unnecessary traffic.

  • Mobile-responsive hint text: Keyboard shortcut hint hidden on small screens.

  • Suggested question maxW: Pill buttons capped at 320px.

  • Scrollable label badges: Label filter badges scroll when they overflow (maxH 180px).

  • Seed constraint fix: generate_data.py.j2 uses ON CREATE SET / ON MATCH SET to avoid constraint violations.

Documentation
  • 4 new docs pages: use-neo4j-aura.md, use-docker.md, why-context-graphs.md, framework-comparison.md

  • Updated sidebars.ts: All new pages added to Docusaurus navigation.

Tests added (57 new → 602 total)
  • test_crewai_includes_anthropic_extra — verifies crewai dependency has anthropic extra

  • test_no_project_name_auto_generates_slug — verifies CLI auto-slug generation

Files modified
  • src/create_context_graph/config.py — crewai[anthropic] dependency

  • src/create_context_graph/cli.py — auto-slug generation, TTY detection

  • src/create_context_graph/generator.py — Markdown documents, entity-derived titles, realistic observations

  • src/create_context_graph/name_pools.py — DOMAIN_INDUSTRY_POOL, _generate_description, _PERSON_LABELS, _ORGANIZATION_LABELS

  • src/create_context_graph/templates/backend/shared/generate_data.py.j2 — ON CREATE/MATCH SET

  • src/create_context_graph/templates/frontend/components/ChatInterface.tsx.j2 — thinking filter, externalInput, responsive hint

  • src/create_context_graph/templates/frontend/components/ContextGraphView.tsx.j2 — tooltips, ask-about button, scrollable badges

  • src/create_context_graph/templates/frontend/components/DocumentBrowser.tsx.j2 — ReactMarkdown rendering

  • src/create_context_graph/templates/frontend/app/page.tsx.j2 — askAbout wiring, 60s health polling

  • All 22 domain YAML files — list_* and get_*_by_id tools added

  • docs/sidebars.ts — 4 new pages

  • docs/docs/how-to/use-neo4j-aura.md — new

  • docs/docs/how-to/use-docker.md — new

  • docs/docs/explanation/why-context-graphs.md — new

  • docs/docs/reference/framework-comparison.md — new


Phase 14 — v0.7.1 Testing Feedback: Embedding Regression, Data Quality & Docs

Comprehensive v0.7.0 testing revealed 2 critical regressions, data quality gaps, missing documentation, and UX improvements. This phase addresses all findings.

Critical Fixes (P0)
  • neo4j-agent-memory embedding regression: Removed [openai] extra from generated pyproject.toml, added sentence-transformers>=2.0 dependency. MemorySettings now auto-detects: uses local sentence_transformers/all-MiniLM-L6-v2 (384 dims) by default, upgrades to OpenAI text-embedding-3-small (1536 dims) if OPENAI_API_KEY is set. Conversation memory works out of the box with no API key.

  • openai-agents API key warning: CLI now warns when --framework openai-agents is used without --openai-api-key. Wizard prompt text updated to indicate "required" for this framework.

Data Quality (P1)
  • 67 missing LABEL_NAMES: Added name pools for all 67 entity labels that were falling back to generic "Label 1" names. LABEL_NAMES now has 118 entries (up from 51) covering every entity type across all 22 domain YAMLs.

  • Post-generation value clamping: Added _validate_and_clamp() in generator.py with 28 property range rules (price_per_night: $30-$2000, duration_hours: 0.25-24, etc.) and taxonomy class correction (species → correct class mapping).

  • POLE-type entity descriptions: Added _LOCATION_LABELS, _EVENT_LABELS, _OBJECT_LABELS sets (parallel to existing Person/Organization) plus 7 label-specific description overrides (Medication, Permit, Sensor, Equipment, Paper, Model, Species).

  • digital-twin fixture fix: Fixed label casing (UPPERCASE → PascalCase) to match YAML schema.

  • Domain-scoped MERGE keys: Changed entity MERGE from {name: $name} to {name: $name, domain: $domain} in both generate_data.py.j2 and ingest.py to prevent constraint violations when sharing a Neo4j instance across domains.

google-adk Error Guard (P2)
  • Added try/except AttributeError around runner.run_async() in both handle_message and handle_message_stream to handle SDK cleanup errors when _async_httpx_client was never initialized.

Documentation
  • Quick-Start page (docs/docs/quick-start.md): 5-step guide with sidebar link.

  • use-neo4j-local guide (docs/docs/how-to/use-neo4j-local.md): 3 setup options (npx, Desktop, Docker).

  • switch-frameworks slug fix: Added slug: switch-frameworks to fix 404.

  • Domain catalog (docs/docs/reference/domain-catalog.md): Auto-generated table of all 22 domains with entity types, tool counts, sample questions.

  • Architecture diagram: Mermaid flowchart added to docs/docs/intro.md.

  • Updated sidebars.ts: Added quick-start, use-neo4j-local, domain-catalog to navigation.

Frontend UX
  • Status indicator: Enlarged from 8px to 12px, added text label ("Connected"/"Degraded"/"Offline").

  • Health check retry: Initial load retries 3 times with exponential backoff (1s/2s/4s) to prevent "Internal Server Error" on first page load.

  • Empty graph state: Larger icon, descriptive heading ("Your knowledge graph will appear here"), actionable guidance text.

Tests added (89 new → 691 total)
  • tests/test_fixtures.py (88 tests): Fixture schema alignment (required properties, agent tool property references, label coverage), data quality validation (numeric ranges)

  • test_pyproject_has_sentence_transformers — verifies no [openai] extra

  • test_context_graph_client_has_embedding_config — verifies embedding provider selection logic

Files modified
  • src/create_context_graph/templates/backend/shared/pyproject.toml.j2 — removed [openai] extra, added sentence-transformers

  • src/create_context_graph/templates/backend/shared/context_graph_client.py.j2 — embedding provider auto-detection

  • src/create_context_graph/templates/base/dot_env_example.j2 — clarified OPENAI_API_KEY is optional

  • src/create_context_graph/cli.py — openai-agents warning

  • src/create_context_graph/wizard.py — framework-specific OpenAI key prompt

  • src/create_context_graph/name_pools.py — 67 new LABEL_NAMES, 3 new label sets, 7 description overrides

  • src/create_context_graph/generator.py — _validate_and_clamp(), _PROPERTY_CLAMP_RANGES, _TAXONOMY_CLASS_MAP

  • src/create_context_graph/ingest.py — domain-scoped MERGE keys

  • src/create_context_graph/templates/backend/shared/generate_data.py.j2 — domain-scoped MERGE keys

  • src/create_context_graph/templates/backend/agents/google_adk/agent.py.j2 — AttributeError guard

  • src/create_context_graph/templates/frontend/app/page.tsx.j2 — health retry, larger status dot

  • src/create_context_graph/templates/frontend/components/ContextGraphView.tsx.j2 — improved empty state

  • src/create_context_graph/fixtures/digital-twin.json — fixed label casing

  • tests/test_generated_project.py — updated embedding tests

  • tests/test_fixtures.py — new cross-validation test suite

  • docs/docs/quick-start.md — new

  • docs/docs/how-to/use-neo4j-local.md — new

  • docs/docs/reference/domain-catalog.md — new

  • docs/docs/how-to/switch-agent-frameworks.md — slug fix

  • docs/docs/intro.md — architecture diagram, updated links

  • docs/sidebars.ts — 3 new pages


Phase 15 — Linear Data Import Connector (v0.8.2)

Real-world project data import from Linear. First connector to import graph-native project management data (issues, projects, cycles, teams, users, labels, workflow states) with full relationship fidelity.

What was built
Linear connector
  • linear_connector.py implementing BaseConnector ABC with GraphQL client

  • Cursor-based pagination against Linear's GraphQL API (https://api.linear.app/graphql)

  • Rate limiting via X-RateLimit-Requests-Remaining header with adaptive sleep

  • 8 entity types mapped to POLE+O model (Issue, Project, Cycle, Team, Person, Label, WorkflowState, Comment)

  • 16 relationship types (ASSIGNED_TO, CREATED_BY, BELONGS_TO_PROJECT, BELONGS_TO_TEAM, IN_CYCLE, HAS_STATE, HAS_LABEL, CHILD_OF, HAS_COMMENT, AUTHORED_BY, MEMBER_OF, LEADS, CONTRIBUTED_BY, CYCLE_FOR, STATE_OF)

  • Issue descriptions exported as documents for RAG/vector search

  • Deduplication of users, labels, and workflow states across paginated issue responses

  • Optional comment import (gated behind include_comments kwarg)

  • Team key filtering (--linear-team ENG imports only that team's data)

  • No external dependency — uses urllib.request from stdlib

CLI integration
  • --connector linear flag (works with existing --connector multiple=True pattern)

  • --linear-api-key flag (envvar LINEAR_API_KEY)

  • --linear-team flag (envvar LINEAR_TEAM) for team filtering

  • Warning when --connector linear is used without an API key

Generated project integration
  • linear_connector.py.j2 Jinja2 template for standalone connector in generated projects

  • import_data.py.j2 updated with Linear credential wiring

  • .env and .env.example templates include LINEAR_API_KEY and LINEAR_TEAM (conditional)

  • config.py.j2 includes linear_api_key and linear_team settings fields (conditional)

Tests added (14 new → 705 total)
  • test_credential_prompts — verify api_key and team_key prompts

  • test_authenticate_success/missing_key/invalid_key — auth validation

  • test_fetch_entity_mapping — verify all 7 entity labels present

  • test_fetch_entity_counts — correct counts for mocked workspace

  • test_fetch_relationships — verify all relationship types

  • test_fetch_child_of_relationship — sub-issue hierarchy

  • test_fetch_documents — issue descriptions as documents

  • test_fetch_deduplication — users/labels not duplicated

  • test_fetch_team_filter/team_filter_not_found — team key filtering

  • test_issue_name_format — "ENG-101 Fix login bug" format

  • test_priority_labels — priority mapping (0-4 → human-readable)

Files created
  • src/create_context_graph/connectors/linear_connector.py

  • src/create_context_graph/templates/backend/connectors/linear_connector.py.j2

Files modified
  • src/create_context_graph/connectors/__init__.py — register LinearConnector

  • src/create_context_graph/cli.py — --linear-api-key, --linear-team flags + credential wiring

  • src/create_context_graph/renderer.py — add linear to connector_templates

  • src/create_context_graph/templates/backend/connectors/import_data.py.j2 — Linear block

  • src/create_context_graph/templates/base/dot_env.j2 — conditional Linear env vars

  • src/create_context_graph/templates/base/dot_env_example.j2 — Linear env vars with docs

  • src/create_context_graph/templates/backend/shared/config.py.j2 — Linear settings fields

  • tests/test_connectors.py — 14 new tests, registry counts 7→8


Phase 15b — Linear Deep Graph: Relations, History, Decisions & Full Schema (v0.8.3)

Schema introspection of Linear's GraphQL API (494 types) revealed significant additional data available beyond the initial v1 import. This phase adds issue relations (blocking/dependency graph), issue history transformed into decision traces, threaded comments with resolution tracking, project updates with health, milestones, initiatives, attachments, and Linear Docs.

Issue Relations — blocking/dependency graph (P0)
  • Import issue.relations connection with type field (blocks, is-blocked-by, related, duplicate)

  • New relationship types: :BLOCKS, :BLOCKED_BY, :RELATED_TO, :DUPLICATE_OF between Issue nodes

  • Also import inverseRelations for bidirectional coverage

  • Enables "what's blocking X?" and dependency chain queries

Issue History → Decision Traces (P0)
  • Import issue.history connection: state transitions, assignee changes, priority changes, label changes, cycle/project moves

  • Transform history entries into :DecisionTrace → :HAS_STEP → :TraceStep chains

  • Each issue with 2+ history entries generates a decision trace with:

    • task: "Lifecycle of {identifier} {title}"

    • outcome: derived from final state (completed/canceled/current state)

    • Steps: each history entry becomes a TraceStep with thought/action/observation derived from the transition fields

  • :TraceStep nodes linked to :Person via :PERFORMED_BY for actor attribution

Comment Threading & Resolution (P1)
  • Import comment parent field for thread hierarchy: (:Comment)-[:REPLY_TO]->(:Comment)

  • Import resolvedAt and resolvingUser: (:Comment)-[:RESOLVED_BY]->(:Person)

  • Import comments on ProjectUpdates, not just Issues: (:ProjectUpdate)-[:HAS_COMMENT]->(:Comment)

  • Import quotedText for context on replies

  • Comments always imported (remove include_comments gate — comments are core to decision traces)

Project Updates & Health (P1)
  • New entity: ProjectUpdate with body, health (onTrack/atRisk/offTrack), createdAt

  • Relationships: (:Project)-[:HAS_UPDATE]->(:ProjectUpdate), (:ProjectUpdate)-[:POSTED_BY]->(:Person)

  • Project updates with health changes generate decision trace steps

  • Update bodies imported as documents for RAG

Project Milestones (P1)
  • New entity: ProjectMilestone with name, description, targetDate, status, progress

  • Relationships: (:Project)-[:HAS_MILESTONE]->(:ProjectMilestone), (:Issue)-[:IN_MILESTONE]->(:ProjectMilestone)

  • Query issue.projectMilestone field for issue→milestone linking

Initiative Hierarchy (P2)
  • New entity: Initiative with name, description, status (Planned/Active/Completed), health, targetDate, owner

  • Relationships: (:Initiative)-[:CONTAINS_PROJECT]->(:Project), (:Initiative)-[:OWNED_BY]->(:Person)

  • Query projects.initiatives connection for initiative→project linking

  • New entity: Attachment with title, url, sourceType, metadata

  • Relationship: (:Issue)-[:HAS_ATTACHMENT]->(:Attachment)

  • Enables cross-tool graph (GitHub PRs, Figma files, Slack messages linked to issues)

Linear Docs (P2)
  • Query documents connection on Issue, Project, Cycle

  • Import as :Document nodes (same as our existing document model)

  • Links: (:Issue)-[:HAS_DOCUMENT]->(:Document), (:Project)-[:HAS_DOCUMENT]->(:Document)

Additional Issue Fields
  • Add completedAt, canceledAt, startedAt timestamps for lifecycle tracking

  • Add branchName for Git branch linking

  • Add number (team-scoped numeric ID)

  • Add trashed boolean for soft-delete awareness

Tests added (36 new → 741 total)
Unit tests in test_connectors.py (+22 Linear tests, 59 total)
  • History transform edge cases: priority changes, label changes, reassignment, system actor, combined changes

  • Pagination: multi-page cursor-based pagination verification

  • Error handling: HTTP 401 → ValueError, HTTP 500 → RuntimeError, empty workspace

  • Data integrity: all relationships have required keys, entity labels match relationship labels

  • Constants: RELATION_TYPE_MAP completeness, PRIORITY_LABELS completeness

  • Entity/relationship tests for all new types: relations, comments, threading, resolution, milestones, updates, initiatives, attachments, Linear Docs

CLI integration tests in test_cli.py (+12 tests, TestLinearConnectorCLI)
  • Dry-run, warning without key, file generation, .env vars, .env.example, config settings

  • import_data.py script content, API key flag, team flag, template compilation

  • Multi-connector combination (linear + github)

Files modified
  • src/create_context_graph/connectors/linear_connector.py — all new entities, relations, history→trace transform

  • src/create_context_graph/templates/backend/connectors/linear_connector.py.j2 — matching template

  • tests/test_connectors.py — 22 new Linear tests (59 total)

  • tests/test_cli.py — 12 new Linear CLI integration tests


Phase 16 — Linear Connector Hardening & Test Suite Expansion (v0.8.3)

Linear connector improvements (10 improvements)
  • Named constants: 18 constants replacing hardcoded page sizes, rate limits, retry counts (ISSUES_PAGE_SIZE, MAX_PAGES, RATE_LIMIT_THRESHOLD, MAX_RETRIES, etc.)

  • Structured logging: logging.getLogger(__name__) with info/debug/warning/error throughout (auth, fetch summary, rate limits, pagination, truncation)

  • Error handling: URLError (network), JSONDecodeError (malformed response), GraphQL-level errors field (logged as warning, data still returned)

  • Pagination safety: max_pages parameter prevents infinite loops; null-safe data traversal with (x or {}) pattern

  • Rate limit 429: _retry_on_rate_limit() method with exponential backoff up to MAX_RETRIES attempts

  • Null safety: _safe_nodes() helper extracts connection nodes from fields that might be None; applied throughout fetch()

  • History/comment limits: Comments increased from 20 → 100, history from 15 → 50; pageInfo { hasNextPage } with truncation warnings

  • Team key validation: authenticate() validates team_key against available teams, lists available keys on mismatch

  • Incremental sync: fetch(updated_after="ISO8601") adds updatedAt: { gt: ... } filter to issue queries

  • Template parity: _describe_history_step() and decision trace generation ported to linear_connector.py.j2

CLI fix
  • Optional credential prompts no longer abort the wizard when left blank (Linear team key)

Test suite expansion (5 new test files, 133 new tests → 874 passing, 1,084 collected)
tests/test_security.py (84 tests) — Cypher injection prevention
  • Agent tool Cypher parameterization across all 22 domains ($param placeholders, no string literals in WHERE)

  • Domain scoping verification ($domain reference in queries)

  • Generated code static analysis: execute_cypher uses driver parameterization, no f-string user input, max_length on request models, GDS label validation

  • run_cypher tool safety across 4 frameworks: JSON parameter parsing, param passthrough, domain default

tests/test_doc_snippets.py (8 tests) — Documentation validation
  • YAML ontology examples from docs parse correctly (bookstore example, customizing tutorial)

  • CLI flags documented in cli-options.md exist in Click command

  • Cypher snippets from Linear tutorial have valid structure (MATCH/RETURN)

  • Make targets referenced in docs exist in Makefile template

  • Environment variable names in docs match .env.example template

tests/test_frontend_logic.py (23 tests) — SSE parsing & contract
  • Python SSE event parser: all 6 event types, multi-event streams, malformed JSON

  • Thinking/response splitting: THINKING_PATTERNS, CONTINUATION_PATTERNS, markdown breaks, error bypass

  • Backend/frontend event type contract: routes.py.j2 emits same events ChatInterface.tsx.j2 handles

  • Generated frontend structure: all event handlers, schema view mode, AbortController

tests/test_integration.py (7 tests, @pytest.mark.integration) — Neo4j database
  • Schema DDL execution: constraints and indexes apply without error

  • Fixture ingestion: entity counts, document nodes, relationships created

  • Agent tool queries execute against seeded data without errors

  • Domain scoping: two domains in same database, filter isolates correctly

tests/test_generated_tests.py (5 tests, @pytest.mark.slow) — Generated project tests
  • Scaffolded project test discovery: pytest --collect-only finds test_health and test_scenarios

  • Generated tests pass with mocked Neo4j for 4 frameworks (pydanticai, claude-agent-sdk, langgraph, anthropic-tools)

Linear connector tests (test_connectors.py +18, test_cli.py +1)
  • Error handling: URLError, JSONDecodeError, GraphQL errors logged

  • Team validation: valid key succeeds, invalid key lists available keys

  • Pagination safety: max_pages limit stops infinite loops

  • Null safety: all sub-objects None doesn't crash

  • Truncation warnings: comments/history hasNextPage logged

  • Logging: auth success, fetch summary

  • Rate limit: 429 retry succeeds, 429 exhausts retries

  • Incremental sync: updated_after filter in query, absent when not provided

  • _safe_nodes helper

  • Template has decision traces

CI changes
  • Integration tests (--integration) run in smoke-test job before E2E tests, using same Neo4j credentials

  • pyproject.toml: added integration marker

  • conftest.py: added --integration flag with auto-skip

Files created
  • tests/test_security.py

  • tests/test_doc_snippets.py

  • tests/test_frontend_logic.py

  • tests/test_integration.py

  • tests/test_generated_tests.py

Files modified
  • src/create_context_graph/connectors/linear_connector.py — all 10 improvements

  • src/create_context_graph/templates/backend/connectors/linear_connector.py.j2 — template parity

  • src/create_context_graph/wizard.py — optional credential prompt fix

  • tests/test_connectors.py — 18 new Linear tests (79 total)

  • tests/test_cli.py — 1 new template test (34 total)

  • tests/conftest.py — integration marker support

  • pyproject.toml — integration marker registration

  • .github/workflows/ci.yml — integration tests in smoke-test job


Phase 16b — Google Workspace Connector: Decision Trace Extraction (v0.8.4)

What was built
Google Workspace connector (google-workspace)
  • New connector importing from 6 Google APIs: Drive Files, Drive Comments, Drive Revisions, Drive Activity, Calendar (optional), Gmail (optional)

  • Decision trace extraction: Resolved comment threads in Google Docs become DecisionThread graph nodes with content, quotedContent, resolution, resolved status, and participant count — the core innovation

  • Each resolved thread generates a decision trace (thought/action/observation steps) in the same format used by neo4j-agent-memory

  • Unresolved threads become queryable DecisionThread nodes with resolved: false for the open_questions tool

  • Reply entities for each response in a thread, linked via HAS_REPLY with AUTHORED_BY

  • Revision entities tracking document evolution via HAS_REVISION and REVISED_BY

  • Activity entities from Drive Activity API v2 with action type mapping (create, edit, move, rename, delete, etc.)

  • Meeting entities from Calendar API (when --gws-include-calendar) with ATTENDEE_OF, ORGANIZED_BY, and DISCUSSED_IN (document-meeting linking via Drive URL detection)

  • EmailThread entities from Gmail API (when --gws-include-gmail) with metadata only (no body text for privacy) and THREAD_ABOUT linking

  • Cross-connector linking: Scans comment bodies, doc names, email subjects, meeting descriptions for Linear issue references (ENG-123 pattern) creating RELATES_TO_ISSUE relationships

  • OAuth2 authentication with dynamic scope building based on enabled features, gws CLI preferred with Python OAuth2 fallback

  • Rate limiting: 950 queries/100s sliding window with exponential backoff (5 retries, max 60s)

  • Person deduplication by email across all sub-fetchers

CLI integration
  • 9 new --gws-* CLI flags: --gws-folder-id, --gws-include-comments/--gws-no-comments, --gws-include-revisions/--gws-no-revisions, --gws-include-activity/--gws-no-activity, --gws-include-calendar, --gws-include-gmail, --gws-since, --gws-mime-types, --gws-max-files

  • Credential passing via config.saas_credentials["google-workspace"] dict

  • Updated --connector help text to include google-workspace

Agent tools
  • 10 decision-focused tools injected via renderer when connector is active: find_decisions, decision_context, who_decided, document_timeline, open_questions, meeting_decisions, knowledge_contributors, trace_decision_to_source, stale_documents, cross_reference

  • System prompt augmented with Google Workspace decision context description

  • Tools use Cypher queries traversing DecisionThread, Reply, Revision, Activity, Meeting, EmailThread nodes

Generated project integration
  • Scaffold template: google_workspace_connector.py.j2 with full parity — all 7 stages (Files, Comments/Decision Traces, Revisions, Activity, Calendar, Gmail, Cross-references) using OAuth2 only (no gws CLI fallback)

  • import_data.py.j2 updated with google-workspace dispatch case

  • .env and .env.example templates add GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GWS_FOLDER_ID

  • Renderer connector_templates mapping updated

Documentation (3 new pages, 3 updated)
  • Tutorial: "Decision Traces from Google Workspace" — step-by-step OAuth setup, scaffold, seed, explore, 10 example agent questions, 7 Cypher queries, combining with Linear

  • Explanation: "How Decision Traces Are Extracted" — conceptual guide to comment thread classification, resolution detection, cross-connector linking, graph vs RAG comparison

  • Reference: "Google Workspace Graph Schema" — complete node labels, relationships, properties, agent tools, cross-connector patterns

  • Updated: import-saas-data.md (how-to), cli-options.md (reference), sidebars.ts (navigation)

Tests added (36 new)
Unit tests in test_connectors.py (+28 Google Workspace tests)
  • Registration & metadata (3): connector registered, credential prompts with/without gws CLI

  • Authentication (3): missing creds, gws path, flag parsing

  • File fetching (3): basic files, relationships, documents

  • Comment threads (4): decision threads, replies, resolved→trace, unresolved→no trace

  • Comment relationships (1): HAS_COMMENT_THREAD, HAS_REPLY, AUTHORED_BY, RESOLVED_BY

  • Revisions (1): entities and relationships

  • Activity (1): entities, action types, relationships

  • Calendar (2): disabled by default, enabled with attendees/document linking

  • Gmail (2): disabled by default, enabled with participants/document linking

  • Cross-connector (2): Linear refs detected, no false positives

  • Integrity (2): person deduplication, relationship required keys

  • Integration (1): full pipeline with all features

  • Edge cases (2): empty workspace, comments disabled

CLI integration tests in test_cli.py (+8 tests, TestGoogleWorkspaceConnectorCLI)
  • Dry run output, generated files, .env vars, .env.example, import script, template compilation, all flags accepted, combined with Linear

Files created
  • src/create_context_graph/connectors/google_workspace_connector.py — core connector (~1,400 lines)

  • src/create_context_graph/templates/backend/connectors/google_workspace_connector.py.j2 — scaffold template

  • docs/docs/tutorials/google-workspace-decisions.md — tutorial

  • docs/docs/explanation/how-decision-traces-work.md — conceptual explainer

  • docs/docs/reference/google-workspace-schema.md — schema reference

Files modified
  • src/create_context_graph/connectors/__init__.py — register GoogleWorkspaceConnector

  • src/create_context_graph/cli.py — 9 new --gws-* flags, credential passing block

  • src/create_context_graph/renderer.py — connector template mapping, 10 GWS agent tools, system prompt augmentation

  • src/create_context_graph/templates/backend/connectors/import_data.py.j2 — google-workspace dispatch

  • src/create_context_graph/templates/base/dot_env.j2 — GWS env vars

  • src/create_context_graph/templates/base/dot_env_example.j2 — GWS env var docs

  • tests/test_connectors.py — 28 new tests, registry count updated to 9

  • tests/test_cli.py — 8 new GWS CLI tests

  • docs/sidebars.ts — 3 new pages in navigation

  • docs/docs/how-to/import-saas-data.md — Google Workspace section

  • docs/docs/reference/cli-options.md — 9 new --gws-* flags


Phase 17 — Claude Code Session History Connector (v0.9.0)

What was built
Claude Code connector (claude-code)
  • New connector importing local Claude Code session JSONL files from ~/.claude/projects/ — no authentication or API keys required

  • Parses user/assistant messages, tool_use/tool_result blocks, and progress entries from session JSONL files

  • Extracts 7 entity types: Project, Session, Message, ToolCall, File, GitBranch, Error

  • 10 relationship types: HAS_SESSION, HAS_MESSAGE, NEXT, USED_TOOL, MODIFIED_FILE, READ_FILE, PRECEDED_BY, ON_BRANCH, ENCOUNTERED_ERROR, RESOLVED_BY

  • Heuristic decision extraction (4 signal types):

    • User corrections ("no, instead use X") → Decision with rejected/chosen alternatives

    • Deliberation markers ("should we", "alternatively", "trade-off") → Decision with discussion context

    • Error-resolution cycles (tool error → corrective tool calls) → Decision with error context

    • Dependency changes (pip install, npm install, etc.) → Dependency decisions

  • Preference extraction from explicit statements ("always use X", "prefer Y over Z") and package install frequency across sessions

  • Secret redaction by default: API keys (sk-ant-*, ghp_*, xoxb-*, AKIA*), tokens, passwords, connection strings replaced with [REDACTED]

  • Content truncation modes: truncated (2000 chars, default), full, none (metadata only)

  • Token usage tracking from assistant message usage fields

  • File deduplication across sessions with modification/read counts

  • Implementation split into main connector + _claude_code/ subpackage (parser.py, redactor.py, decision_extractor.py, preference_extractor.py)

CLI integration
  • 5 new --claude-code-* CLI flags: --claude-code-scope (current/all), --claude-code-project, --claude-code-since, --claude-code-max-sessions, --claude-code-content

  • Credential passing via config.saas_credentials["claude-code"] dict

  • Updated --connector help text to include claude-code

Agent tools
  • 8 session intelligence tools injected via renderer when connector is active: search_sessions, decision_history, file_timeline, error_patterns, tool_usage_stats, my_preferences, project_overview, reasoning_trace

  • System prompt augmented with Claude Code session context description

  • Tools use Cypher queries traversing Session, Message, ToolCall, Decision, Preference, File, Error nodes

Generated project integration
  • Scaffold template: claude_code_connector.py.j2 — simplified standalone parser for re-importing sessions from generated projects

  • import_data.py.j2 updated with claude-code dispatch case

  • Renderer connector_templates mapping updated

Documentation (2 new pages, 4 updated)
  • Tutorial: "Build a Developer Knowledge Graph from Claude Code Sessions" — step-by-step guide: prerequisites, scaffold, seed, explore, decision extraction, preferences, Cypher queries, combining with other connectors, privacy/security

  • Reference: "Claude Code Session Schema" — complete entity types, relationships, decision categories, preference categories, agent tools, redaction patterns, example Cypher

  • Updated: import-saas-data.md (how-to), cli-options.md (reference), intro.md, sidebars.ts (navigation)

Tests added (45 new → 955 passing, 1,165 collected)
Unit tests in test_connectors.py (+38 Claude Code tests)
  • Registration & metadata (4): connector registered, get_connector, empty credential prompts, listed in connectors

  • Parser / discovery (8): discover projects, empty projects, discover sessions, max sessions, parse basic, parse tool calls, files tracked, skips meta, progress counted, malformed lines

  • Connector fetch (8): returns NormalizedData, entity types, relationships, file relationships, file deduplication, git branch, documents, token usage

  • Content modes (3): truncation, mode none, mode full

  • Scope/filtering (3): scope all, project filter, empty directory

  • Secret redaction (6): redact API keys, GitHub tokens, passwords, connection strings, empty strings, fetch redacts content

  • Error extraction (1): errors from is_error tool_results

  • Decision extraction (2): user correction detected, error-resolution cycle detected

  • Preference extraction (1): explicit statement detected

CLI integration tests in test_cli.py (+7 tests, TestClaudeCodeConnectorCLI)
  • Dry run output, generated files, import data includes connector, scope flag, all flags accepted, combined with other connector, agent tools injected

Files created
  • src/create_context_graph/connectors/_claude_code/__init__.py — package init

  • src/create_context_graph/connectors/_claude_code/parser.py — JSONL parsing, project/session discovery (~350 lines)

  • src/create_context_graph/connectors/_claude_code/redactor.py — secret detection and redaction (~70 lines)

  • src/create_context_graph/connectors/_claude_code/decision_extractor.py — heuristic decision extraction (~350 lines)

  • src/create_context_graph/connectors/_claude_code/preference_extractor.py — preference pattern detection (~170 lines)

  • src/create_context_graph/connectors/claude_code_connector.py — main connector (~380 lines)

  • src/create_context_graph/templates/backend/connectors/claude_code_connector.py.j2 — scaffold template

  • docs/docs/tutorials/claude-code-sessions.md — tutorial

  • docs/docs/reference/claude-code-schema.md — schema reference

Files modified
  • src/create_context_graph/connectors/__init__.py — register ClaudeCodeConnector (10th connector)

  • src/create_context_graph/cli.py — 5 new --claude-code-* flags, credential passing block

  • src/create_context_graph/renderer.py — connector template mapping, 8 Claude Code agent tools (_CLAUDE_CODE_AGENT_TOOLS), system prompt augmentation

  • src/create_context_graph/templates/backend/connectors/import_data.py.j2 — claude-code dispatch

  • tests/test_connectors.py — 38 new tests, registry count updated to 10

  • tests/test_cli.py — 7 new Claude Code CLI tests

  • docs/sidebars.ts — 2 new pages in navigation

  • docs/docs/intro.md — updated connector list

  • docs/docs/how-to/import-saas-data.md — Claude Code connector section

  • docs/docs/reference/cli-options.md — 5 new --claude-code-* flags

  • README.md — connector table, CLI reference, Claude Code description

  • CLAUDE.md — connector count, test counts, connector table, description

Phase 18 — Chat History Import: Claude AI & ChatGPT (v0.10.0)

What was built
Claude AI connector (claude-ai)
  • New connector importing conversations from Claude AI data exports (Settings > Account > Export Data)

  • Parses conversations.jsonl from .zip or raw .jsonl file — streaming line-by-line for memory efficiency on large exports (1GB+)

  • Extracts content from structured content blocks: text, tool_use, tool_result, thinking

  • Normalizes sender values (human → user, assistant → assistant)

  • Creates Conversation entities with title, UUID, timestamps, message count

  • Creates Message entities with role, content (truncated to 2000 chars), timestamps, tool call metadata

  • Generates Document per conversation with full concatenated text for search/RAG

  • Deep mode extracts DecisionTrace nodes from tool call sequences

  • All processing is local — no API keys required, no data sent externally

ChatGPT connector (chatgpt)
  • New connector importing conversations from ChatGPT data exports (Settings > Data Controls > Export Data)

  • Parses conversations.json from .zip or raw .json file — handles the tree-structured mapping field

  • Tree walking algorithm: finds root nodes, traverses depth-first following last child at branch points to reconstruct linear conversation path

  • Filters out system role messages and messages with is_visually_hidden_from_conversation: true

  • Converts Unix float timestamps to ISO 8601

  • Handles content_type variants: text, code, execution_output, multimodal_text

  • Tool-role messages (author.role = "tool") captured with execution_output content as tool results

  • Same entity schema as Claude AI: Conversation, Message, Document, DecisionTrace (deep mode)

Shared infrastructure (_chat_import/)
  • models.py — ParsedConversation and ParsedMessage dataclasses shared by both parsers

  • zip_reader.py — Zip extraction, format auto-detection (looks for conversations.jsonl vs conversations.json), streaming JSONL reader, JSON array reader, malformed line handling

  • All stdlib — no new dependencies (json, zipfile, io, re)

CLI integration
  • 7 new --import-* CLI flags: --import-type (claude-ai/chatgpt), --import-file, --import-depth (fast/deep), --import-filter-after, --import-filter-before, --import-filter-title, --import-max-conversations

  • Validation: --import-type and --import-file must be provided together

  • Auto-adds import type to config.saas_connectors — flows through existing connector pipeline

  • Credential wiring: file path + filter options passed via config.saas_credentials[import_type]

Documentation (2 new pages, 4 updated)
  • Tutorial: "Import Your AI Chat History into a Context Graph" — step-by-step: how to export from Claude AI and ChatGPT, scaffold with import flags, customize with filters, explore in frontend and Neo4j Browser, example Cypher queries, privacy notes, combining with other connectors

  • Reference: "Chat Import Schema" — complete entity types, relationships, platform differences, example Cypher queries

  • Updated: import-saas-data.md (how-to), cli-options.md (reference), sidebars.ts (navigation)

Tests added (78 new → 1033 passing, 1243 collected)
tests/test_chat_import.py (78 tests)
  • Zip reader (13): format auto-detection for zip/jsonl/json, unknown extensions, missing known files, JSONL streaming from zip and raw files, malformed line skipping, empty line handling, JSON reading from zip and raw files, non-array JSON rejection

  • Claude AI parser (15): single/multi conversation, zip support, message parsing, sender normalization, content block extraction (text/tool_use/tool_result/thinking), timestamp parsing, date filtering (after/before), title filtering (regex), max conversations limit, malformed conversation skip, empty conversations, text fallback, metadata

  • ChatGPT parser (14): single conversation, zip support, system message filtering, message content, Unix timestamp conversion, branching (follows last child), hidden message filtering, tool-role messages, date filtering, title filtering, max conversations, null message nodes, empty mapping, model slug metadata, malformed skip

  • Claude AI connector (15): registration, service name, credential prompts, authenticate with file path, file not found, wrong extension, fetch returns NormalizedData, entity properties, relationships (HAS_MESSAGE/NEXT), documents, empty file, multiple conversations, filters, deep mode traces, fast mode no traces

  • ChatGPT connector (15): registration, service name, credential prompts, authenticate with file path, file not found, wrong extension, fetch returns NormalizedData, entity properties, relationships, documents, empty file, branching conversation, hidden messages excluded, tool messages, filters, deep mode traces, fast mode no traces

  • CLI (3): import-type without file fails, import-file without type fails, dry-run with import flags

Files created
  • src/create_context_graph/connectors/_chat_import/__init__.py — shared package init

  • src/create_context_graph/connectors/_chat_import/models.py — ParsedConversation, ParsedMessage dataclasses

  • src/create_context_graph/connectors/_chat_import/zip_reader.py — zip extraction, format detection, streaming JSONL (~130 lines)

  • src/create_context_graph/connectors/_claude_ai/__init__.py — parser package init

  • src/create_context_graph/connectors/_claude_ai/parser.py — JSONL streaming parser with content block extraction (~180 lines)

  • src/create_context_graph/connectors/_chatgpt/__init__.py — parser package init

  • src/create_context_graph/connectors/_chatgpt/parser.py — JSON tree-walker parser (~200 lines)

  • src/create_context_graph/connectors/claude_ai_connector.py — Claude AI connector (~220 lines)

  • src/create_context_graph/connectors/chatgpt_connector.py — ChatGPT connector (~220 lines)

  • tests/test_chat_import.py — 78 tests (~650 lines)

  • docs/docs/tutorials/import-chat-history.md — tutorial

  • docs/docs/reference/chat-import-schema.md — schema reference

Files modified
  • src/create_context_graph/connectors/__init__.py — register ClaudeAIConnector, ChatGPTConnector (12 connectors total)

  • src/create_context_graph/cli.py — 7 new --import-* flags, validation, credential wiring

  • tests/test_connectors.py — registry count updated to 12, expected connectors set expanded

  • docs/sidebars.ts — 2 new pages in navigation

  • docs/docs/how-to/import-saas-data.md — Claude AI and ChatGPT connector sections, credential setup

  • docs/docs/reference/cli-options.md — 8 new --import-* flags documented, chat import example

Suggested improvements (future phases)
Phase 18b — Standard-depth entity extraction
  • LLM-powered entity extraction from conversation text (people, organizations, technologies, topics)

  • Batched extraction with configurable concurrency and rate limiting

  • Cross-conversation entity resolution (same entity mentioned in multiple conversations merged)

  • --import-depth standard level between fast and deep

  • ImportBatch provenance nodes tracking import source, timestamp, conversation count

  • Progress bar with Rich showing conversations parsed, entities extracted, ETA

Phase 18c — Standalone import subcommand
  • Convert CLI from @click.command() to @click.group() with backward-compatible default

  • create-context-graph import claude-ai ~/Downloads/export.zip --neo4j-uri bolt://localhost:7687 — import directly into existing Neo4j without scaffolding a project

  • --dry-run on the import subcommand to preview what would be imported

  • Incremental re-import: skip unchanged conversations, update modified, add new (via originalPlatformId matching)

Phase 18d — Generated project templates & agent tools
  • claude_ai_connector.py.j2 and chatgpt_connector.py.j2 scaffold templates

  • import_data.py.j2 updated with claude-ai and chatgpt dispatch cases

  • 6-8 agent tools for querying imported chat history: search_conversations, conversation_timeline, entity_mentions, topic_trends, tool_usage_history, conversation_summary

  • System prompt augmented with chat history context

Phase 18e — Cross-platform entity resolution
  • When importing from both Claude AI and ChatGPT, entities mentioned across platforms are merged

  • Fuzzy name matching with configurable threshold (default 0.85 similarity)

  • Property overlap detection (same email, URL, employer → merge)

  • MERGED_FROM relationship tracking provenance

Additional future improvements
  • Conversation branch import (ChatGPT): option to import all branches as separate conversation variants instead of just the main path

  • Thinking block storage: Claude AI thinking blocks stored as reasoning memory nodes (configurable: raw vs. summarized)

  • Privacy-preserving import: local entity extraction via spaCy/GLiNER instead of LLM, matching existing neo4j-agent-memory[spacy,gliner] extras

  • MCP server surface: expose import capability through neo4j-agent-memory MCP server as an import tool

  • Additional platforms: Google Gemini, Perplexity AI, GitHub Copilot Chat export import

  • Import visualization: real-time graph building during import, before/after comparison, entity timeline view

Phase 19 — neo4j-agent-memory v0.1.0 Alignment: MemoryIntegration, MCP Server & Entity Extraction (v0.9.0)

MemoryIntegration migration
  • Replaced MemoryClient with MemoryIntegration from neo4j-agent-memory v0.1.0

  • New shared memory.py.j2 template generates backend/app/memory.py with connect_memory(), close_memory(), store_message(), get_context(), resolve_session_id()

  • context_graph_client.py.j2 stripped of inline MemoryClient init (~60 lines removed), delegates to app.memory

  • All 8 agent templates migrated from get_conversation_history()/store_message() to get_context()/store_message()/resolve_session_id() from app.memory

  • get_context() returns rich context: messages + entities + preferences + traces (vs old simple message list)

  • store_message() returns extraction results (entities, preferences) used for SSE events

  • Graceful degradation preserved: ImportError catch if neo4j-agent-memory not installed

  • pyproject.toml.j2 bumped to neo4j-agent-memory[spacy,gliner]>=0.1.0

MCP server generation
  • New --with-mcp CLI flag and wizard step generates MCP server configuration for Claude Desktop

  • mcp/claude_desktop_config.json.j2 — pre-configured with project Neo4j credentials and slug

  • mcp/README.md.j2 — setup instructions with tool lists for core (6) and extended (16) profiles

  • make mcp-server Makefile target (conditional on --with-mcp)

  • --mcp-profile core|extended selects tool surface (default: extended with 16 tools)

  • README.md.j2 conditionally includes MCP section

Entity extraction & preference detection
  • store_message() triggers automatic entity extraction and preference detection via MemoryIntegration

  • Two new SSE event types: entities_extracted, preferences_detected

  • CypherResultCollector gains emit_entities_extracted() and emit_preferences_detected() methods

  • Frontend ChatInterface.tsx.j2 handles new events with teal entity badges and orange preference badges

  • routes.py.j2 emits extraction events in non-streaming fallback path

Session strategies
  • --session-strategy per_conversation|per_day|persistent CLI flag

  • SESSION_STRATEGY env var in generated .env.example and config.py

  • resolve_session_id() delegates to MemoryIntegration's strategy-based resolution

CLI & wizard updates
  • 5 new CLI flags: --with-mcp, --mcp-profile, --session-strategy, --auto-extract/--no-auto-extract, --auto-preferences/--no-auto-preferences

  • New wizard step 5b between Neo4j connection and API Keys: memory enhancement options (extraction, preferences, session strategy, MCP)

  • Dry-run output shows memory configuration and MCP profile

  • Success message shows make mcp-server when MCP enabled

Tests added (20 new → 1,053 passing, 1,259 collected)
tests/test_config.py (+4 tests)
  • test_memory_defaults — default values for all 5 new fields

  • test_mcp_config — MCP fields set correctly

  • test_session_strategy_values — all 3 strategy values accepted

  • test_auto_extract_disabled — extraction/preferences can be disabled

tests/test_renderer.py (+8 tests)
  • test_memory_py_generated — memory.py exists with MemoryIntegration

  • test_mcp_files_generated_when_enabled — MCP files generated when with_mcp=True

  • test_mcp_files_not_generated_by_default — no MCP files by default

  • test_pyproject_bumps_memory_version — >=0.1.0 in pyproject.toml

  • test_makefile_has_mcp_target_when_enabled — mcp-server target present

  • test_makefile_no_mcp_target_by_default — no mcp-server by default

  • test_env_example_has_session_strategy — SESSION_STRATEGY in .env.example

  • test_config_py_has_session_strategy — session_strategy in generated config.py

tests/test_cli.py (+6 tests)
  • test_with_mcp_flag — MCP files generated via CLI flag

  • test_session_strategy_flag — strategy flows to generated config

  • test_no_auto_extract_flag — extraction disabled in memory.py

  • test_mcp_profile_core_flag — core profile in MCP config

  • test_dry_run_shows_memory_config — memory info in dry-run output

tests/test_frontend_logic.py (+2 tests via updated assertions)
  • Updated SSE contract validation to include entities_extracted and preferences_detected

  • Updated event handler check to verify all 8 event types

tests/test_generated_project.py (+3 tests updated)
  • test_context_graph_client_delegates_to_memory — verifies app.memory import

  • test_memory_module_exists — verifies MemoryIntegration in memory.py

  • test_agent_uses_memory_module — verifies agent imports from app.memory

Files created
  • src/create_context_graph/templates/backend/shared/memory.py.j2

  • src/create_context_graph/templates/base/mcp/claude_desktop_config.json.j2

  • src/create_context_graph/templates/base/mcp/README.md.j2

Files modified
  • src/create_context_graph/config.py — 5 new ProjectConfig fields + constants

  • src/create_context_graph/cli.py — 5 new Click options, dry-run output, success message

  • src/create_context_graph/wizard.py — new step 5b, summary table additions

  • src/create_context_graph/renderer.py — context vars, conditional MCP, memory.py in shared

  • src/create_context_graph/templates/backend/shared/context_graph_client.py.j2 — stripped MemoryClient, added emitters

  • src/create_context_graph/templates/backend/shared/config.py.j2 — session_strategy setting

  • src/create_context_graph/templates/backend/shared/pyproject.toml.j2 — bumped >=0.1.0

  • src/create_context_graph/templates/backend/shared/routes.py.j2 — extraction events

  • src/create_context_graph/templates/backend/agents/pydanticai/agent.py.j2

  • src/create_context_graph/templates/backend/agents/claude_agent_sdk/agent.py.j2

  • src/create_context_graph/templates/backend/agents/openai_agents/agent.py.j2

  • src/create_context_graph/templates/backend/agents/langgraph/agent.py.j2

  • src/create_context_graph/templates/backend/agents/crewai/agent.py.j2

  • src/create_context_graph/templates/backend/agents/strands/agent.py.j2

  • src/create_context_graph/templates/backend/agents/google_adk/agent.py.j2

  • src/create_context_graph/templates/backend/agents/anthropic_tools/agent.py.j2

  • src/create_context_graph/templates/base/Makefile.j2 — mcp-server target

  • src/create_context_graph/templates/base/README.md.j2 — MCP section, SESSION_STRATEGY

  • src/create_context_graph/templates/base/dot_env_example.j2 — SESSION_STRATEGY

  • src/create_context_graph/templates/frontend/components/ChatInterface.tsx.j2 — new SSE events, badges

  • tests/conftest.py — mcp_config fixture

  • tests/test_config.py, tests/test_renderer.py, tests/test_cli.py

  • tests/test_frontend_logic.py, tests/test_generated_project.py

Summary

PhaseDescriptionStatusTests
1Core CLI & Template EngineComplete691 passing
2Domain Expansion & Data GenerationComplete(included above)
3Framework Templates & FrontendComplete(included above)
4SaaS Import & Custom DomainsComplete(included above)
5Polish, Testing & LaunchComplete(included above)
—Data Quality & UI EnhancementsComplete(included above)
—Graph Visualization & Agent FixesComplete(included above)
6Memory Integration, Multi-Turn & DXComplete(included above)
7Hardening, Security & DXComplete(included above)
8Streaming Chat & Real-Time Tool VizComplete(included above)
9QA Hardening & DX PolishComplete(included above)
10Framework Reliability, Data Quality & UXComplete(included above)
11v0.5.1 Testing Feedback FixesComplete(included above)
12v0.6.0 Comprehensive Testing FeedbackComplete(included above)
13v0.6.1 Stability, Data Quality & ToolsComplete(included above)
14v0.7.1 Embedding Regression, Data Quality & DocsComplete(included above)
15Linear Data Import ConnectorComplete705 passing
15bLinear Deep Graph: Relations, History, DecisionsComplete741 passing
16Linear Connector Hardening & Test Suite ExpansionComplete874 passing (1,084 collected)
16bGoogle Workspace Connector: Decision Trace ExtractionComplete874+ passing
17Claude Code Session History ConnectorComplete955 passing (1,165 collected)
18Chat History Import: Claude AI & ChatGPTComplete1,033 passing (1,243 collected)
19neo4j-agent-memory v0.1.0: MemoryIntegration, MCP, Entity ExtractionComplete1,053 passing (1,259 collected)
344 files · 334 not served here

Advantages

  • Rapidly scaffolds full-stack applications with domain-specific ontologies and agent tools in under 5 minutes. evidence: README.md
  • Provides flexible memory backend options, supporting both hosted NAMS and self-hosted Neo4j. evidence: README.md

Limitations

  • The NAMS hosted memory backend has a narrower write surface compared to self-hosted Neo4j, limiting some Cypher-based operations. evidence: README.md
  • Requires specific API keys and environment variables depending on the chosen agent framework and memory provider. evidence: README.md

Security

Risk level: Low risk

This brain runs

Agent instructions that run or fetch something (28)

  • CLAUDE.md: Invoked via `uvx create-context-graph` or `npx create-context-graph`.
  • CLAUDE.md: (2) every document/body ingest write failed (`role="document"` rejected — only user/assistant/system allowed — plus the conversation-404), fixed across all three NAMS ingest implementations (`run_nams_ingest`, scaffolded `import_data.py`, `make seed`'s `ingest_fixtures_nams`) with `role …[+63 chars]
  • CLAUDE.md: the old loop swallowed the AttributeError and printed "0 removed") — `--reset-database` and `make reset` now honestly report that no delete API exists and point at the NAMS dashboard.
  • CLAUDE.md: **NAMS domain ontology activation (new)**: NAMS pre-registers a server-side ontology for every bundled domain but auto-binds workspaces to `nams-default` until one is activated — generated apps now bind on `connect_memory()` (activate catalog match by domain id, or create-from-`backend …[+359 chars]
  • CLAUDE.md: **Carry-forward from v0.13.1 (feedback-report triage):** `create-context-graph --dry-run` no longer demands a NAMS API key (the credential gate is now scoped to non-dry-run flows in `cli.py:392`).
  • CLAUDE.md: **Carry-forward from v0.13.0 (v0.12.0 feedback-report fixes):** Fixed the bolt async/sync mismatch in the scaffolded `import_data.py` (`_ingest_via_bolt()` is `async def` and both call sites wrap with `asyncio.run`);
  • CLAUDE.md: uv venv && uv pip install -e ".[dev]"
  • CLAUDE.md: # Run tests
  • CLAUDE.md: **Data seeding** (`make seed`): Loads all four data types into Neo4j — entities, relationships, documents (as `:Document` nodes with `:MENTIONS` links to entities), and decision traces (as `:DecisionTrace` → `:HAS_STEP` → `:TraceStep` chains).
  • CLAUDE.md: As tools execute, the collector emits `tool_start` and `tool_end` events (with graph data).
  • CLAUDE.md: CrewAI and Strands are synchronous frameworks that run in worker threads via `asyncio.to_thread()`.
  • CLAUDE.md: When `--with-mcp` is passed (or selected in the wizard), the scaffold generates `mcp/claude_desktop_config.json` (pre-configured for the project's Neo4j instance), `mcp/README.md` (setup instructions), and a `make mcp-server` Makefile target.
  • CLAUDE.md: python-docx (Word).
  • CLAUDE.md: Connectors run at scaffold time AND are generated into the project with `make import` / `make import-and-seed` targets.
  • CLAUDE.md: pytest tests/test_generated_tests.py # Scaffold + install + run generated project test suite for 4 frameworks (slow, 5)
  • CLAUDE.md: Full-stack integration tests that scaffold a project, install dependencies, start the backend, and send chat prompts.
  • CLAUDE.md: make smoke-test # Run 3 key framework tests (pydanticai, google-adk, strands)
  • CLAUDE.md: # Or run directly with more control:
  • CLAUDE.md: python scripts/e2e_smoke_test.py --domain healthcare --framework pydanticai --quick
  • CLAUDE.md: python scripts/e2e_smoke_test.py --all-domains --framework claude-agent-sdk --quick
  • CLAUDE.md: python scripts/e2e_smoke_test.py --domain gaming --framework openai-agents # full mode (all prompts)
  • CLAUDE.md: | Target | Description | |--------|-------------| | `make test` | Fast unit tests (1,454 passing, no external deps) | | `make test-slow` | Full suite including matrix + perf + generated project + connector/functional tests (1,866 passing with connectors extra) | | `make test-matrix` | …[+533 chars]
  • CLAUDE.md: Generate fixture data: run the CLI with `--demo-data` or use `generator.py` directly
  • CLAUDE.md: | Framework | Directory | Pattern | Streaming | |-----------|-----------|---------|-----------| | PydanticAI | `pydanticai/` | `@agent.tool` decorator + `RunContext[AgentDeps]` | Full (`agent.run_stream()`) | | Claude Agent SDK | `claude_agent_sdk/` | Dict-based TOOLS list + bounded ag …[+787 chars]
  • CLAUDE.md: | Job | Trigger | Description | |-----|---------|-------------| | **test** | All pushes + PRs | Fast unit tests on Python 3.11 and 3.12 (`fail-fast: false` so one version's failure doesn't cancel the other) | | **lint** | All pushes + PRs | Ruff on `src/` and `tests/` (rule set pinned …[+444 chars]
  • CLAUDE.md: **Every job installs from `uv.lock` via `uv sync --locked --extra ...` and runs commands with `uv run --no-sync`.** Never mix `uv pip install` with a bare `uv run` in CI: `uv run` does an implicit lockfile sync that downgrades locked base deps underneath freshly-installed latest extras …[+94 chars]
  • CLAUDE.md: If `--locked` fails, run `uv lock` locally and commit the refreshed lockfile — dependency changes in `pyproject.toml` must ship with a matching `uv.lock`.
  • CLAUDE.md: The Makefile test/lint targets use `uv run --extra dev ...` so local runs resolve from the lock the same way.

Install scripts (1)

  • Makefile (make install): uv venv && uv pip install -e ".[dev]"
  • Low risk: network-instructions (CLAUDE.md:15)
  • Low risk: network-instructions (Makefile:10)
  • Low risk: scripts-present (scripts/e2e_smoke_test.py)
  • Low risk: scripts-present (scripts/regenerate_fixtures.py)

Attribution and licence

Created by
neo4j-labs
Declared authors
  • William Lyon (declared in pyproject.toml)
Publisher
neo4j-labs (Official neo4j-labs project)
Source
neo4j-labs/create-context-graph · commit 926e3b3
Licence
Apache License 2.0 (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by neo4j-labs.

Install from source

334 of its files are not served here, so there is no ZIP. neo4j-labs/create-context-graph at 926e3b3