aws/context-ontology-accelerator
An open-source, ontology-based semantic context accelerator that enables AI agents to make more accurate, consistent, and explainable decisions.
✦ Context Ontology Accelerator – What It Is
Context Ontology Accelerator is an open‑source AWS‑focused platform that builds a semantic layer over an organization’s data. It automatically discovers schemas, ingests structured and unstructured sources, creates a unified knowledge graph (ontology), and then serves that graph to AI agents or applications through SPARQL‑based queries and a custom MCP (Message Control Protocol) interface. The goal is to let downstream AI systems retrieve the right “context”, have it validated against business rules, and decide what action to take.
Core Concepts & Workflow
| Step | What Happens | Key Components |
|---|---|---|
| Scan | Connect to databases, document stores, etc.; extract schemas and metadata; enrich with tags. | sources/ package – connectors & ingestion pipelines |
| Model | Generate or import ontologies, run reasoning engines, compute metrics, and merge everything into a single virtual knowledge graph. | ontology-engine/ (HermiT/ELK reasoners), metric-service/, vkg/ (Ontop virtual KG) |
| Serve | Expose the graph via SPARQL federation and a lightweight MCP server so AI agents can ask for context and receive validated results. | mcp-server/, context-manager/ (query orchestration) |
Repository Layout (high‑level)
semantic-context/models/– Smithy definitions that are the source of truth for all APIs.semantic-context/smithy-generated/– Code generated from the Smithy models (OpenAPI specs, Python client stubs, TypeScript SDK).infra/– AWS CDK (TypeScript) stacks that provision the required services (e.g., Lambda, DynamoDB, Neptune, IAM roles).packages/– The functional modules listed above (control‑plane, data‑layer, sources, ontology‑engine, etc.).web-app/– A React front‑end built with AWS Cloudscape for visualising the ontology and managing namespaces.libs/– Shared utilities for Python and TypeScript.external-docs/– Published user guides and deployment docs.
Technology Stack
| Layer | Tech |
|---|---|
| Languages | Python 3.12, TypeScript |
| API contracts | Smithy → OpenAPI + generated Python interfaces + TypeScript client |
| Infrastructure as Code | AWS CDK (TypeScript) |
| Frontend | React + Cloudscape Design System |
| Package managers | uv (Python), pnpm (Node) |
| Monorepo tooling | Nx |
| Reasoning engines | HermiT, ELK (via owlready2) |
| Virtual KG | Ontop (SPARQL federation) |
| Testing / linting | pytest, ruff, mypy (strict) |
| Build | Smithy CLI (Java 17 + Gradle) |
Getting Started (quick‑start)
- Pick a released tag – the
mainbranch is bleeding‑edge; use a stable release from the GitHub releases page. - Clone the repo at that tag and
cdinto it. - Run the provided
makecommands:make setup # installs Python (via uv) and CDK/TS deps (via pnpm) make format # auto‑formats the codebase make lint # runs ruff/mypy and TS linters make test # executes unit & integration tests - Follow the full developer guide at
external-docs/content/getting-started.mdfor deploying the CDK stacks, loading sample data, and launching the web UI.
Who Might Use It?
- Enterprise AI teams that need a reliable, governed source of contextual knowledge for large language model (LLM) agents.
- Data engineers looking to expose a unified semantic graph without moving data out of AWS.
- Compliance officers who want role‑based, namespace‑scoped access control over what context an AI system can see.
- Application developers building RAG (retrieval‑augmented generation) pipelines that require validated, business‑logic‑aware facts.
License & Contribution
- Licensed under Apache 2.0.
- The repo is a read‑only mirror; pull requests are not accepted. Issues can be opened for bugs or feedback, and Amazon employees have a separate contribution path.
Bottom Line
The Context Ontology Accelerator provides a production‑grade, AWS‑native stack for turning heterogeneous data into a governed knowledge graph that AI agents can query safely. It combines classic semantic‑web tools (ontologies, SPARQL, reasoners) with modern cloud infrastructure and developer tooling, making it a concrete bridge between enterprise data and next‑gen AI applications.
Related
- Project
- Project
- Project
- Project
- Project