aoe-engine
Health Pass
- License — License: Apache-2.0
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 13 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
AOE (Agent Ontology Engine): compile external domain models and corpora into verified runtimes, query plans, and governed actions.
AOE — Agent Ontology Engine
Agent Ontology Engine for software that needs to know, decide, and act.
中文 ·
Documentation ·
·
Apache-2.0
AOE (Agent Ontology Engine) turns an external domain
model and corpus into a deterministic, versioned, verifiable runtime. An
application or Agent can then discover what exists, ask for a constrained
selection plan, resolve the right projection, and invoke governed actions
through one contract exposed by an embedded SDK, MCP, or HTTP.
The short version: AOE is the engine; a domain's vocabulary and data are
packages around it. There is no production Ticket schema, design ontology, or
fixed list of atom kinds hidden inside Core.
Why this exists
Most Agent knowledge systems start with a document or a skill file. That is a
fine authoring format, but it becomes a poor runtime boundary when a system has
to answer four harder questions:
- What does this domain mean, exactly? Which types and relations are valid?
- Which pieces of knowledge are relevant for this request, and why?
- Can the runtime prove that the loaded snapshot is the one that was built?
- What may an Agent read, and what may it actually change?
AOE makes those questions explicit without making the core domain-specific.
The model declares the vocabulary. The corpus supplies the units and evidence.
The compiler produces a verified snapshot. Query returns an explainable plan.
Action execution has its own authorization and evidence path.
The boundary
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Model Package │ │ Corpus Package │ │ Adapter / Tools │
│ types, relations │ │ units, sources │ │ providers, evals │
└────────┬─────────┘ └────────┬─────────┘ └────────┬─────────┘
└─────────────────────┼─────────────────────┘
▼
┌────────────────────┐
│ AOE │
│ parse → IR → build │
│ verify → snapshot │
└─────────┬──────────┘
│
┌────────────────┴────────────────┐
▼ ▼
Selection Plan Governed Action
│ │
└──────────────┬──────────────────┘
▼
SDK · MCP · HTTP
What belongs where
| Boundary | Owns | Does not own |
|---|---|---|
| AOE Core | meta-schema, IR, parser, compiler, snapshot verification, query/action contracts | domain type names, business rules, corpus content |
| Model Package | types, fields, relations, projections, retrieval profiles, functions, actions, policies, migrations | compiled corpus bytes |
| Corpus Package | units, assets, provenance, licences, releases, signatures | engine implementation |
| Adapter Package | source importers, provider bindings, validators, evaluators | Core schema decisions |
| Domain Package | a deployable composition of model + corpus + adapters + tools + optional Agent Skill | changing Core to accommodate one domain |
If replacing Ticket with Recipe requires a new branch in the engine, the
boundary is wrong. In a healthy Domain Package, the engine only sees declared
types and contracts.
How the runtime works
1. Model-driven compilation
The compiler reads a Model Package and source units, normalizes them into a
shared IR, emits model-defined projections, and writes a deterministic bundle:
model/ + corpus/sources/
│
├─ parser + structural checks
├─ IR normalization
├─ projection / relation compilation
├─ corpus index + manifest + model lock
└─ optional signature
│
▼
immutable verified snapshot
_index.xml, projection artifacts, corpus.manifest.json, and model.lock are
generated outputs. They must not be edited by hand. Runtime verifies identity,
paths, signatures (when required), and the canonical content digest before it
serves a snapshot.
2. Explainable query
The query path does not return a mysterious list of strings. It returns aSelectionPlanIR that records:
- candidate generators and feature contributions;
- visibility and principal filtering before ranking;
- hard constraints and soft preferences;
- relation closure, expansion, exclusion, cycle policy, and load order;
- projection levels and token budget decisions;
- diagnostics when an external generator or relation semantic is unavailable.
The plan is useful to an Agent, but also to a test, an audit log, or a human
debugging why a result was selected.
3. Governed action
Read and write are intentionally different paths. An action must declare its
input/output, side effects, capabilities, preconditions, idempotency, and
approval requirements. The runtime can then perform preflight and dry-run,
authorize a principal, evaluate policy, request human approval, retry within a
bound, and append evidence to an event store. Reading a unit never implies
permission to mutate external state.
Quick start
The repository is a TypeScript workspace and uses Bun for
installation, builds, and tests. Node.js 22+ is useful for consumers of the
HTTP and MCP entry points.
git clone https://github.com/kernary-aoe/aoe-engine.git
cd aoe-engine
bun install --frozen-lockfile
# confidence check
bun run typecheck
bun run test
bun run build
Run the CLI without installing a global binary:
bun packages/cli/src/index.ts --help
bun packages/cli/src/index.ts --version
Build and mount the smallest example
The engine repository carries small example packages so that the full path is
easy to inspect. They are not built-in Core ontology:
bun scripts/build-atom-dirs.ts \
--src examples/hello-world/primes/sources \
--out examples/hello-world/primes/compiled \
--model compat/prime-v1-model \
--corpus org.example/hello-world \
--release 2026-08-31
The output is a verified snapshot containing an index, projections, manifest,
and lock. To expose it through the generic MCP transport:
AOE_CORPUS_DIR=examples/hello-world/primes/compiled \
AOE_MODEL_DIR=compat/prime-v1-model \
bun packages/mcp-server-core/src/index.ts
The MCP entry point reads the mounted Corpus and Model paths from its environment
configuration. New integrations should use the aoe CLI and the package
contracts documented below.
Author a domain without changing the engine
A Domain Package normally looks like this:
my-domain/
├── model/
│ ├── model.yaml # types, relations, projections, actions
│ └── policies.yaml # declared policy sets
├── corpus/
│ ├── sources/ # source declarations / unit inputs
│ └── corpus.yaml # identity, provenance, publication policy
├── adapters/ # optional source/provider integrations
├── tools/ # optional domain MCP or HTTP handlers
└── README.md
The exact declaration format is intentionally a package contract rather than a
Core constant. Start with:
The reference Frontend Design Domain Package
is one example of this boundary. Security, backend, mobile, and cooking
corpora in the workspace are additional conformance fixtures, not Core
features.
Package map
The workspace is organized by contract, not by a single framework package:
| Area | Packages | Responsibility |
|---|---|---|
| Declarations | model-schema, corpus-schema |
Load and validate external package data |
| Language / IR | parser, types, ir |
Parse source syntax and carry stable contracts |
| Build | compiler, bundle |
Compile units, projections, indexes, manifests, locks |
| Read path | runtime, query-engine, constraint-solver, projection-engine |
Verify snapshots and produce selections |
| Write path | action-runtime, policy-engine, event-store |
Govern actions and record evidence |
| Integration | sdk, sdk-codegen, mcp-server-core, http-server, cli |
Expose the same contracts to hosts |
| Extension / quality | plugin-host, registry, observability, evaluation-engine, testkit, language-server |
Host adapters, distribution, telemetry, evaluation, tooling |
The workspace packages are implementation modules for AOE. Their names are
listed here so a host can choose the layer it needs; domain users normally
depend on the SDK or a transport rather than importing every module.
Security and reproducibility invariants
AOE is designed to fail closed at the boundaries that matter:
- canonical digests are independent of checkout location and object order;
- manifest and projection tampering fails before content is returned;
- lexical traversal, absolute paths, symlink escapes, FIFOs, and other
non-regular artifacts are rejected; - visibility is applied before ranking and relation expansion;
- hard constraints cannot be outweighed by a larger score;
- capability and policy checks happen before effectful execution;
- idempotency is scoped by tenant/workspace and conflicting replays fail;
- unavailable external providers produce diagnostics, not fabricated passes.
Run bun run test to exercise these invariants. The integration workspace runs
the stronger cross-package check with bun run verify.
Project status
The v0.2 engine, SDK, generic query planner, governed action runtime, MCP and
HTTP transports, model/code generation, language-server foundation, and
reference Domain Package are implemented and tested. The hosted Registry,
first-party evaluation service, and production observability deployment are
extension products, not hidden assumptions in Core.
The next work should deepen package distribution and migration tooling rather
than add domain-specific branches to the engine.
Contributing
Engine changes belong here. Domain vocabulary and corpus content belong in a
Domain Package. Before opening a pull request:
bun install --frozen-lockfile
bun run typecheck
bun run test
bun run build
Read CONTRIBUTING, or the
中文贡献指南. For a security issue, use
SECURITY.md.
License
AOE Engine is licensed under Apache-2.0. External Domain and
Corpus Packages carry their own source attribution and licence terms.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found