Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By TerseAIv0.1.0MITIn 1 marketplace
Build stateful real-time backends like chat rooms and collaborative documents, with typed clients generated for your frontend. Runs locally with bun and deploys to Terse Cloud; self-hosting on GCP is described as a future option.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
durable-actors, stateful-serverless, real-time, actors, typed-client, durable, agents, sdk ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
an open-source alternative to Cloudflare Durable Objects... with no vendor lock-in, memory limits, and observability built in.
Durable Actors help you build real-time applications like chat systems (e.g. ChatGPT, Codex), collaboration tools (e.g. Notion), and agent swarms (e.g. Devin).
They provide stateful serverless functions, a foundational building block that abstracts away persistence, coordination, and infrastructure challenges in distributed systems.
Live demo · TypeScript documentation · Python documentation
Try Durable Actors on Terse Cloud at app.useterse.ai. To get started, run:
bunx terse-cli@latest install

Install Bun 1.4.2+.
bunx durable-actors init my-actors
cd my-actors
bun install
bunx durable-actors dev # Run the server locally on your machine
Define and export actors in your actor project’s src/actors.ts, the default entrypoint loaded by durable-actors dev. The runtime loads actors on demand and persists fields marked @Persisted.
For example, a chat history actor:
import { openai } from "@ai-sdk/openai"
import { streamText } from "ai"
import { Actor, type ActorSocket, Interleave, Persisted } from "durable-actors"
type Message = { role: "user" | "assistant"; content: string }
export class ChatHistory extends Actor<null, string, Message[]> {
@Persisted messages: Message[] = []
async onConnect(socket: ActorSocket<null, Message[]>) {
socket.send(this.messages)
}
@Interleave // Let other calls run during await, e.g. new connections while a reply streams.
async onMessage(_socket: ActorSocket<null, Message[]>, text: string) {
this.messages.push({ role: "user", content: text })
const result = streamText({ model: openai("gpt-5-mini"), messages: [...this.messages] })
const reply: Message = { role: "assistant", content: "" }
this.messages.push(reply)
this.broadcast(this.messages)
for await (const chunk of result.textStream) {
reply.content += chunk
this.broadcast(this.messages)
}
}
}
We make it super easy to integrate the actors into your existing tech stack. Just generate the client and you get a fully type safe contract to interact with.
bunx durable-actors generate
Create a WebSocket connection to one shared chat:
import express from "express"
import { actors } from "../generated/index.js"
export const app = express()
app.post("/api/chat/socket", async (_req, res) => {
const grant = await actors.ChatHistory.prepareWebsocket({
actorId: "lobby",
metadata: null
})
res.set("Cache-Control", "no-store").json(grant)
})
import { useEffect, useRef, useState } from "react"
import { createRoot } from "react-dom/client"
import type { actors } from "../generated/index.js"
function Chat() {
const socket = useRef<WebSocket>(null)
const [messages, setMessages] = useState<actors.ChatHistory.Outgoing>([])
useEffect(() => {
let active = true
async function connect() {
const response = await fetch("/api/chat/socket", { method: "POST" })
const { websocketUrl } = await response.json()
if (!active) return
socket.current = new WebSocket(websocketUrl)
socket.current.onmessage = event => setMessages(JSON.parse(event.data))
}
void connect()
return () => {
active = false
socket.current?.close()
}
}, [])
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub terseai/durable-actors --plugin durable-actorsPlugins from other owners that cover similar ground