StackMap
Subscribe
Explore / context-ontology-accelerator
aws

context-ontology-accelerator

AWS's ontology-based context layer: scan your sources, induce ontologies, then serve validated context to agents over MCP — SPARQL federation, a virtual knowledge graph and OWL reasoning.

630 61 Python Apache-2.0updated 3 days ago
View on GitHubDispute this mapping →
Curator's take

The serious option when an agent's answers have to be defensible: ontology induction and OWL reasoning (HermiT/ELK) sit between your data and the model, an Ontop virtual knowledge graph federates SPARQL without copying anything, and namespace isolation plus platform roles govern who sees what. The cost is equally serious — it deploys as AWS CDK stacks across a Smithy-generated monorepo wanting Python 3.12, Node 22, Java 17, Docker and Nx, so this is a platform-team project, not a weekend install. Note the governance too: published as a read-only mirror with no pull requests accepted, and you're told to start from a release tag rather than `main`.

Mapped by ShipWithAI editors · links verified
README.md

✦ 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 mise or npm 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. main tracks 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

Continue your stack

What teams reach for next — and why each earns a place beside context-ontology-accelerator. Ranked by curator confidence.