Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/hoja-solutions/agent-stdlib/durable-agent-architecturenpx skills add Hoja-Solutions/agent-stdlib --skill durable-agent-architecturegit clone --depth 1 https://github.com/Hoja-Solutions/agent-stdlibWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/hoja-solutions/agent-stdlib/durable-agent-architecture)<a href="https://agentmods.dev/skills/hoja-solutions/agent-stdlib/durable-agent-architecture"><img src="https://agentmods.dev/badge/skills/hoja-solutions/agent-stdlib/durable-agent-architecture.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00179 | $0.00713 |
| Opus 5 | $0.00089 | $0.00357 |
| Sonnet 5 | $0.00036 | $0.00143 |
| Haiku 4.5 | $0.00018 | $0.00071 |
Grade A, and why
durable-agent-architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Durable agent architecture
Source: Scaling Managed Agents. Long-running-harness skills exist, but they track context and progress within a run. None encode the service-level decomposition that lets a component die and the agent resume.
A demo agent lives in one process. A production agent runs for hours, survives crashes, and resumes where it stopped. The difference is structural: split the agent into three planes with stable interfaces between them, so each fails and reboots without taking the others down.
The three planes
- Brain. The model plus the harness logic that drives it. This decides what to do next.
- Hands. The sandbox and tools that execute. Treat these as ephemeral and disposable.
- Session. A durable, queryable event log of everything that happened. This is the source of truth.
The rule that makes it durable: the brain and the session live outside the execution container. When the container dies, and containers die, you lose the hands and nothing else. Cattle, not pets.
Resume from the log, not from memory
The session is an append-only event log you can query, not a transcript stuffed back into the context window. Build two operations around it:
wake(sessionId)rehydrates an agent from its log and continues.getSession(id)reads the current state without resuming execution.
Let the model pull history out of the log on demand through a getEvents()-style call that returns a selected range, rather than replaying the entire log into context every time. The full log will outgrow the window; selective retrieval keeps the agent working on long sessions.
The reference in references/session-interface.md sketches the event schema and these operations.
Keep credentials out of the hands
The execution environment runs model-directed code, so it is the last place a long-lived secret should sit. Two patterns keep credentials out of it:
- Token bundling at init. Inject a short-lived, scoped token when the sandbox starts (the pattern Git access uses).
- A vault proxy. Route authenticated calls through an intermediary that holds the real credential and validates the request (the pattern OAuth flows use).
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 53 lines · 179 tokens per session scan A 1b2bc4e18dce
durable-agent-architecture is a skill published in the GitHub repository Hoja-Solutions/agent-stdlib (1 stars, last pushed 1mo ago), licensed MIT. It adds 179 tokens to every session and 713 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
unified_meta_agent_skill
A foundational meta-agent skill for generating Multi-Agent Systems (MAS). It systematically drives the process from conceptual task decomposition to agent engineering, and finally to workflow orchestration.
controlflow-planning
Use when a repository task needs a strict ControlFlow-style implementation plan before coding, especially for small, medium, or large scope, cross-file edits, risky migrations, architectural uncertainty, or any work that should produce a saved Markdown plan artifact in plans/.
controlflow-router
Use when a task broadly matches ControlFlow for Codex and you need to decide whether to start with spec capture, strict workflow, strict planning, pre-execution plan review, orchestration, code review, or memory hygiene, or whether to combine several of those skills in sequence.
controlflow-plan
Use when a repository task needs a high-quality ControlFlow plan before coding — small, medium, or large scope, cross-file edits, risky migrations, architectural uncertainty, or any work that should produce a saved Markdown plan artifact in plans/. Single-sources the plan format from schemas/planner.plan.schema.json…
controlflow-verify
Use after /controlflow-claude-code:controlflow-plan produces a plan, before implementation. Runs adversarial pre-execution verification inline in the main context (zero subagents): structural audit, assumption/mirage detection, and executability cold-start simulation. Emits APPROVED / NEEDSREVISION / REJECTED with…
controlflow-spec
Use before planning non-trivial Codex work when the requirements, acceptance criteria, boundaries, constraints, or success measures are not yet clear enough for a safe implementation plan.