Context Ontology Accelerator
v0.2.2 open-sourceAn open-source, ontology-based semantic context accelerator that enables AI agents to make more accurate, consistent, and explainable decisions.
Summary
Context Ontology Accelerator is an open-source semantic context layer for AWS that enables agents to retrieve and validate context by combining knowledge graphs, formal ontologies, and rule-based systems. It is run as a service, following a Scan → Model → Serve workflow where it connects data sources, induces ontologies, and serves context via SPARQL federation to AI agents. The tool is intended for practitioners working with agent context management, and its documentation positions it alongside other graph databases for data-layer operations. The repository structure suggests an active development cycle with clear separation between core infrastructure and API model generation.
An open-source, ontology-based semantic context accelerator that enables AI agents to make more accurate, consistent, and explainable decisions.
What Context Ontology Accelerator answers
What prerequisites are needed to set up the accelerator?
Python 3.12, Node.js 22+, Docker, pnpm, Java 17+, and uv
Does the setup require using the latest code from the main branch?
Developers should use a tagged release version rather than the tip of the main branch
How are the core APIs defined and managed?
API contracts are managed in the models directory using Smithy
Where do the deployment definitions reside?
The foundation and per-service stack definitions are located in the infra directory using AWS CDK (TypeScript)
What access levels are available for controlling the system?
Access is managed through namespace-scoped roles (owner, maintainer, data-steward, data-analyst) and platform-level roles.
What are the programmatic outputs of the context layer?
Context is served to AI agents via SPARQL federation.
Examples
Command line
No option matches that search.
| option | found in | since | description |
|---|
No option matches that search.
Values are placeholders taken from each option’s declared default. Nothing is executed here — the output shown is a recording of a run that already happened.
Release history
- v0.2.2
Adds an iterative NL→SQL agent, FK-aware ontology graph traversal, and
@pk/@fk(...) constraint tags for Athena connectors.└──▷ GET THIS VERSION$ git clone --branch v0.2.2 https://github.com/aws/context-ontology-accelerator.git # already have the repo? check out this version: $ git checkout v0.2.2
- ›Adds
explore_graphas an opt-in Tier-2 agent tool inOntologyGraphToolfor foreign-key-aware join discovery, walking the ontology graph up tokhops from a seed table to surface related tables that vector search alone would miss. - ›Adds
OntologyGraphTool.expand_fromas a non-agent entry point to the same FK graph walk, enabling flat NL→SQL pipelines (which have no agent loop) to benefit from the same join-discovery traversal. - ›Adds a self-correcting NL→SQL agent (
sql_agent.py) that iteratively callssearch_tables,get_table_schema,generate_sql, andexecute_sql— SQL execution is gated on an opaque handle returned bygenerate_sql, preventing arbitrary SQL from running. - ›Adds
@pkand @fk(...) constraint tags parseable inside Athena column comments, enabling primary- and foreign-key metadata to travel through the Athena federation protocol (which has no native key-constraint field) and produce the samePrimaryKey/ForeignKeyrecords as the JDBC path.
- ›Adds
- v0.2.1
v0.2.1 adds a CloudWatch dashboard for the scan/enrichment pipeline and pagination support to the
list_metricsMCP tool.└──▷ GET THIS VERSION$ git clone --branch v0.2.1 https://github.com/aws/context-ontology-accelerator.git # already have the repo? check out this version: $ git checkout v0.2.1
- ›Adds
nextTokenpagination parameter to thelist_metricsMCP tool, alongside renamed parametersnamespaceIdandmaxResults(max 1000). - ›Adds a CloudWatch dashboard for the structured scan and enrichment pipeline, sourcing custom metrics from sources Lambdas via EMF-stdout.
└──▷ BREAKING ON UPGRADE- !The
list_metricsMCP tool parametersnamespace_idandmax_resultsare renamed tonamespaceIdandmaxResults; any caller passing these by keyword name will break.
- ›Adds
- v0.2.0
v0.2.0 adds Redshift Serverless as an alternative query engine and new CloudWatch guardrail observability metrics.
└──▷ GET THIS VERSION$ git clone --branch v0.2.0 https://github.com/aws/context-ontology-accelerator.git # already have the repo? check out this version: $ git checkout v0.2.0
- ›Adds
executionEngine=REDSHIFT+redshiftWorkgrouponboarding parameters to route Glue-backed sources through Amazon Redshift Serverless via theredshift-dataAPI instead of Athena, with automatic Trino→Redshift SQL transpilation andawsdatacatalog."<db>"."<table>"reference rewriting. - ›Adds guardrail observability under the
COA/GuardrailsCloudWatch namespace, emittingGuardrailInvocations(Count),GuardrailBlocked(Count), andGuardrailLatency(Milliseconds) metrics with support for bothtransport="put"(PutMetricData, used by ECS Fargate kg-build/enrichment/ontology tasks) and Embedded Metric Format via CloudWatch Logs. - ›Adds
SQLFirewall.validateenforcement and dialect-aware LIMIT injection to the Redshift execution path, restricting queries to SELECT-only and preventing large scans from fully materializing. - ›Introduces
CatalogConstraintandparse_referred_columnimports alongside deterministic IRI minting viatable_identityand_name_discriminator(SHA-256-derived 8-char suffix) for stable cross-run ontology graph generation.
- ›Adds