Celld

Deploy Tardigrade actors to a self-hosted Celld fleet.

Celld runs Worker bundles and SQLite Durable Objects on a self-hosted fleet. Use the same worker.ts as the Cloudflare host:

text
Worker fetch
  |
  +-- ACTORS.getByName(instance)
        |
        +-- ActorDO
              +-- supervisor journal
              +-- supervisor recovery alarm
              |
              +-- THREADS.getByName(coordinate)
                    +-- ThreadDO
                          +-- thread SQLite database
                          +-- runtime and checkpoint
                          +-- thread recovery alarm

The Worker exports ActorDO and ThreadDO from createActorWorker in tardie/platform/cloudflare. Instance requests reach the directory, which forwards thread requests to their owning Durable Objects. The generated services.ts supplies model and tool implementations. Use createActorObject and createThreadObject separately when custom Worker routing is required.

Deploy

Install the Celld CLI and make esbuild available on PATH. For a Bun project, install the bundler locally:

bash
bun add --dev esbuild

tdg init creates celld.jsonc, and tdg setup updates its model connections without changing other Celld settings. Celld accepts string Worker variables, so the manifest stores TARDIGRADE_CONFIG as encoded JSON.

Set the fleet bucket with --bucket or CELLD_BUCKET. Use --endpoint and --region when needed for S3-compatible storage. Celld also supports gs:// buckets with Google Application Default Credentials and az:// containers with Azure credentials.

bun run deploy:celld --bucket s3://actors --dry-run bun run deploy:celld --bucket s3://actors

The first command validates the deployment. The second publishes it.

Configure nodes

Each node needs the model provider credentials. Set TARDIGRADE_TOKEN to enable bearer authentication. Prefix a variable with CELLD_VAR_, or set CELLD_VARS_FILE to a file containing the original variable names.

bash
CELLD_VAR_TARDIGRADE_TOKEN="$TARDIGRADE_TOKEN" \
CELLD_VAR_OPENAI_API_KEY="$OPENAI_API_KEY" \
celld \
  --bucket s3://actors \
  --listen 0.0.0.0:8080 \
  --internal-listen 10.0.0.12:8081 \
  --advertise 10.0.0.12:8081

Keep the internal listener on a trusted private network. Running nodes poll for deployment changes and adopt the new version in place. See the operations guide for rollout controls.

Storage

The generated manifest binds ACTORS to ActorDO and THREADS to ThreadDO. Each actor instance has a supervisor SQLite database, and each thread has its own SQLite database, as on Bun and Cloudflare. Opening a thread restores atom state from its checkpoint and recorded events.

Model configuration is stored in TARDIGRADE_CONFIG, and model metadata is bundled in models.lock.json. Provider secrets are supplied by the fleet nodes.