Cloud sandboxes + agent orchestration — every feature boat.dev has, the prime-agent agent runtime on top, at a fraction of the cost.
Flint is a self-hostable platform that combines:
- A sandbox cloud — Firecracker-style microVM workspaces with per-second billing, auto-hibernate cost optimization (~92% cheaper than idle), snapshots, templates, SSH/web-terminal, and a 24-lane lifecycle orchestrator.
- A full RLM agent runtime (feature-complete port of PrimeIntellect's prime-agent paradigms) — persistent Python kernels per session, programmatic tool calling, subagents with their own kernels, A2A messaging, goals with token budgets, heartbeats/cron, autonomous completion gates, compaction, a self-improving continual harness, MCP, factory multi-agent workflows, and a 20-model catalog across 15 providers with live cost tracking.
- An ACP editor bridge — drive Flint from Zed/Neovim over the Agent Client Protocol.
npm install
npx prisma db push # SQLite via Prisma
npm run dev # http://localhost:3000Optional environment (all have sane defaults):
FLINT_REALTIME_URL=http://127.0.0.1:3004 # socket.io mini-service (optional)
ZAI_API_KEY=... # first-party model provider| Surface | What it does |
|---|---|
Kernel (src/lib/flint/kernel.ts, mini-services/flint-kernel/) |
Persistent supervised CPython process per session — NDJSON eval protocol, host-call bridge (19 host fns), per-variable snapshots, disk persistence across server restarts, idle eviction + lazy resume |
Sessions (src/lib/flint/rlm.ts) |
PTC turn loop (model → fenced python → kernel eval → observation), compaction with keep-10 boundary, fork with kernel snapshot copy, per-turn cost accounting |
| Subagents / Swarm | spawn()/collect() host fns, bounded concurrency (12), depth ≤ 4, own kernel + model per child |
| A2A messaging | Nuclear-family enforcement (parent ↔ children ↔ siblings), broadcast, steer/follow-up delivery, inbox drain at iteration boundaries |
| Goals + autonomous | Objectives with token budgets + continuation driver; autonomous mode with turn/token/time budgets and shell completion gates (failures fed back, gate retries) |
| Heartbeats | 5-field cron, 30s scheduler tick, steer/follow-up modes, busy-rescheduling |
| Harness (self-improving) | Agent-editable memories / prompt notes / skills / subagent specs; refine pipeline (planner LLM → planned refinement → versioned apply → rollback) |
| Factory | Declarative FSM/DAG machines — plan→implement→review→fix loops, foreach fan-out, joins, guards, budgets, failure policies |
| MCP | JSON-RPC 2.0 over HTTP (+SSE), tool policies, bearer auth, catalog (Notion, Linear, GitHub, Serper, …) |
| Models | 20 models × 15 providers (Z.ai, Prime Inference, Anthropic, OpenAI, Google, DeepSeek, Moonshot, MiniMax, xAI, Mistral, Groq, Cerebras, Fireworks, OpenRouter, HF) + user-model registry |
Flint speaks the Agent Client Protocol over a stdio adapter, exactly the surface prime-agent serves (initialize, session/new, session/load, session/prompt, session/cancel, session/close, session/set_config_option → outgoing session/update notifications with namespaced ai.flint.agent meta).
Zed — drop into ~/.config/zed/agents.json:
{
"flint": {
"name": "Flint",
"command": "node",
"args": ["/path/to/flint/scripts/flint-acp.mjs"],
"env": { "FLINT_URL": "http://127.0.0.1:3000" }
}
}Restart Zed → open the agent panel → pick Flint. Kernel evals stream as tool_call events, the agent's answer streams as agent_message_chunk, Esc maps to session/cancel, and the model/thinking-level can be switched live per session.
# run the adapter by hand (it speaks ndjson JSON-RPC on stdio)
FLINT_URL=http://127.0.0.1:3000 node scripts/flint-acp.mjs
# E2E test against a running server
node scripts/test-acp-e2e.mjs
node scripts/test-acp-cancel.mjs| Route | Purpose |
|---|---|
POST /api/flint/acp/connect |
open a connection (one per adapter process) |
GET /api/flint/acp/connect?id= |
SSE stream of translated session events |
POST /api/flint/acp/sessions |
session/new (cwd, mcpServers) and session/load |
POST /api/flint/acp/sessions/:id/prompt |
run a turn → { stopReason, final } |
POST /api/flint/acp/sessions/:id/cancel |
flag turn cancellation (lands at iteration boundary) |
POST /api/flint/acp/sessions/:id/close |
park kernel (snapshot survives), detach |
GET/POST /api/flint/acp/sessions/:id/config |
model · thought_level config options |
GET /api/flint/acp/status |
live bridge status (used by the Studio ACP tab) |
POST /api/flint/sandboxes provision + boot a workspace
POST /api/flint/sandboxes/:id/action start · stop · hibernate · fork · snapshot
POST /api/flint/sessions create an RLM agent session
POST /api/flint/sessions/:id/messages talk to the agent (PTC turns)
POST /api/flint/sessions/:id/kernel eval code in the session kernel
POST /api/flint/sessions/:id/compact fold the transcript
POST /api/flint/factory/:slug/run run a multi-agent machine
POST /api/flint/sessions/:id/autonomous goals + completion gates
POST /api/flint/mesh/exec stateless run on the sandbox mesh
GET /api/flint/mesh/providers provider health + free tiers
POST /api/flint/durable/:name/rpc RPC into any durable actor
GET /api/flint/durable/:name/subscribe SSE state/event stream
POST /api/flint/spaces/:id/publish cross-agent pub/sub
Full surface: 55+ routes under /api/flint/* (sessions, goals, heartbeats, harness, MCP, factory, models, metrics, cost, keys, templates, tasks, messages, sandboxes, ACP, durable, spaces, mesh).
A 2026-research-grounded scale layer modeled on Cloudflare Durable Objects (actor-per-key, SQLite-per-object storage, input/output gates, at-least-once durable alarms with 6× backoff, hibernation + lazy rehydration, RPC stubs, setState → onStateUpdate broadcast) and the stateless sandbox pattern used by E2B / Cloudflare Sandboxes / Daytona / InstaBox:
┌──────────────────────────────────────────────┐
│ Durable actors (state lives here, forever) │
│ agent:<sessionId> space:<slug> │
│ · KV + event log + versioned snapshots │
│ · durable alarms (fire turns later) │
│ · LWW shared KV + pub/sub + handoffs │
└───────────────┬──────────────────────────────┘
snapshot-in ─────────┴───────── snapshot-out
┌───────────────┴──────────────────────────────┐
│ Stateless sandbox mesh (compute is cattle) │
│ free-first: local · docker · instabox · e2b │
│ · daytona · github-actions · jupyter │
│ circuit breakers · cross-provider failover │
└──────────────────────────────────────────────┘
The stateless protocol: snapshot-in → acquire sandbox → restore files → exec → capture artifacts → snapshot-out → recycle. Any provider can run any task; a dead provider means failover, not data loss. Agents inside their Python kernels get the whole surface as host tools:
host("durable_state", "put", {"phase": "researching"}) # durable actor state
host("durable_checkpoint", "before-rag-index") # versioned checkpoint
host("schedule_wakeup", 900, "summarize findings") # durable alarm
host("space_publish", "flint-agents", "findings", {...}) # shared across agents
host("mesh_exec", "python train.py", { # free sandbox compute
"files": {"train.py": code}, "snapshotIn": ref,
"makeSnapshotOut": True, "captureGlobs": ["metrics/*.json"]})Free providers (configured via env, routed free-first):
| Provider | Env | Free allowance |
|---|---|---|
| local processes | — | always free |
| Docker | — | self-hosted, free |
| InstaBox (instabox.sh) | INSTABOX_API_KEY |
5 full VMs, 4 vCPU / 8 GiB each |
| E2B | E2B_API_KEY |
$100 credits, 20 concurrent |
| Daytona | DAYTONA_API_KEY |
free tier, 90ms boots |
| GitHub Actions | FLINT_GH_TOKEN + FLINT_GH_REPO |
unlimited on public repos (.github/workflows/flint-mesh.yml included) |
| Jupyter | JUPYTER_URL + JUPYTER_TOKEN |
any Jupyter endpoint becomes a sandbox |
Verified by E2E suites: scripts/test-durable-mesh.mjs (39 checks — single-writer serialization, snapshot round-trips across sandboxes, SSE fan-out, failover) and scripts/test-durable-restart.mjs (7 checks — state, spaces, snapshots and an alarm scheduled before a full server restart that fires after it).
src/lib/flint/ runtime: kernel, rlm, goals, heartbeats, harness,
factory, mcp, models, acp (ACP bridge), events,
durable (DO runtime), actors (Agent/Space), mesh
(stateless sandbox mesh, 7 providers)
src/app/api/flint/ 55+ REST routes (incl. durable/*, spaces/*, mesh/*)
src/components/flint/ UI: dashboard, sandboxes, studio (RLM cockpit), …
mini-services/ flint-kernel (CPython kernel), flint-realtime (socket.io)
scripts/ flint-acp.mjs, E2E suites (ACP, durable-mesh, restart)
prisma/ schema (16 agent-runtime + durable-mesh models)
Same 2vCPU·4GB workload: $0.008/hr vs $0.018/hr, per-second billing, free when stopped, and the auto-hibernate optimizer folds idle sandboxes to snapshot-only pricing (~92% savings). The agent runtime meters per-turn token costs across every provider in the catalog — subagents, compaction and heartbeats included.
The Durable Mesh pushes the cost floor to $0: free-tier providers are routed first (5 InstaBox VMs + E2B credits + Daytona + unlimited GitHub-Actions compute on public repos + self-hosted Docker/local/Jupyter), state persists in durable actors regardless of which (or how many) sandboxes die, and failed providers fail over instead of billing retries.
MIT