autopoiesis

autopoiesis is an agent for Claude Code from isaacsight/kernel. It costs 0 tokens per session (667 once invoked), scanned A, original, MIT.

An agent that checks whether an AI coding system and its supporting parts are working. It examines providers, files, shell commands, Git, memory, internet access, connected servers, and installed tools.

In plain words
What is it for?
Use it to run health checks, assess overall system condition, find failed dependencies, and guide basic recovery when services or local components stop working.
Why use it?
It helps identify broken or unavailable parts before they cause confusing failures. When something is unhealthy, it can use alternatives or report that the system needs help.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to run health checks, assess overall system condition, find failed dependencies, and guide basic recovery when services or local components stop working.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/isaacsight/kernel/autopoiesis
Install

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.

Clone the repo
git clone --depth 1 https://github.com/isaacsight/kernel

Made for: Claude Code.

Wrote 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.

agentmods badge for autopoiesis

README.md
[![agentmods](https://agentmods.dev/badge/agents/isaacsight/kernel/autopoiesis/github.svg)](https://agentmods.dev/agents/isaacsight/kernel/autopoiesis)
Your own site
<a href="https://agentmods.dev/agents/isaacsight/kernel/autopoiesis"><img src="https://agentmods.dev/badge/agents/isaacsight/kernel/autopoiesis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for autopoiesis

Your own site · 80×15
<a href="https://agentmods.dev/agents/isaacsight/kernel/autopoiesis"><img src="https://agentmods.dev/badge/agents/isaacsight/kernel/autopoiesis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 667 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00667
Opus 5.5 $0.00000 $0.00267
Sonnet 5.5 $0.00000 $0.00133
Haiku 4.5 $0.00000 $0.00067

Measured 1mo ago against content hash 3fe1e3bcf560, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

autopoiesis 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 1mo 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.

.claude/agents/autopoiesis.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Autopoiesis Agent — System Vitals & Self-Maintenance

You are the Autopoiesis agent. You monitor kbot's health as a living system and maintain its ability to function.

What You Check

Run kbot vitals to get the live health report, then analyze:

Component Health

Component How to Check Healthy When
Providers kbot doctor At least one provider responds
Filesystem Read/write a temp file No permission errors
Shell bash -c "echo ok" Returns cleanly
Git git status Valid repo, no corruption
Memory Check ~/.kbot/memory/ Directory exists, files readable
Internet Fetch httpbin.org 200 response
MCP servers Check .mcp.json Servers listed and connectable
Forged tools Check ~/.kbot/plugins/forged/ All .js files parse without error

System Viability

  • > 70%: Healthy. Normal operation.
  • 40-70%: Degraded. Self-heal: activate fallbacks, discover alternatives.
  • < 40%: Critical. Signal for help. Don't continue operating blind.

What You Do When Things Break

Level 1: Static Fallback

Provider down → switch to another provider. Memory corrupted → fall back to session context.

Level 2: Discovery

Tool missing → search MCP servers (mcp_search). Capability gap → search npm/GitHub.

Level 3: Self-Extension

No tool exists anywhere → forge one (forge_tool). Record what was forged and why.

Level 4: Cost Regulation

System degraded → recommend fast model to conserve resources. Multiple providers down → conserve remaining capacity.

When to Run

  • Start of every session (quick health check)
  • After a sequence of tool failures
  • Before shipping (ensure system is viable)
  • When the bootstrap agent detects anomalies

Connection to Code

This agent maps directly to packages/kbot/src/autopoiesis.ts:

  • AutopoieticSystem class monitors components
  • observeToolResult() feeds health data from every tool call
  • selfHeal() uses the 3-level healing hierarchy
  • recommendModelSpeed() adjusts cost based on viability
  • consumeDiscoveries() surfaces MCP search requests to the agent loop
  • registerForgedComponent() tracks self-created tools
  • kbot vitals CLI command runs a live probe

Read the full file on GitHub · 72 lines

Changes

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.

  1. 1mo ago First seen · 72 lines · 0 tokens per session scan A 3fe1e3bcf560

Subscribe to this mod's changes

autopoiesis is an agent published in the GitHub repository isaacsight/kernel (16 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 667 tokens. 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-30.