Skip to main content
Create Context Graph ships with 22 built-in domains, but you are not limited to them. You can describe any domain in plain English and let the LLM generate a complete ontology, or write the YAML yourself.

What gets generated

When you provide a domain description, the LLM generates a full ontology including:
  • Entity types — domain-specific node labels with properties, colors, and icons
  • Relationships — typed edges between entity types
  • Agent tools — Cypher-backed tools scoped to your domain
  • Document templates — prompts for generating realistic domain documents
  • System prompt — a tailored agent persona for your domain
  • Visualization config — node colors, sizes, and a default Cypher query
  • Demo scenarios — example chat prompts to explore the generated data
All of this feeds directly into the generated FastAPI backend, Next.js frontend, and Neo4j schema — no additional configuration required.

Option 1: CLI flags

Pass --custom-domain with a plain-English description and your Anthropic API key:
The --custom-domain flag triggers LLM ontology generation and bypasses the domain selection step. All other flags (--framework, --demo-data, --connector, etc.) work as usual.
--custom-domain requires --anthropic-api-key or ANTHROPIC_API_KEY set in your environment. The LLM makes up to 3 generation attempts and validates the output against the DomainOntology schema before proceeding.

Option 2: Interactive wizard

Run the CLI without flags and choose the custom domain option at the domain selection step:
1

Select 'Custom (describe your domain)'

At the domain selection step, scroll past the built-in domains and choose “Custom (describe your domain)”.
2

Enter your description

Type a natural-language description of your domain, for example:
3

Review and accept or refine

The wizard displays an ontology summary showing the generated entity types, relationships, and agent tools. You can accept it or refine your description and regenerate.
The wizard prompts for an Anthropic API key if ANTHROPIC_API_KEY is not already set in your environment.

Option 3: Manual YAML

Write a domain YAML file from scratch. The YAML must follow the domain ontology schema. Once written, save it into the src/create_context_graph/domains/ directory in the source tree (for contributors), or place it in ~/.create-context-graph/custom-domains/ for personal reuse. A minimal example:
inherits: _base automatically merges the shared POLE+O entity types (Person, Organization, Location, Event, Object) into your domain. See src/create_context_graph/domains/ in the source repository for complete examples.

Saving and reusing custom domains

LLM-generated ontologies are saved automatically to ~/.create-context-graph/custom-domains/. You can inspect them:
Generated domains are also copied into the scaffolded project at data/ontology.yaml, so each project is self-contained and does not depend on the saved file. To scaffold from a saved custom domain again, use --custom-domain with the same description (the CLI will regenerate the ontology), or run the interactive wizard and select the custom domain option.

Tips for writing good descriptions

Be specific about entities

“Healthcare with patients, doctors, diagnoses, medications, and appointments” produces better results than “healthcare.”

Mention key relationships

“Students enroll in courses taught by professors” helps the LLM define the correct graph edges.

Include domain actions

“Track shipments, manage inventory, handle returns” gives the LLM material for generating agent tools.

Keep it focused

1–3 sentences works best. Long paragraphs dilute the signal and can produce unfocused ontologies.