Skip to content

context blueprint

The blueprint command exports your data products as AI Blueprints — self-contained YAML files that capture the complete semantic specification following the Open Semantic Interchange (OSI) v1.0 standard.

An AI Blueprint is the Gold-tier deliverable. It contains every dataset, field, relationship, metric, business rule, guardrail filter, golden query, and glossary term for a data product in a single portable file.

Terminal window
context blueprint [model]
ArgumentDescription
modelModel name to export (omit for all models)
OptionDescriptionDefault
--out <path>Output directory for blueprint files./blueprints
--stdoutPrint to stdout instead of writing files
--context-dir <path>Path to context directorycontext/
Terminal window
context blueprint

Writes one .data-product.osi.yaml file per model to ./blueprints/.

Terminal window
context blueprint sales-analytics
Terminal window
context blueprint sales-analytics --stdout
Terminal window
context blueprint --out ./dist/blueprints
sales-analytics.data-product.osi.yaml
# AI Blueprint — Open Semantic Interchange (OSI) v1.0
osi_version: "1.0"
semantic_model:
name: sales-analytics
description: Revenue and order analytics
owner: analytics-team
tier: gold
trust_status: verified
glossary:
- term: Revenue
definition: Total completed transaction amount
related_fields:
- orders.total_amount
datasets:
- name: orders
description: Customer orders
primary_key: [order_id]
fields:
- name: total_amount
semantic_role: measure
aggregation: SUM
# ... all fields with full metadata
relationships:
- name: orders_to_customers
from: { dataset: orders, columns: [customer_id] }
to: { dataset: customers, columns: [id] }
cardinality: many_to_one
metrics:
- name: total_revenue
expression: SUM(total_amount)
business_rules:
- name: completed_orders_only
definition: Only include completed orders in revenue calculations
applied_always: true
guardrail_filters:
- name: exclude_test_orders
filter: "status != 'test'"
tables: [orders]
golden_queries:
- question: "Top customers by revenue last quarter"
sql: |
SELECT customer_id, SUM(total_amount) ...
  • Share them — hand a blueprint to any team or tool that needs to understand your data
  • Serve via MCP — the context://data-product/{name} resource exposes blueprints to AI agents
  • Import them — any OSI-compliant tool can consume the YAML directly
  • Version them — commit blueprints to git alongside your code
  • Serve blueprints to agents: context serve
  • Check what’s missing for Gold: context tier
  • Create more data products: context new