Context Graph Example
The canonical RevOps / context-graph example lives in examples/revops/. It models signals, decisions, actions, opportunities, and projects in one graph, and it now showcases:
- schema
@description(...)and@instruction(...) - query
@description(...)and@instruction(...) - checked-in
nanograph.tomldefaults and aliases - lexical and semantic signal search scoped by graph traversal
Setup
cd examples/revops
nanograph init
nanograph load --data revops.jsonl --mode overwrite
nanograph check --query revops.gq
The example config gives you:
db.default_path = "omni.nano"query.roots = ["."]- aliases like
why,trace,value,pipeline, andsignals - deterministic mock embeddings for
Signal.summaryEmbedding
See Project Config for the full config and env model.
Describe the schema
The schema carries agent-oriented metadata on types like Decision and Signal.
nanograph describe --type Signal --format json
That JSON includes:
descriptioninstructionkey_property- property descriptions
- edge summaries and endpoint-key metadata
Useful aliases
Why did an opportunity happen?
nanograph run why opp-stripe-migration
Trace a signal through decision and action:
nanograph run trace sig-hates-vendor
Show value created by a signal:
nanograph run value sig-hates-vendor
Pipeline summary:
nanograph run pipeline
Semantic signal search scoped to one client:
nanograph run signals cli-priya-shah "procurement approval timing"
Query metadata in action
Queries like decision_trace and semantic_signals_for_client include @description(...) and @instruction(...), so table output gives agents extra context before the rows:
Query: decision_trace
Description: Trace an opportunity back to the decision, actor, and signal that created motion.
Instruction: Use as the default 'why did this happen?' query for an opportunity slug.
Why this example matters
This example shows how NanoGraph can represent operational reasoning directly:
Signalcaptures observed evidenceDecisionrecords why work should happenActionproves what actually happened- graph traversal lets you move across those layers without flattening everything into one table
With the new search fields, you can also ask retrieval-style questions inside that reasoning graph instead of keeping search and graph logic separate.