Skip to main content

Agentic compute

Agentic workloads — autonomous or semi-autonomous processes that plan, decide, and act against the platform's API surface — run on Kilimanjaro through the same Compute pillar that hosts stateless functions and workflows. This page is the conceptual framing: how the compute model accommodates agentic execution, how per-project compute budgets bound cost, and how the four Trailblazer-class extensions demonstrate the canonical agentic patterns.

1. The compute model​

Agentic workloads run in Firelock, the open-source sandbox maintained by Kilimanjaro. There is one tier, the sandbox:

PropertySandbox
Cold start50–150 ms
RuntimeFirecracker microVM, with a Bun guest for JavaScript and TypeScript and a Wasmtime guest for everything that compiles to WASI
EgressNo network interface; all guest egress goes through one auditable vsock channel, where Keep's Warden layer evaluates each call
PricingCPU-millisecond metering

Sandbox functions handle workloads that need a full language runtime, calls out to external services, or longer execution windows. They run under the same RBAC and JSON-policy enforcement as every other call, honour the project's region pin, and emit standard audit events.

Agentic workloads fit this model directly: the orchestration logic runs in a guest, and every call it makes to an LLM endpoint, a third-party API or a customer data source leaves through the one channel that Warden evaluates.

2. Platform properties for agentic execution​

  • Per-invocation scoped tokens. Every function invocation runs under a platform-issued JWT scoped to the function's manifest-declared permissions. An agent has the function's permissions, not the human caller's.
  • Per-request JSON-policy evaluation. Every API call the agent makes runs through the same two-layer access-control check human callers do. An agent cannot exceed its policy-declared envelope.
  • Audit attribution at the kernel. Every agent action — every record read, every write, every external API call — emits an audit event with the agent's identity (function ID + manifest version + invocation context). Forensic reconstruction is the platform's responsibility.

An agent is just another caller; authentication, authorisation, and audit apply uniformly.

Function invocationagentic workloadScoped tokenfunction's permissions,not the human caller'sAccess checkRBAC, then JSON-policyon every API callPlatform APIan agent is justanother callerevery actionAudit eventagent identity: function ID, manifest version, invocation contextbounds costCompute budgetper-project cap, stopat metering boundary
An agent runs under the function's scoped token and the same two-layer check as any caller; each action is attributed in the audit stream and the project's compute budget caps cost.

3. Bounding agentic cost​

Long-running agentic execution introduces a cost-management problem: an agent that loops on a planning step, recurses on a tool-use chain, or stalls waiting for an external API can consume CPU and external-API budget faster than the human operator notices.

Cost is bounded by sandbox CPU-millisecond metering, measured against per-project budget caps. A function that exceeds its project's compute budget is stopped at the metering boundary, so a runaway plan-loop cannot accrue unbounded cost, and a recursive-invocation ceiling guards against unbounded self-invocation.

Every invocation is recorded in the audit stream (see section 7), so an operator can review what an agent did, invocation by invocation.

4. The four Trailblazer-class extensions as agentic templates​

The platform ships four Trailblazer-class extensions — each a reference implementation of a canonical agentic pattern:

TrailblazerPatternAgentic role
Paperless (AI-enabled workspace + workflows)Chat-driven agents + event-driven capture + downstream processingAgents act in chat under the invoking user's identity, draft workflows from natural language, enrich capture records (entity extraction, validation, automatic routing); functions react to Paperless workflow and capture events
Context (Semantic Intelligence)Embedding + retrieval-augmented patternsEmbeddings are made with ai.embed; the query + retrieval APIs are agent-friendly retrieval surfaces designed for retrieval-augmented agent workflows
Lookout (Dashboarding)Scheduled refresh + cached-state compositionScheduled lookout:refresh functions; agents that summarise dashboards or generate periodic reports run as scheduled functions composing against the chart records
Gate Studio (Visual Gate authoring)Approval-routed automationMaker-Checker registration flows demonstrate the human-in-the-loop pattern for agentic decisions that need approval before commitment

Each Trailblazer-class extension ships a full manifest exercising the framework's permission grants, hook lifecycle, function deployment, and per-project schema isolation. They are the worked examples for building your own agentic extension.

5. The agentic runtime extension tier​

The extension framework's manifest carries a runtime_tier field for hosted-runtime execution. Extensions declaring runtime_tier: "wasm" run in the same Bun + WebAssembly runtime as host functions, hosted in the sandbox with per-extension sandbox isolation layered above the standard per-function isolation: no filesystem, egress restricted to gateway-mediated platform APIs plus the manifest-declared npm dependencies, and no cross-extension memory, file-descriptor, or runtime sharing. Extension-runtime functions carry source: "extension:<slug>" and dispatch through the same function row family as host functions.

The function-deployment path (background_logic.functions[]) remains available for extensions that deploy functions without opting into the hosted runtime; both compose cleanly with the agentic patterns above. An unsupported runtime_tier value returns K9O_EXTENSION_TIER_NOT_AVAILABLE (400) at registration.

6. Where agents end and human operators begin​

The platform does not adjudicate "agent vs human" as a binary at the gateway. The gateway sees callers — identified by JWT, scoped by manifest, authorised by RBAC + policy. Whether the JWT was issued to a human-driven session, a service token, or an extension's plugin token is recorded in the actor claim (actor: "user" | "service" | "extension"); policy expressions can reference this claim to draw the line.

Three common patterns:

PatternPolicy expression
Agents may read but not writesubject.actor !== "user" && action !== "read" ⇒ deny
Agents may write only to a specific collectionsubject.actor === "extension" && resource.collection !== "agent-output" ⇒ deny
Agents must surface to human approval before high-stakes actionssubject.actor === "extension" && action === "delete" ⇒ require Maker-Checker gate per Control

These are policy decisions, not platform defaults. The customer's project authors the JSON-policy that draws the line that's right for their threat model.

7. Operational observability for agentic workloads​

Every function invocation emits a function.invocation audit event with the invocation context, the caller identity, and the CPU-ms consumed. Agentic workloads composed of many short function invocations produce a high-resolution audit stream — useful for both forensic reconstruction and operational debugging.

8. The showroom agent-execution model​

Showrooms — the interactive demo environments that run during project setup — use an agent-execution model that demonstrates several platform patterns in a single surface.

The context contract​

Every showroom agent receives a provisioned context as its sole input:

  • seed — the collection schemas and the seeded rows. Immutable: the agent can read it but cannot mutate it.
  • session — the persona, vertical and session ID, plus the edits accepted earlier in the session. The edits are the only thing that changes between invocations.

The agent composes a response by reading the seed plus the accumulated edits, not by querying live project data. The execution environment is sandbox-isolated: no access to real project data, no network egress beyond the host's declared capabilities. The accepted state is a session overlay, not a write to the underlying seed; the seed remains the reset target.

9. See also​

  • API → Compute — function registry, invocation API, governed-operation metering.
  • API → Extensions — the framework that hosts agentic extension surfaces.
  • Extensions → Build Your Own — developer guide for shipping your own agentic extension.
  • Paperless — AI-enabled workspace + workflows Trailblazer-class extension.
  • Context — semantic-intelligence retrieval-augmented Trailblazer-class extension.
  • Lookout — scheduled-refresh dashboarding Trailblazer-class extension.
  • Gate Studio — visual authoring + Maker-Checker routing Trailblazer-class extension.
  • Architecture → Architecture — where Compute sits in the request flow.
  • API → Control — JSON-policy expressions for agent-vs-human policy distinctions.