Zero hardcoded graphs
- Execution lives in the runtime; coordination lives in your code.
- Switch between trees, peer swarms, and task pools in plain TypeScript.
AnySwarm
Run coding agents in isolated sandboxes, define how they work together in TypeScript, and replay the entire run.
A small set of isolation and lifecycle primitives with zero framework bloat
Compose any collaboration topology and custom plugins without touching the runtime
Partitioned logs and replayable plugin state to catch dynamic swarm failures
GET STARTED
// 1. Register host-enforced Services
const services = new ServiceRegistry();
services.register('handoff', handoff.service, { toolMode: 'cli' });// 2. Define Profiles & per-role Service permissions
const runtime = await createRuntime({
sandbox: createSandbox(config.sandbox),
models: config.models,
services,
outputDir: './runs',
profiles: {
publisher: { model: 'default', image, writable: false, services: { handoff: ['publish'] } },
writer: { model: 'default', image, writable: true, services: { handoff: ['take'] } },
},
});// 3. Spawn, drive via agent.id, verify on host, then close
const writer = await runtime.spawn({
requestId: 'spawn-writer', profile: 'writer',
collect: { paths: ['delivery.txt'], maxBytes: 4096, required: true },
});
await runInput(runtime, writer.id, 'Fetch handoff and write delivery.txt.', {
requestId: 'writer-turn', timeoutMs: 120_000,
});
const snap = await runtime.files.snapshot(writer.id, {
requestId: 'verify-delivery', paths: ['delivery.txt'],
});
await runtime.close({ timeoutMs: 60_000 }); // Stop → Export → DeleteWHY ANYSWARM
TRACE VIEWER
4 peers · 60m 35s · 1,200 model calls · 583 service calls · 53.071242 strict PASSMENTAL MODEL
createRuntime({ sandbox, models, connection, profiles, services, maxAgents, outputDir })EXAMPLES
Audit repos, patch modules, and verify tests across isolated sandboxes.
Explore competing proof branches and cite verified findings in a shared store.
Propose patches, peer-review ideas, and converge against objective evaluators.