Self-Extending Agents
Two-agent system that grows reviewable skills
A User Agent answers requests; a Builder Agent writes a new skill when none exists — sandboxed and approved before it can ever be invoked.
2
Agents
6
API endpoints
01The problem
An agent that can write its own tools is only safe if new capability can't run the moment it's generated.
02The approach
Split the roles. The User Agent only invokes skills from an approved registry. When one is missing, the Builder Agent produces an isolated skill package that must pass sandbox checks and an explicit approval before it can be called.
03Architecture — the camera follows the data
How it works
> If a skill already exists and is approved, the request goes straight to Invoke.
Step 1: Request
POST /chat
Step 2: User Agent
checks the registry
Step 3: Builder Agent
writes a skill package
Where the work happens
Step 4: Sandbox
POST /skills/{id}/test
Step 5: Approve
explicit, by a human
Where the work happens
Step 6: Invoke
only approved skills
04Perks — why it's built this way
The edge
Approval gate
Nothing generated is invocable until it has been tested in the sandbox and explicitly approved.
Isolated packages
Each new capability is a reviewable package, inspectable over the API before anyone approves it.
Standard-library core
The core logic uses only Python's standard library, so it's testable without installing anything.
05Tech — and what each part does
The stack
- Python
- Agents, registry, sandbox — stdlib only
- FastAPI
- Chat, builder and skill endpoints
- unittest
- Test discovery, no dependencies
→ Next file · F-01 /JMMY