Introduction

Run sandboxed Claude-CLI agents on demand via a REST API.

FlowKoi runs your pre-configured flows — a CLAUDE.md + tools + .claude/ skills + optional env — inside ephemeral containers. The Sandcastle API ships that capability as a REST surface so your servers can:

  • Trigger a run with a prompt and any input files you want injected.
  • Stream output as the agent works (SSE or WebSocket).
  • Send follow-up messages mid-run, inject more files, stop early.
  • Receive a signed webhook the moment a run finishes.

If you’ve used Anthropic Managed Agents, E2B, or Modal sandboxes, this lives in the same category — with one knob: you ship the agent’s brain (CLAUDE.md + skills) once in the dashboard, then trigger it as many times as you need from the API.

Where to start

The mental model

  1. Flow — the recipe. Lives in your project, version-controlled. Defines what the agent knows and which tools it has.
  2. Run — one execution of a flow inside a fresh container. Has a runId, a streaming surface, and a terminal state.
  3. API key — project-scoped credential. Mint as many as you want, revoke any time.
  4. Webhook — outbound HMAC-signed POST to your URL when a run finishes.

Everything else — rate limits, idempotency, file injection, mid-run messages — is plumbing around those four nouns.