✦ Context Ontology Accelerator
An open-source semantic context layer for AWS that combines knowledge graphs, formal ontologies, and rule-based systems with modern AI — enabling agents to retrieve context, validate it against business logic, and determine correct actions.
Architecture
The system follows a Scan → Model → Serve workflow:
- Scan — Connect data sources, discover schemas, enrich metadata, ingest unstructured documents
- Model — Induce and manage ontologies, define metrics, build a unified semantic graph
- Serve — Query via SPARQL federation (VKG), traverse the knowledge graph, serve context to AI agents via MCP
Access is governed by namespace isolation and role-based access control: namespace-scoped roles (owner, maintainer, data-steward, data-analyst) plus platform-level roles (platform-admin, platform-viewer) that apply across all namespaces. See the control-plane docs for the grants and authorization model.
Quick Start
Prerequisites
- Python 3.12, Node.js 22+, Docker
- pnpm (Node package manager — installed via
miseornpm install -g pnpm) - Java 17+ and Gradle (for Smithy codegen)
- uv (Python package manager)
Setup
Use a release, not the tip of
main. We recommend starting from a tagged release — github.com/aws/context-ontology-accelerator/releases.maintracks ongoing development.
# Clone at the latest release tag (replace <tag> with a release from the link above)
git clone --branch <tag> https://github.com/aws/context-ontology-accelerator.git
cd context-ontology-accelerator
make setup # install Python + CDK TypeScript dependencies
make format # auto-format code
make lint # check linting
make test # run unit tests
Full developer guide: external-docs/content/getting-started.md
Repository Structure
semantic-context/
├── models/ # Smithy API models (source of truth for API contracts)
├── smithy-generated/ # Auto-generated from Smithy (OpenAPI, Python interfaces, TS client)
├── infra/ # AWS CDK (TypeScript) — foundation + per-service stacks
├── packages/
│ ├── control-plane/ # Control Plane APIs
│ ├── data-layer/ # Data Layer APIs (query, retrieval, traversal)
│ ├── sources/ # Unified data source ingestion (database + documents)
│ ├── ontology-engine/ # Ontology induction, reasoning (HermiT/ELK)
│ ├── metric-service/ # Metric authoring and resolution
│ ├── vkg/ # Virtual Knowledge Graph (Ontop)
│ ├── mcp-server/ # MCP tools for AI agents
│ ├── context-manager/ # Serve layer Context Manager (query orchestration, upstream clients)
│ └── web-app/ # React + Cloudscape frontend
├── libs/common/ # Shared Python config, logging, exceptions
├── libs/ts-shared/ # Shared TypeScript interfaces and constants
├── scripts/ # CI-agnostic build/test/deploy scripts
└── external-docs/ # Published documentation (getting-started, deployment guides)
Tech Stack
| Layer | Technology |
|---|---|
| Languages | Python 3.12, TypeScript |
| API Contracts | Smithy → OpenAPI + Python interfaces + TypeScript client |
| IaC | AWS CDK (TypeScript) |
| Frontend | React + Cloudscape Design System |
| Package Management | uv (Python), pnpm (TypeScript) |
| Monorepo Orchestration | Nx |