Skip to content
ONTO
Features

The runtime primitives behind ONTO.

ONTO ships ten primitives that compose into one thesis: humans drive the state. Here's what each one does, why it exists, and where to read more.

Plan Mode

A runtime invariant. Side-effect tools never fire until you call again with execute scopes.

Set mode="plan_only" on a run and ONTO halts after task.create calls return. No tool side effects, no memory writes, no external API hits. You get a reviewable task list. The human reads it, edits it, approves it — and only then does a second run, with execute consent scopes, actually do work.
  • Built into the runtime; not a prompting convention.
  • The Tasks primitive is first-class — you can list, approve, reject, and re-plan.
  • Same agent code runs in plan mode and execute mode; only scopes change.
Read the full doc
Plan Mode

A runtime invariant. Side-effect tools never fire until you call again with execute scopes.

Typed memory (UPO + SMO)

Durable facts with provenance, confidence, decay, and consent scopes — not just embeddings.

The User Personalization Ontology (UPO) is your durable, typed facts: who the user is, what they prefer, what they own. The Session Memory Ontology (SMO) is transient context that auto-summarizes and promotes to UPO when warranted. Every assertion has provenance, confidence, a decay curve, regulation tags ([pii], [phi], [mnpi]), and consent scopes.
  • Answer "is this true right now?" — not "what looks similar?"
  • Survive across sessions without replaying chat logs.
  • Conflict detection and resolution surface as Plan Mode tasks.
Read the full doc
Typed memory (UPO + SMO)

Durable facts with provenance, confidence, decay, and consent scopes — not just embeddings.

Four-level ontology extraction

One flag (extract=True) routes natural-language facts to the right level.

The LLM proposes typed assertions and labels each one with a level: session (transient context), profile (durable identity), domain (app-scoped, multi-tenant), or tool (tool-local). The runtime audits the routing, applies consent scopes, and writes through Policy Guard.
  • Single prose paragraph → typed graph with audit trail.
  • Each level has its own decay, retention, and access rules.
  • Conflicts inside or across documents become Plan Mode tasks.
Read the full doc
Four-level ontology extraction

One flag (extract=True) routes natural-language facts to the right level.

Policy Guard

Per-call consent scopes. Tools refuse if their required scopes aren't granted.

Every tool declares required_consent (e.g., ["memory:write"] or ["patient:order"]). Every run carries a consent_scopes list. If the union doesn't cover what the tool needs, the runtime refuses with a structured error you can audit.
  • The same agent code runs in "read-only" mode (chat) and "write" mode (training).
  • Multi-tenant: scope tools by tenant, by role, by environment.
  • Audit-ready structured refusals — no silent fallbacks.
Read the full doc
Policy Guard

Per-call consent scopes. Tools refuse if their required scopes aren't granted.

Async writes + background memory

extract_async=True spawns memory writes to background; next LLM turn starts ~one RTT sooner.

For latency-sensitive agents, set extract_async=True and storage writes go to a background task. Set background_memory=True and session summarization and conflict resolution route to a cheaper model on a background worker. Foreground latency drops without sacrificing durability.
  • Cost meter splits foreground vs background — visible per user and per tenant.
  • Background work uses a cheaper model by default; configurable.
  • Durable: backgrounded writes are persisted before they're acknowledged.
Read the full doc
Async writes + background memory

extract_async=True spawns memory writes to background; next LLM turn starts ~one RTT sooner.

Open-weight defaults

Ships pointing at Ollama Cloud free models. Swap to Anthropic or OpenAI with one env var.

No API key relationship needed to start. Set OLLAMA_API_KEY (free) and run. Want Claude? Set ANTHROPIC_API_KEY. Want GPT? Set OPENAI_API_KEY. Want a fully local Ollama? Point at OLLAMA_BASE_URL. No code changes.
  • Default: Ollama Cloud (free open-weight gpt-oss:20b-cloud).
  • On-prem: local Ollama or any OpenAI-compatible endpoint + Sled or Postgres.
  • Provider-agnostic by env var. Cost-aware fallback.
Read the full doc
Open-weight defaults

Ships pointing at Ollama Cloud free models. Swap to Anthropic or OpenAI with one env var.

Cost meter

Per-user, per-session, per-tenant cost rollups — split between foreground and background.

onto.cost(user_id) returns a breakdown of tokens and dollars across runs and across the foreground/background split. For multi-tenant SaaS this is essential: you bill the customer, not the model provider.
  • Foreground cost (user-facing turns) vs background cost (memory worker).
  • Multi-tenant rollups; per-session granularity.
  • Exposed via API, CLI, and OpenTelemetry traces.
Read the full doc
Cost meter

Per-user, per-session, per-tenant cost rollups — split between foreground and background.

Eval framework + guardrails

Native eval harness reads TOML/JSON tests; built-in input/output guardrails.

onto eval <dir> reads test cases, runs the agent, and exits non-zero on failure. Built-in guardrails: max input/output length, regex block, regex redact, required keywords. Custom guardrails via a single trait. Gated at the input (before first LLM call) and output (before return).
  • CI-friendly: exit codes, structured output, artifact paths.
  • Same harness for offline regression and online drift detection.
  • PII redaction and prompt-injection patterns ship in the box.
Read the full doc
Eval framework + guardrails

Native eval harness reads TOML/JSON tests; built-in input/output guardrails.

Polyglot SDKs

One Rust core. Python (PyO3), TypeScript (napi-rs), Rust native. Plus HTTP.

Same semantics across all three. Choose by team familiarity, not by ecosystem lock-in. The HTTP server (onto-cli serve) covers any language we don't bind to natively — OpenAPI auto-generated.
  • Python: pip install onto-core
  • TypeScript: npm install @onto/core
  • Rust: cargo add onto-runtime onto-storage onto-llm
  • HTTP: docker run ghcr.io/onto-framework/onto-cli serve
Read the full doc
Polyglot SDKs

One Rust core. Python (PyO3), TypeScript (napi-rs), Rust native. Plus HTTP.

MCP + Claude Skills

Both first-class. Same config shape as Claude Desktop, Cursor, VS Code.

Bring any MCP server (stdio, HTTP, SSE) and any Claude Skill (SKILL.md). Tools register under mcp:<server>:<tool> and skill:<name> with their own consent scopes. The community ecosystem ports unchanged.
  • MCP transports: stdio, HTTP, SSE.
  • Native SKILL.md support — no porting needed.
  • Consent scopes apply to MCP and Skill tools the same way.
Read the full doc
MCP + Claude Skills

Both first-class. Same config shape as Claude Desktop, Cursor, VS Code.

Build with ONTO

The runtime primitives, in your own code, in under a minute.