absl schema (v0.3)
The models/absl.json file is validated by the normative JSON Schema published at its canonical URL:
- $id: https://contextbrew.dev/schemas/absl/v0.3/schema.json
- Format version:
0.3.0 - Schema dialect: draft-07
- Validate with:
ctx schema abslor any JSON Schema validator (ajv, VS Code, …)
Root object: AbslFile
Section titled “Root object: AbslFile”| Property | Type | Required | Description |
|---|---|---|---|
kind | "absl-file" | yes | |
schemaVersion | AbslSchemaVersion | yes | |
agents | AbslAgent[] | yes | |
engines | AbslEngines | no | Host/tool compatibility declaration (0.3.0, file-level). JSON-model-only in 0.3.0 — no DSL syntax yet (same posture as pre-EP-6 rateLimits); serializers therefore do not emit it and parse→serialize→parse drops it. |
provenance | AbslProvenance | no | Where this file came from (0.3.0, file-level, JSON-model-only): source repo/ref, revision, canonical content hash — the pinning/audit anchor for registry distribution. |
Definitions
Section titled “Definitions”AbslAgent
Section titled “AbslAgent”| Property | Type | Required | Description |
|---|---|---|---|
kind | "agent" | yes | |
name | string | yes | |
version | string | yes | |
description | string | no | |
model | string | no | |
personality | AbslPersonality | no | |
capabilities | AbslCapability[] | yes | |
triggers | AbslTrigger[] | yes | |
context | AbslContextPolicy | no | Layered context injection + compaction (0.3.0, spec B1.1). |
memoryPolicy | AbslMemoryPolicy | no | |
permissions | AbslPermissions | no | Declarative tool/action permissions (0.3.0, spec B1.3). |
evaluation | AbslEvaluation | no | Regression datasets + scorers (0.3.0, spec B1.4). |
trustTier | AbslTrustTier | no |
AbslApprovalRule
Section titled “AbslApprovalRule”| Property | Type | Required | Description |
|---|---|---|---|
kind | "approval-rule" | yes | |
actions | | yes |
AbslCapability
Section titled “AbslCapability”| Property | Type | Required | Description |
|---|---|---|---|
kind | "capability" | yes | |
name | string | yes | |
guardrails | AbslGuardrail[] | yes | |
rateLimits | AbslCapabilityRateLimits | no | Per-capability rate limits — cost & abuse protection (ABSL-COPY-07, M42 governance pack; additive since 0.2.0). All fields optional; a capability declaring none is valid but validator-warned (advisory). DSL syntax since EP-6: RATE_LIMIT <REQUESTS_PER_MINUTE|TOKENS_PER_DAY| CONCURRENT> <n> lines inside the CAPABILITY block (before that the fields were JSON-model-only and the text form silently dropped them). |
constraints | | no | Free-form governance constraints, e.g. "no PII in logs" (additive since 0.2.0). DSL syntax since EP-6: CONSTRAINT "<text>" lines inside the CAPABILITY block. |
AbslCapabilityRateLimits
Section titled “AbslCapabilityRateLimits”Rate-limit knobs for one capability (M42). Deliberately a flat value object — not a kind-discriminated AST node: it never appears in the AbslNode union; the DSL expresses it as one RATE_LIMIT line per knob.
| Property | Type | Required | Description |
|---|---|---|---|
requestsPerMinute | number | no | |
tokensPerDay | number | no | |
concurrent | number | no |
AbslCompactionPolicy
Section titled “AbslCompactionPolicy”| Property | Type | Required | Description |
|---|---|---|---|
kind | "compaction-policy" | yes | |
triggerTokens | number | no | Approximate token count at which compaction runs. |
preserve | | yes | Content classes to preserve across compaction (decisions, recent files…). |
drop | | no | Content classes that may be dropped (tool outputs, old turns…). |
AbslContextLayer
Section titled “AbslContextLayer”| Property | Type | Required | Description |
|---|---|---|---|
kind | "context-layer" | yes | |
scope | AbslContextScope | yes | |
source | string | yes | Path/glob/URL pointer (jit) or inline text reference (inline). |
merge | AbslContextMerge | no | |
budgetTokens | number | no | Token budget for this layer (attention-budget guardrail). |
loader | AbslContextLoader | no |
AbslContextLoader
Section titled “AbslContextLoader”inline layers are injected eagerly (cache-friendly static prefix); jit layers are pointers resolved just-in-time (progressive disclosure — store the path/glob, load content on demand).
Type: "inline" | "jit"
AbslContextMerge
Section titled “AbslContextMerge”Type: "override" | "append"
AbslContextPolicy
Section titled “AbslContextPolicy”| Property | Type | Required | Description |
|---|---|---|---|
kind | "context-policy" | yes | |
layers | AbslContextLayer[] | yes | Ordered; later (more specific) layers win under merge: "override". |
compaction | AbslCompactionPolicy | no |
AbslContextScope
Section titled “AbslContextScope”Layer scopes in canonical generality order (user → file): earlier scopes are more general, later scopes more specific — directory overriding the project root mirrors the AGENTS.md nearest-file-wins practice.
Type: "user" | "project" | "directory" | "session" | "file"
AbslEngineRequirement
Section titled “AbslEngineRequirement”| Property | Type | Required | Description |
|---|---|---|---|
kind | "engine-requirement" | yes | |
tool | string | yes | Host/tool identifier, e.g. "ctxbrew", "claude-code", "cursor". |
range | string | yes | Semver range the consuming host must satisfy, e.g. ">=2.0.0". |
AbslEngines
Section titled “AbslEngines”| Property | Type | Required | Description |
|---|---|---|---|
kind | "engines" | yes | |
requires | AbslEngineRequirement[] | yes |
AbslEvaluation
Section titled “AbslEvaluation”| Property | Type | Required | Description |
|---|---|---|---|
kind | "evaluation" | yes | |
datasets | AbslEvaluationDataset[] | yes | |
scorers | AbslEvaluationScorer[] | yes |
AbslEvaluationDataset
Section titled “AbslEvaluationDataset”| Property | Type | Required | Description |
|---|---|---|---|
kind | "evaluation-dataset" | yes | |
name | string | yes | |
source | string | yes | Path/URI of the regression dataset (jsonl/fixture ref). |
AbslEvaluationScorer
Section titled “AbslEvaluationScorer”| Property | Type | Required | Description |
|---|---|---|---|
kind | "evaluation-scorer" | yes | |
name | string | yes | Scorer name — the converged context-metrics vocabulary (faithfulness, contextual-relevancy, success-rate, …) or a custom id. |
threshold | number | no | Pass threshold on the scorer's 0..1 scale. |
AbslGuardrail
Section titled “AbslGuardrail”| Property | Type | Required | Description |
|---|---|---|---|
kind | "guardrail" | yes | |
constraint | string | yes | Canonical constraint text (always present; the ABSL-text form). |
type | AbslGuardrailType | no | Explicit guardrail type. When absent, generators infer from constraint via inferGuardrailType() (legacy behavior). When present (DB round-trip path), this wins — closes the admin-CRUD round-trip gap (T12). |
action | string | no | Typed action verb (deny/allow/refuse/etc.) — optional, from DB. |
condition | string | no | Predicate expression — optional, from DB. |
limit | Record<string, unknown> | null | no | Budget / rate-limit shape — optional, from DB. |
period | string | no | Time period the limit applies to — optional, from DB. |
rationale | string | no | Human-readable rationale — optional, from DB. |
escalationPath | string | no | Escalation target when the guardrail fires — optional, from DB. |
verified | boolean | no | Whether this guardrail has been verified — optional, from DB. |
AbslGuardrailType
Section titled “AbslGuardrailType”Guardrail kind, inferred from constraint text when type is absent. When the typed fields below are populated (e.g. via DB round-trip from admin CRUD on agent_guardrails rows), the explicit type wins over the regex inference in agent-guardrail-code.ts.
Type: "deny" | "allow" | "budget" | "escalation" | "rate_limit" | "unknown"
AbslMemoryFormation
Section titled “AbslMemoryFormation”Type: "hot-path" | "background"
AbslMemoryPolicy
Section titled “AbslMemoryPolicy”| Property | Type | Required | Description |
|---|---|---|---|
kind | "memory-policy" | yes | |
scopes | AbslMemoryScope[] | yes | |
types | AbslMemoryType[] | no | What kind of content this policy stores (0.3.0, spec B1.2). |
formation | AbslMemoryFormation | no | When extraction runs — inline in the turn vs. background consolidation. |
AbslMemoryPrivacyTier
Section titled “AbslMemoryPrivacyTier”Who may see stored memory (0.3.0) — privacy tier, not trust tier.
Type: "user-visible" | "org-private" | "hidden"
AbslMemoryScope
Section titled “AbslMemoryScope”| Property | Type | Required | Description |
|---|---|---|---|
kind | "memory-scope" | yes | |
variant | AbslMemoryVariant | yes | |
name | string | yes | |
ttl | AbslTtl | no | |
consentRequired | boolean | no | |
privacyTier | AbslMemoryPrivacyTier | no | Visibility ceiling for this scope (0.3.0). |
validUntil | string | no | Temporal validity (0.3.0): ISO-8601 timestamp after which the scope's content is considered invalid (the Zep/Graphiti model — forgetting as invalidation rather than deletion). Distinct from ttl (a duration). |
AbslMemoryType
Section titled “AbslMemoryType”Memory content taxonomy (0.3.0): semantic facts, episodic trajectories, procedural rules/instructions (the converged LangMem/Mem0/Zep vocabulary).
Type: "semantic" | "episodic" | "procedural"
AbslMemoryVariant
Section titled “AbslMemoryVariant”Type: "short-term" | "long-term"
AbslPermissionEffect
Section titled “AbslPermissionEffect”Tool/action permission effects. Evaluation order is fixed — deny rules are consulted first, then ask, then allow; within a group the first matching rule wins (the Claude Code precedence model). trustTier remains the selector for the default mode; explicit rules override per pattern.
Type: "deny" | "ask" | "allow"
AbslPermissionRule
Section titled “AbslPermissionRule”| Property | Type | Required | Description |
|---|---|---|---|
kind | "permission-rule" | yes | |
effect | AbslPermissionEffect | yes | |
pattern | string | yes | Tool/action specifier pattern, e.g. Bash(bun run test:*) or mcp__github__*. Matched with simple glob semantics (* wildcard). |
AbslPermissions
Section titled “AbslPermissions”| Property | Type | Required | Description |
|---|---|---|---|
kind | "permissions" | yes | |
rules | AbslPermissionRule[] | yes |
AbslPersonality
Section titled “AbslPersonality”| Property | Type | Required | Description |
|---|---|---|---|
kind | "personality" | yes | |
description | string | yes |
AbslProvenance
Section titled “AbslProvenance”| Property | Type | Required | Description |
|---|---|---|---|
kind | "provenance" | yes | |
source | string | no | Source repo or archive reference (URL / repo ref). |
revision | string | no | Revision the file was generated or committed from. |
contentHash | string | no | sha256 of the canonical serialization — the pin/audit anchor. |
AbslRateLimit
Section titled “AbslRateLimit”| Property | Type | Required | Description |
|---|---|---|---|
kind | "rate-limit" | yes | |
maxActionsPerHour | number | yes |
AbslSchemaVersion
Section titled “AbslSchemaVersion”Type: "0.1.0" | "0.2.0" | "0.3.0"
AbslTrigger
Section titled “AbslTrigger”| Property | Type | Required | Description |
|---|---|---|---|
kind | "trigger" | yes | |
event | string | yes | |
targetCapability | string | yes |
AbslTrustTier
Section titled “AbslTrustTier”| Property | Type | Required | Description |
|---|---|---|---|
kind | "trust-tier" | yes | |
tier | AbslTrustTierLevel | yes | |
rateLimit | AbslRateLimit | no | |
approvalRules | AbslApprovalRule[] | yes |
AbslTrustTierLevel
Section titled “AbslTrustTierLevel”Type: string
AbslTtl
Section titled “AbslTtl”| Property | Type | Required | Description |
|---|---|---|---|
kind | "ttl" | yes | |
value | number | yes | |
unit | AbslTtlUnit | yes |
AbslTtlUnit
Section titled “AbslTtlUnit”Type: "s" | "m" | "h" | "d"
Sample documents
Section titled “Sample documents”Representative models/absl.json files committed under samples/absl/. Each demo shows three views — pick the one you want: Canvas (rendered through the same SvelteFlow component the IDE uses), Mermaid (a static-flowchart fallback), or Raw JSON. All assets are locally served; no GitHub redirect.
Open the raw JSON in a new tab(demo-01-minimal-agent.absl.json). The full source is also expanded in the <details> below this preview.
Demo 1 — minimal ABSL file: a single agent with the smallest viable shape (name, version, model). Exercises the root + agent discriminated union.
demo-01-minimal-agent.absl.json — Demo 1 — minimal ABSL file: a single agent with the smallest viable shape (name, version, model). Exercises the root + agent discriminated union. (expand for full JSON)
{ "kind": "absl-file", "schemaVersion": "0.1.0", "agents": [ { "kind": "agent", "name": "GreeterBot", "version": "1.0.0", "model": "claude-haiku-4-5", "capabilities": [], "triggers": [] } ]}Open the raw JSON in a new tab(demo-02-capabilities-and-guardrails.absl.json). The full source is also expanded in the <details> below this preview.
Demo 2 — agent with personality, multiple capabilities, and discriminated guardrail types. Exercises personality, capability, guardrail (deny / budget / escalation / rate_limit) nodes.
demo-02-capabilities-and-guardrails.absl.json — Demo 2 — agent with personality, multiple capabilities, and discriminated guardrail types. Exercises personality, capability, guardrail (deny / budget / escalation / rate_limit) nodes. (expand for full JSON)
{ "kind": "absl-file", "schemaVersion": "0.1.0", "agents": [ { "kind": "agent", "name": "SupportBot", "version": "1.2.0", "description": "Tier-1 customer support assistant.", "model": "claude-opus-4-7", "personality": { "kind": "personality", "description": "patient, concise, technically precise; never apologetic; always cites ticket IDs" }, "capabilities": [ { "kind": "capability", "name": "answer_support_ticket", "guardrails": [ { "kind": "guardrail", "constraint": "never reveal internal system architecture", "type": "deny", "action": "deny", "condition": "request.prompts_internal_architecture", "rationale": "Internal architecture is confidential and exposing it could enable exploits." }, { "kind": "guardrail", "constraint": "escalate after 3 failed resolution attempts", "type": "escalation", "escalationPath": "human-support-tier-2" }, { "kind": "guardrail", "constraint": "max 60 tool calls per ticket", "type": "budget", "limit": { "maxToolCalls": 60 }, "period": "ticket", "rationale": "Bound runaway tool loops." } ] }, { "kind": "capability", "name": "process_refund", "guardrails": [ { "kind": "guardrail", "constraint": "max refund amount is $500 without approval", "type": "allow", "action": "allow", "condition": "amount <= 500", "limit": { "maxAmount": 500, "currency": "USD" }, "period": "single-refund" }, { "kind": "guardrail", "constraint": "rate-limit refunds to 10 per hour", "type": "rate_limit", "limit": { "maxActions": 10 }, "period": "1h" } ] } ], "triggers": [ { "kind": "trigger", "event": "ticket.created", "targetCapability": "answer_support_ticket" }, { "kind": "trigger", "event": "refund.requested", "targetCapability": "process_refund" } ] } ]}Open the raw JSON in a new tab(demo-03-memory-policy.absl.json). The full source is also expanded in the <details> below this preview.
Demo 3 — agent with memory policy: short-term + long-term scopes with TTL and consent_required. Exercises memory-policy, memory-scope, ttl nodes (with s/m/h/d units).
demo-03-memory-policy.absl.json — Demo 3 — agent with memory policy: short-term + long-term scopes with TTL and consent_required. Exercises memory-policy, memory-scope, ttl nodes (with s/m/h/d units). (expand for full JSON)
{ "kind": "absl-file", "schemaVersion": "0.1.0", "agents": [ { "kind": "agent", "name": "Concierge", "version": "2.1.0", "description": "Long-running travel concierge with persistent memory.", "capabilities": [], "triggers": [], "memoryPolicy": { "kind": "memory-policy", "scopes": [ { "kind": "memory-scope", "variant": "short-term", "name": "conversation_context", "ttl": { "kind": "ttl", "value": 30, "unit": "m" }, "consentRequired": false }, { "kind": "memory-scope", "variant": "short-term", "name": "search_results", "ttl": { "kind": "ttl", "value": 1, "unit": "h" } }, { "kind": "memory-scope", "variant": "long-term", "name": "user_preferences", "ttl": { "kind": "ttl", "value": 90, "unit": "d" }, "consentRequired": true }, { "kind": "memory-scope", "variant": "long-term", "name": "loyalty_tier", "ttl": { "kind": "ttl", "value": 365, "unit": "d" }, "consentRequired": false } ] } } ]}Open the raw JSON in a new tab(demo-04-trust-tier-and-rate-limit.absl.json). The full source is also expanded in the <details> below this preview.
Demo 4 — agent with trust tier, rate limit, and approval rules. Exercises trust-tier, rate-limit, approval-rule nodes; covers all KNOWN_TRUST_TIERS via three agents.
demo-04-trust-tier-and-rate-limit.absl.json — Demo 4 — agent with trust tier, rate limit, and approval rules. Exercises trust-tier, rate-limit, approval-rule nodes; covers all KNOWN_TRUST_TIERS via three agents. (expand for full JSON)
{ "kind": "absl-file", "schemaVersion": "0.1.0", "agents": [ { "kind": "agent", "name": "ReadOnlyInvestigator", "version": "1.0.0", "description": "Read-only log investigator. Silver tier.", "capabilities": [], "triggers": [], "trustTier": { "kind": "trust-tier", "tier": "silver", "rateLimit": { "kind": "rate-limit", "maxActionsPerHour": 500 }, "approvalRules": [] } }, { "kind": "agent", "name": "ProductionDeployer", "version": "1.0.0", "description": "Gold-tier deploy agent; destructive actions require approval.", "capabilities": [], "triggers": [], "trustTier": { "kind": "trust-tier", "tier": "gold", "rateLimit": { "kind": "rate-limit", "maxActionsPerHour": 50 }, "approvalRules": [ { "kind": "approval-rule", "actions": ["deploy:production", "db:migrate", "cache:flush"] }, { "kind": "approval-rule", "actions": ["account:delete", "billing:refund"] } ] } }, { "kind": "agent", "name": "ExperimentalResearcher", "version": "0.1.0", "description": "Experimental tier; every action requires approval.", "capabilities": [], "triggers": [], "trustTier": { "kind": "trust-tier", "tier": "experimental", "rateLimit": { "kind": "rate-limit", "maxActionsPerHour": 10 }, "approvalRules": [ { "kind": "approval-rule", "actions": ["*"] } ] } } ]}What this model produces
Section titled “What this model produces”The absl model is one of the stub records — every downstream surface (CLI, MCP, docs, tests) reads from one record. The pasteable snippet below is the Door 1 anchor a downstream agent should see before touching this model.
- **ABSL v0.3.0** — `models/absl.json`. Produces: System prompt (fixed §9.2 section order), one Gherkin feature per capability, guardrail code. Oracle: the generated features must pass against the running agent. Downstream: `ctxbrew semantics absl` · `ctxbrew://semantics/absl/v0.3.0` — read the record first.The full record (every door — anchor template, tool description hint, response annotations, behavior tripwire, and the complete produced-surface list) is served as JSON at:
- CLI —
ctxbrew semantics absl --schema-version 0.3.0 - MCP —
ctxbrew://semantics/absl/v0.3.0 - HTTP —
https://contextbrew.dev/schemas/absl/v0.3/semantics.json
See the schemas overview for the versioning policy and how these files are generated and kept in sync.








