> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Stateful Actors (Beta) llms.txt

> Machine-readable documentation index for Stateful Actors (Beta) (Compute) — guide pages and API endpoints for AI agents and LLMs

# Telnyx Compute: Stateful Actors (Beta) — Documentation Index

> Stateful Actors (Beta) documentation within the Compute section of the Telnyx developer docs ([https://developers.telnyx.com](https://developers.telnyx.com)).
> This file: [https://developers.telnyx.com/docs/development/llms/compute-stateful-actors-beta-llms-txt.md](https://developers.telnyx.com/docs/development/llms/compute-stateful-actors-beta-llms-txt.md) · Root index: [https://developers.telnyx.com/llms.txt](https://developers.telnyx.com/llms.txt)

## Overview

* [Stateful Actors](https://developers.telnyx.com/docs/edge-compute/stateful-actors.md): A stateful actor is a single-threaded server that owns one entity's state. The platform runs one instance per name, routes every call for that name to it, runs your methods one at a time, and persist…

## Get Started

* [Stateful Actors Quick Start](https://developers.telnyx.com/docs/edge-compute/stateful-actors/quick-start.md): Scaffold an Account Stateful Actor, deploy it, and prove per-account isolation, safe concurrent debits, and persistence.

## Concepts

* [How It Works](https://developers.telnyx.com/docs/edge-compute/stateful-actors/concepts/how-it-works.md): A stateful actor is a single-threaded server with durable, flush-before-ack storage — one per entity. Derive the execution model from first principles, then map it mechanism-by-mechanism to what you'…
* [Execution Model](https://developers.telnyx.com/docs/edge-compute/stateful-actors/concepts/execution-model.md): The four guarantees a stateful actor's runtime makes: exactly one instance per name, one call at a time, writes durable before the caller sees a result, and only persisted state survives. Each maps t…
* [Lifecycle & Placement](https://developers.telnyx.com/docs/edge-compute/stateful-actors/concepts/lifecycle.md): Where a stateful actor instance runs, when it is activated and evicted, and what survives a restart. Instances are placed on first touch, evicted when idle, and restarted on deploy or host failure —…
* [Addressing](https://developers.telnyx.com/docs/edge-compute/stateful-actors/concepts/addressing.md): Reach a stateful actor instance by name. idFromName is deterministic — the same name always lands on the same instance; newUniqueId mints a fresh one. Both return a stub you call methods on.

## Reference

* [Overview](https://developers.telnyx.com/docs/edge-compute/stateful-actors/api-reference.md): The Stateful Actor API surface — the StatefulActor base class, ActorContext, per-instance storage, the actor binding (ActorNamespace / ActorStub), alarms, configuration, and errors.
* [Base Class](https://developers.telnyx.com/docs/edge-compute/stateful-actors/api-reference/base.md): The StatefulActor base class — subclass it, declare async methods, and they become RPC-callable from a stub. Holds this.ctx and this.env.
* [Actor Context](https://developers.telnyx.com/docs/edge-compute/stateful-actors/api-reference/context.md): The this.ctx object on a StatefulActor — the instance's identity, per-key storage, single alarm, one-shot init, and its live WebSockets.
* [Actor Storage](https://developers.telnyx.com/docs/edge-compute/stateful-actors/api-reference/storage.md): Per-key persistent storage for a Stateful Actor, accessed as this.ctx.storage — get/put/delete/list/transaction plus the alarm API. Writes that return successfully are persisted at turn granularity.
* [Actor Namespace](https://developers.telnyx.com/docs/edge-compute/stateful-actors/api-reference/namespace.md): The env.\<BINDING> handle your function calls into — idFromName (deterministic) and newUniqueId (random), both returning an ActorStub.
* [Actor Stub](https://developers.telnyx.com/docs/edge-compute/stateful-actors/api-reference/stub.md): The client handle returned by idFromName / newUniqueId. Calling a method on the stub is an RPC to that one actor instance.
* [Actor Alarms](https://developers.telnyx.com/docs/edge-compute/stateful-actors/alarms.md): Schedule deferred work from inside a Stateful Actor method using the single per-actor alarm. At-least-once delivery with automatic redelivery on failure; make your handler idempotent.
* [Configuration](https://developers.telnyx.com/docs/edge-compute/stateful-actors/api-reference/configuration.md): The telnyx.toml \[\[actors]] block that declares an actor binding — binding (the env property) and type (the class to instantiate per name).
* [Errors](https://developers.telnyx.com/docs/edge-compute/stateful-actors/api-reference/errors.md): Errors the Stateful Actor runtime can surface — BlockConcurrencyTimeoutError, ActorOutputGateError, ActorMethodTimeoutError, ActorFetchTimeoutError, and CodecError.

## Guides

* [Project Structure](https://developers.telnyx.com/docs/edge-compute/stateful-actors/guides/project-structure.md): A Stateful Actor project is one module that exports two things — the actor class and a fetch handler — wired together by an \[\[actors]] binding in telnyx.toml.
* [Local Development](https://developers.telnyx.com/docs/edge-compute/stateful-actors/local-development.md): Run a Stateful Actor project locally with telnyx-edge dev — a full function + actor stack in Docker where env.\<BINDING> calls resolve and actor state survives hot reloads.
* [Shared Actors](https://developers.telnyx.com/docs/edge-compute/stateful-actors/shared-actors.md): Reach one Stateful Actor type from multiple functions on the same account by declaring the same type under different bindings — the owner ships the class, the reference ships none.
* [When to Use Stateful Actors](https://developers.telnyx.com/docs/edge-compute/stateful-actors/guides/when-to-use.md): Use a stateful actor when an entity has state that must be mutated coherently across many requests. Use a plain function for stateless work, and a database for cross-entity transactions or bulk queri…
* [Key-Value](https://developers.telnyx.com/docs/edge-compute/stateful-actors/guides/storage/key-value.md): Each Stateful Actor has private, durable, per-key storage at this.ctx.storage — get/put/delete/list plus atomic transaction(). Values round-trip through a codec. Reach for it by default; use SQL when…
* [SQL](https://developers.telnyx.com/docs/edge-compute/stateful-actors/guides/storage/sql.md): Each Stateful Actor has a private, durable, embedded SQLite database at this.ctx.storage.sql — synchronous exec() with positional binds, typed rows, a single-pass cursor, and transactionSync() for at…
* [WebSockets](https://developers.telnyx.com/docs/edge-compute/stateful-actors/websockets.md): Terminate a live WebSocket on a Stateful Actor: the function authenticates once at the handshake, then inbound messages dispatch one at a time on the owning instance — single-threaded, with durable s…
* [Connection Lifecycle & Limits](https://developers.telnyx.com/docs/edge-compute/stateful-actors/websockets/lifecycle.md): How WebSocket connections to a Stateful Actor begin and end: the handshake guarantees, the close-code table, today's duration budget, a reconnect pattern, and the frame, queue, and handler limits.
