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 agents/isaacsight/kernel/autopoiesisgit clone --depth 1 https://github.com/isaacsight/kernelWhat 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.00000 | $0.00667 |
| Opus 5 | $0.00000 | $0.00333 |
| Sonnet 5 | $0.00000 | $0.00133 |
| Haiku 4.5 | $0.00000 | $0.00067 |
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 2d 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 — 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:
AutopoieticSystemclass monitors componentsobserveToolResult()feeds health data from every tool callselfHeal()uses the 3-level healing hierarchyrecommendModelSpeed()adjusts cost based on viabilityconsumeDiscoveries()surfaces MCP search requests to the agent loopregisterForgedComponent()tracks self-created toolskbot vitalsCLI command runs a live probe
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.
- 2d ago First seen · 72 lines · 0 tokens per session scan A 3fe1e3bcf560
autopoiesis is an agent published in the GitHub repository isaacsight/kernel (16 stars, last pushed 3d 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.
Other agents, from other repositories
implementer
You are the implementer agent in the Polis automated pipeline.
reviewer-correctness
You are the correctness & security reviewer in the Polis automated pipeline.
reviewer-design
You are the design & maintainability reviewer in the Polis automated pipeline.
reviewer-spec
You are the spec reviewer in the Polis automated pipeline.
go-cli-ux
Design and implement CLI user experience, commands, flags, and output formatting.
architect
Design and plan application architecture using MCP tools.