Yoke.sh
Concepts

Concepts

Core Yoke concepts — stream, actors, portals, instances, filters, and durability.

Yoke is an always-on, event-driven multi-actor runtime you embed in your own product. The kernel is Rust; the internal actor package is TypeScript running in an embedded Deno worker. End users talk to your server, not to Yoke.

This section explains the mental model behind the runtime — how pieces fit together before you dive into SDK APIs or the embed API.

Three primitives

Everything in Yoke reduces to three building blocks:

                    EXTERNAL WORLD
                          │
              ┌───────────┴───────────┐
              │        PORTALS        │
              │  routes · start()     │
              └───────────┬───────────┘
                    append │
                          ▼
              ┌───────────────────────┐
              │    GLOBAL STREAM       │
              │  (Postgres, sequenced) │
              └───────────┬───────────┘
                    async fan-out
          ┌───────────────┼───────────────┐
          ▼               ▼               ▼
    ┌──────────┐   ┌──────────┐   ┌──────────┐
    │ Actor    │   │ Actor    │   │ Actor    │
    │ instance │   │ instance │   │ instance │
    └──────────┘   └──────────┘   └──────────┘
  1. Global stream — sequenced, append-only, durable event log
  2. Actors — reactive; consume events from per-instance queues
  3. Portals — proactive; connect to the external world

Core principles

PrincipleMeaning
Stream is the spineAll communication goes through the global event stream. No direct actor-to-actor channels.
No targetsPublishers emit typed events. Consumers self-select via filters.
No replayThe stream is history and audit, not a program to re-execute.
No purity enforcementActors are async, impure, and non-deterministic.
No stream read APIUser code cannot read the stream directly — security boundary.
Definitions fixed, instances dynamicActor/portal types are registered at build time. Instances are created at runtime.

Yoke is not an LLM framework. An actor is any stateful async event processor — code, LLM calls, human-in-the-loop, or a combination. Multi-agent coordination emerges from actors publishing events and listening via filters.

Technology stack

LayerTechnologyRole
Product hostYour Rust server (yoke-runtime)Public API, embed the kernel
Internal packageTypeScript (@yoke/sdk)Actor definitions the worker loads
WorkerDeno (embedded via libdeno)Transpile, npm, IPC bridge
KernelRust runtimeStream, fan-out, queues, scheduler
StoragePostgres 16+Stream, instances, queues, conversations
Actor stateSQLite per instancepg_sqlite (BYTEA in Postgres) or S3

Embed Yoke in your product — host vs internal package.

Mental model — how to think about Yoke systems.

Events & stream — the communication backbone.

Actors and Portals — the two processor types.

Instances — definitions become running objects.

Durability — what persists and when.

On this page