
Security News
Socket for Origin Now Available
Socket for Origin scans dependency changes in pull requests and flags security risks based on your team’s policies. Now available in Cursor’s App Marketplace.
actor-core
Advanced tools
The Stateful Serverless Framework
Build AI agents, realtime apps, game servers, and more.
Supports Rivet, Cloudflare Workers, Bun, and Node.js.
# npm
npm add actor-core
# pnpm
pnpm add actor-core
# Yarn
yarn add actor-core
# Bun
bun add actor-core
import { Actor, type Rpc } from "actor-core";
export interface State {
messages: { username: string; message: string }[];
}
export default class ChatRoom extends Actor<State> {
// initialize this._state
_onInitialize() {
return { messages: [] };
}
// receive an remote procedure call from the client
sendMessage(rpc: Rpc<ChatRoom>, username: string, message: string) {
// save message to persistent storage
this._state.messages.push({ username, message });
// broadcast message to all clients
this._broadcast("newMessage", username, message);
}
}
import { Client } from "actor-core/client";
import type ChatRoom from "../src/chat-room.ts";
const client = new Client(/* manager endpoint */);
// connect to chat room
const chatRoom = await client.get<ChatRoom>({ name: "chat" });
// listen for new messages
chatRoom.on("newMessage", (username: string, message: string) =>
console.log(`Message from ${username}: ${message}`),
);
// send message to room
await chatRoom.sendMessage("william", "All the world's a stage.");
Deploy to your platform of choice:
Apache 2.0
FAQs
Unknown package
The npm package actor-core receives a total of 500 weekly downloads. As such, actor-core popularity was classified as not popular.
We found that actor-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Socket for Origin scans dependency changes in pull requests and flags security risks based on your team’s policies. Now available in Cursor’s App Marketplace.

Security News
Agent Baseline’s new reference architecture shows how to secure software factories with four boundaries enforced outside the AI agent.

Security News
arXiv now limits authors to two submissions a month as AI slop overwhelms moderators, delays good papers, and sparks debate over applying the limit to everyone.