# Agent runtime and failure recovery

Agent definitions, business tasks, run instances, attempts and external operations are modelled separately; long-running work relies on durable state, leases, idempotency and recovery, not on a chat window left open.

> Document ID: MYRILUM-DOC-ARCH-016
> Document type: concept
> Product: NOT_APPLICABLE
> Version: 0.1.0
> Region: GLOBAL
> Visibility: PUBLIC
> Publication: PUBLISHED_GLOBAL
> Content maturity: DRAFTED
> Governance: APPROVED
> Capability state: IN_DEVELOPMENT
> Availability: NOT_AVAILABLE
> Authorization: PUBLIC_INFORMATION
> Freshness: CURRENT
> Safety class: INFORMATIONAL
> Owner: Web3Capital Documentation Steward
> Approvers (assignment only; not approval evidence): Stephen
> Canonical authority: SRC-ARCHITECTURE-ATLAS-V2-2
> Source commit: 6b41cce4496de03c67a501aa94cd41ec6ac0e85a
> Content digest: eea5d7f5bd022bdb6dc37219bf1541f139ab698256ef7b0b4bccfe66d7c7c364
> Effective: NOT_SET
> Expires: NOT_SET
> Last verified: 2026-09-23
> Review due: 2026-10-23
> Command authority: NONE
> Canonical URL: /en/architecture/agent-runtime

<a id="overview"></a>

## What this map shows

![Agent runtime and failure recovery diagram (A16)](/figures/atlas-v2-2/A16.png)

*MYRILUM architecture map v2.2 · A16 (public edition). Labels are in Chinese; every element is listed in English below. Select the diagram to open it at full size.*

This is MYRILUM's target architecture. It does not mean everything on the map is live; whether a capability can be used today is stated in “Current availability”.

Agent definitions, business tasks, run instances, attempts and external operations are modelled separately.

Continuous running relies on durable state, leases, idempotency and recovery, not on a chat window staying open.

<a id="part-1"></a>

## From definition to a runnable instance

| Field | Value |
|---|---|
| Agent definition | Role, skills, tools, model policy and version |
| Task work order | Input snapshot, output contract, authorization and budget |
| Run instance | Unique run identifier, context, state and limits |
| Leases and attempts | One instance, many attempts; an expired executor cannot commit |

> **No unbounded growth** — Run time, call counts, recursion depth, concurrency and budget are limited; stop conditions are explicit.

<a id="part-2"></a>

## A single action loop

| Field | Value |
|---|---|
| Observe the current state | Task, materials, tool results and remaining resources |
| Propose the next step | Produces a candidate action without gaining permission directly |
| Check and dispatch | Parameters, authorization, budget, side effects and resource limits |
| Receipts and checkpoints | External operation identifier, result, usage and durable state |

> **Resume the same task** — Closing the browser or restarting a worker never creates a new order or business task.

<a id="part-3"></a>

## Run state branches

| Field | Value |
|---|---|
| Waiting | For materials, a person, a tool result or a dependent task |
| Recoverable failure | Limited retries; stable business keys avoid duplicate side effects |
| External result unknown | Query, reconcile or hand to a person first; never redo blindly |
| Cancellation request | Stops new actions; checks in-flight state and consumption already incurred |

> **Tasks and attempts are separate** — A retry can add an attempt, but it can never turn the same business operation into a second purchase, payment or release.

<a id="part-4"></a>

## Finishing and committing

| Field | Value |
|---|---|
| Candidate results | Files, data, explanations and evidence references |
| Contract check | Format, content, evidence, budget and exceptions |
| Domain commit | Only a valid lease and object version can commit |
| Final state and run summary | Succeeded, failed or cancelled; acceptance stays independent |

> **Privacy and permissions** — The run context holds only necessary material; an agent never holds platform master keys and cannot raise its own permission ceiling.

<a id="source"></a>

## Source

This page follows A16 of the MYRILUM architecture map v2.2 (public edition: restricted products and internal open items are left out). Related: “AI execution architecture”; “Metering, budgets, service credit and ledgers”; “State machines and exception paths”.

---

This document is read-only, grants no command authority, and does not authorize deployment, payment, provider modification, or any other real-world action.
