Tried denoland/celld: Self-Hosted Durable Objects Without the Cloud Lock-In
denoland/celld is a self-hosted, distributed implementation of Durable Objects. It gives builders a way to run stateful, single-instance-per-key services on infrastructure they control instead of tying the architecture to a managed edge platform.
It picked up +30 GitHub stars today, which makes sense: Durable Object patterns are useful for AI agent sessions, collaborative apps, rate limiters, multiplayer state, queues, and webhook coordination. The hard part has always been operational ownership. celld makes that trade-off more approachable for teams that prefer Docker, predictable infrastructure, and lower long-term platform costs.
My interest is AI workflow state. A cell can own one agent conversation or job ID, serialize writes, persist checkpoints, and call a model gateway without racing multiple workers.
A minimal Docker-style deployment can keep the state layer and model configuration separate:
services:
celld:
image: ghcr.io/denoland/celld:latest
ports:
- "8787:8787"
volumes:
- ./data:/data
environment:
CELLD_DATA_DIR: /data
AI_BASE_URL: https://b-lost.com/v1
AI_MODEL: claude-fable-5
AI_API_KEY: ${B_LOST_API_KEY}
Inside a cell handler, I would use the standard Anthropic Messages shape for cached agent instructions:
const response = await fetch(`${process.env.AI_BASE_URL}/messages`, {
method: "POST",
headers: {
"x-api-key": process.env.AI_API_KEY!,
"anthropic-version": "2023-06-01",
"content-type": "application/json",
},
body: JSON.stringify({
model: process.env.AI_MODEL || "claude-fable-5",
max_tokens: 800,
system: [{
type: "text",
text: longAgentInstructions,
cache_control: { type: "ephemeral" },
}],
messages: [{ role: "user", content: userMessage }],
}),
});
For repeat-heavy agent workloads, native Anthropic prompt caching is the real ROI lever: cache hits can reduce repeated prompt cost by up to 90%. B-Lost’s relay uses https://b-lost.com/v1, advertises 0.8x official list pricing, and works well when you want one gateway configuration across coding clients and self-hosted services.
The bigger win is architectural: celld keeps durable coordination close to your app, while an OpenAI-compatible or Anthropic-compatible gateway keeps model providers replaceable.
Top comments (0)