Kid agents

From elophanto/EloPhanto · View interactive version

Kid agents is an AI agent skill from the GitHub repository elophanto/EloPhanto. Use when running dangerous shell commands, installing untrusted packages, or testing untrusted code that could damage the host. Spawns a sandboxed kid (a child EloPhanto inside a hardened container) where rm -rf, fork bombs, kernel-touching ops, and similar are safely contained. Default vault scope

How to use this skill

Skill file

Triggers

Kid agents — sandboxed disposable children

Overview

A kid is a child EloPhanto running inside a hardened Docker container.

It exists to do things that are too dangerous to run on the host:

package installs, untrusted scripts, fork bombs, kernel-poking, code

you don't fully trust. The container's --cap-drop=ALL, read-only

rootfs, non-root uid, named-volume-only writable area, and resource

caps mean a kid that goes rogue can damage only itself.

Kids are NOT organization specialists. Kids are short-lived, have no

durable identity, and connect back to the parent's gateway as a

client. Specialists are persistent peers with their own gateway and

trust score. **If the user wants long-lived expertise, use

organization_spawn. If the user wants disposable safe testing, use

kid_spawn.**

Iron rules

  1. Default vault scope is empty. A kid gets zero secrets unless

you explicitly grant keys. Don't grant payment_* ever — kids

never move money (the registry blocks it anyway).

  1. Default network is outbound-only. network="host" requires

explicit user authorization in the same turn. Don't assume.

  1. Always destroy when done. Idle kids consume the concurrency

budget. After reading anything you need, call kid_destroy.

  1. Always check kid_list before spawning. A live kid set up for

the same task is cheaper than a fresh one.

  1. Never use a kid for tasks that need host filesystem state.

Kids are isolated. They can't see your files unless you cp them

in.

Phase 1 — decide if a kid is the right tool

Use a kid when any of these is true:

kernel modules, iptables.

scripts, AI-generated install instructions.

Don't use a kid when:

tools (no isolation needed; you're just reading).

tools.

Phase 2 — spawn

Minimal:

kid_spawn(purpose="test installing cowsay")

With a clear name (so future iterations can find it):

kid_spawn(purpose="test installing cowsay", name="cowsay-test")

With explicit vault scope (only when the kid genuinely needs secrets):

kid_spawn(
    purpose="run a script that calls openrouter",
    vault_scope=["openrouter"],
)

Network policies:

Phase 3 — execute

kid_exec(kid_id_or_name="cowsay-test", task="apt install cowsay && cowsay hello")

The kid runs the task inside its container. Output comes back via the

gateway. Watch the kid's chat events.

Phase 4 — read outputs (optional)

If the kid wrote artifacts, fetch them BEFORE destroy:

The parent-side helper read_kid_file(kid, "/workspace/result.json")

copies the file out via docker cp. Path traversal is blocked by the

runtime — only /workspace/... reads are allowed.

Phase 5 — destroy

Always:

kid_destroy(kid_id_or_name="cowsay-test", reason="task complete")

This stops the container, removes it, and drops the named volume.

The kid's outputs are GONE after this.

Failure modes / when to refuse

at the install command for the user's OS. Don't try to work around

it; tell the user to run the suggested command.

warns when the image is older than the codebase.

default network is enough for almost all dangerous-command testing.

move money. Use the parent agent for payment work.

by design. The kid_spawn tool is registry-filtered out inside kids.

Reputation tracking

learned/kids/{date}-{purpose-slug}.md for any kid whose run

produced lessons (working install commands, broken patterns, useful

sandbox configurations). Skip the log for trivial single-command

tests.

Verify

Anti-patterns

destroy in the same turn as the final read, unless the user wants

to keep iterating.

If the kid needs openrouter, grant ONLY openrouter.

on the host is safe, do it on the host. Kids are for the unsafe

path.

domain — the cost is small and the isolation is per-kid.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.