Overview
The Xema system layer lets humans, agents, workflows, and external apps share one substrate of typed objects, capability-mediated invocations, and installable software bundles called biomes.
Who Xema is for
- Org admins deciding which biomes to install, what each one is allowed to do, and how external audiences reach the org.
- Biome authors packaging domain capabilities — agents, skills, workflows, connectors, document templates, UI surfaces — without reaching into other biomes or platform internals.
- Integrators embedding Xema into their own customer-facing products through delegated identities and scoped capability grants.
- Agents that need a stable, self-describing surface to discover what exists, what they may invoke, and why a call was denied.
The four primitives + Agent Composition
Agent capability in Xema is built from exactly four primitives:
- Skill — a folder bundle that teaches an agent how to do something.
- Tool — an executable capability (MCP-exposed or kernel-built-in) an agent can call.
- Model — an LLM provider/model pair, resolved per-invocation by the Model Resolution Matrix.
- Agent — an agent definition (identity, prompt, intrinsic skills, intrinsic tools).
Agent Composition wires them together: an agent armed with skills and tools whose sub-agents are themselves fully-armed composition nodes. The same composition is usable as both an interactive-session agent and a workflow step.
Xema does not add a fifth primitive. The Object Model, Capability Protocol, and the biome package format are the substrate over which the four primitives compose.
The four-concept runtime model
Every capability call in Xema is described by exactly four concepts working together:
- Space — where the data lives and who owns it (a hierarchical URI from
Systemdown toUser, with a data-classification floor). - Execution Environment — which trust profile applies to this call (
system,org,project,app,session,sandbox,public,store-review,trusted-dev). - Execution Context — the per-invocation envelope binding subject, Space, Environment, capability, and input.
- Policy — the decision protocol that turns an Execution Context into
allow/deny/needs_approvalplus obligations and route hints.
A Subject invokes a Capability exposed by a Biome, against an object in a Space, from an Execution Environment, executed by a Runner, when Policy allows it.
Seven conceptual architecture layers
These are a product-explanation model, from infrastructure to experience. They are not the repository's dependency tiers. Code and biome boot order use the four enforced scope tiers kernel, system, base, and platform.
| Layer | Owns |
|---|---|
| 6 — Experience / Surface | Xema Web, embedded widgets, customer portals, the Shell UI, the Console |
| 5 — Audience | App Clients, External Subjects, Delegated Sessions — the boundary between Xema users and "customers of a customer" |
| 4 — Apps | An App = one or more installed biomes configured for an audience with branding, capability policy, and a version lockfile |
| 3 — Biomes | Installable software bundles: agents, skills, workflows, connectors, document templates, FE/BE contributions, optional services |
| 2 — Platform Services | The in-the-box services every sub-app needs (workflow engine, artifact store, knowledge base, biome host, the new object registry, capability gateway, authorization, shell, store) |
| 1 — Kernel | Pure contracts and SDKs — the Xema System Interface (XSI). Zero domain knowledge |
| 0 — Infrastructure | Managed database, Redis, object store, Kubernetes, LLM providers — not ours to design |
The Xema System Interface (XSI)
XSI is the stable external interface every biome, app, agent, workflow, and external surface speaks. One protocol, five planes:
- Object Model — the typed universe of things Xema knows about (
XemaObject,XemaObjectKind), each anchored to a Space. - Contribution Protocol — how new objects and behaviors enter the platform (kernel-typed envelope, closed
ContributionKindenum, backend slot registry). - Capability Protocol — how those objects are invoked. Every call carries an Execution Context and routes through the capability router.
- Execution Environment Protocol — which trust profile applies to a call. Nine built-in environments:
system,org,project,app,session,sandbox,public,store-review,trusted-dev. - Manifest / Wire — how all of the above are declared in the biome manifest through
requires,contributions,requiresCapabilities[],exposesCapabilities[].
The eight primitives
Every concept the runtime mediates falls into one of eight primitives:
- Subject — who is calling (user, agent, app client, external subject, service, runner).
- Capability — what is being invoked (
<domain>:<resource>.<verb>@<major>). - Biome — the installable bundle exposing the capability.
- Object — the typed thing the capability touches (
XemaObject). - Space — where the object lives and who owns it.
- Execution Environment — what trust profile the call runs under.
- Runner — where the implementation actually executes (embedded / local-module / remote).
- Policy — the decision protocol that mediates everything above.
Plus the per-invocation envelope that wires them together: Execution Context.
Deployment profiles
Xema deploys in four profiles from the same codebase. There is no separate product model between development and production.
| Profile | Use case | Topology |
|---|---|---|
dev | A single developer, xema up | Every backing service runs locally; the coordination store is a single-member quorum |
single-instance | A small org self-hosting on one machine | The whole stack on one host, one member per backing service |
cluster | Production, multiple nodes | Replicated coordination store, replicated backing services |
The profile records deployment intent; it is not a code-path fork. KernelStateProfile has exactly these three members, and every one of them resolves to the same coordination-store adapter — the member count is a deployment detail, not a different implementation. There is no in-process, embedded-file or single-binary variant of the kernel state, and the relational store is never a substitute for it. The same is true one level up: the set of backing services a deployment provisions is identical across profiles, so a behaviour that only appears in production is a configuration difference, never a different code path.
Capability calls produce identical PolicyDecision outputs across all three profiles for the same ExecutionContext.
Where to go next
- Objects — how Xema represents every addressable thing as a typed
XemaObject. - Capabilities — the invocation plane every biome calls through.
- SDK / Getting Started — author your first biome manifest.
- Manifest Reference — the generated, field-by-field current manifest contract.
Next: Objects →