Tisyn (pronounced like the chicken) is a runtime for AI agent workflows where execution is deterministic, journaled, and replayable by construction.
Workflows are defined in a structured DSL, compiled to a serializable intermediate representation, validated before execution, and run against an append-only event journal. The kernel guarantees crash recovery via exact replay. Agents operate within scoped, supervised execution boundaries with explicit contracts. The system separates non-deterministic planning from constrained execution: the plan is a program, not a prompt.
Tisyn is for systems where work needs to cross boundaries without becoming ambiguous.
Typical examples include:
- handing work from a host to a remote agent
- delegating a single task or a subtree of tasks
- streaming progress back while work is running
- resuming after interruption without losing the execution story
- keeping concurrent work bounded so unnecessary background activity does not leak resources
The key idea is that Tisyn makes the work itself explicit. Instead of depending on opaque in-memory runtime state, Tisyn represents execution as serializable structure that can be validated, transported, interpreted, and resumed.
Tisyn programs are data. They can be inspected, validated, transported, stored, and replayed.
Agents exchange explicit work and explicit results rather than hidden runtime state.
Concurrent work is structured, so child work stays tied to its parent and does not continue indefinitely after its purpose is gone.
Execution can resume from journaled results after interruption without requiring the interpreter’s in-memory state to be serialized.
Tisyn is easiest to understand as layers:
-
Program model and validation
@tisyn/ir: the Tisyn expression/value model@tisyn/validate: boundary validation for untrusted or external IR@tisyn/config: workflow runtime-topology config descriptors
-
Semantics
@tisyn/kernel: evaluation, environments, core errors, and durable event shapes
-
Execution and continuation
@tisyn/durable-streams: append-only replay/journal primitives@tisyn/runtime: execution of IR, including durable and remote flows
-
Agents and remoting
@tisyn/agent: typed agent declarations, implementations, dispatch, and invocation helpers@tisyn/protocol: wire-level host/agent messages@tisyn/transport: sessions and concrete transports
-
Tooling and verification
@tisyn/compiler: compile restricted generator-shaped TypeScript into Tisyn IR@tisyn/dsl: parse Tisyn Constructor DSL text into IR (inverse ofprint())@tisyn/conformance: fixture harness for validating runtime behavior
Start in different places depending on what you want to learn.
- Start with
@tisyn/irif you want to see what a Tisyn program looks like. - Read
@tisyn/validateand@tisyn/kernelif you want to understand correctness and semantics. - Read
@tisyn/runtimeand@tisyn/durable-streamsif you want to understand execution and continuation. - Read
@tisyn/agent,@tisyn/protocol, and@tisyn/transportif you want to understand host/agent integration and cross-boundary execution. - Read
@tisyn/compilerif you want to generate IR from TypeScript source instead of building IR by hand. - Read
@tisyn/dslif you want to parse Constructor DSL text (e.g. from an LLM) back into IR.
| Package | Purpose |
|---|---|
@tisyn/config |
Workflow config descriptors, constructors, validation, and walking |
@tisyn/ir |
AST types, constructors, walkers, printers, and value types |
@tisyn/validate |
IR validation and MalformedIR errors |
@tisyn/kernel |
Core evaluation, environments, and runtime error/event types |
@tisyn/durable-streams |
Durable append-only stream abstractions used by replay |
@tisyn/runtime |
Execution of IR, including durable and remote flows |
@tisyn/agent |
Typed agents, implementations, dispatch, and invocation helpers |
@tisyn/protocol |
Parsed/constructed protocol messages for host-agent communication |
@tisyn/transport |
Protocol sessions and transports like stdio, websocket, worker, and sse-post |
@tisyn/compiler |
Compile restricted TypeScript generator functions into Tisyn IR |
@tisyn/dsl |
Parse Tisyn Constructor DSL text into IR; inverse of print() |
@tisyn/conformance |
Execute fixtures against the runtime to verify behavior |
import { Add, Q } from "@tisyn/ir";
import { execute } from "@tisyn/runtime";
const ir = Add(Q(20), Q(22));
const { result } = yield* execute({ ir });import { agent, operation, dispatch } from "@tisyn/agent";
import { installRemoteAgent, websocketTransport } from "@tisyn/transport";
const math = agent("math", {
double: operation<{ value: number }, number>(),
});
yield* installRemoteAgent(math, websocketTransport({ url: "ws://localhost:8080" }));
const result = yield* dispatch(math.double({ value: 21 }));For the detailed agent model and API examples, see @tisyn/agent.
| Document | Scope |
|---|---|
| Configuration Specification | Workflow runtime-topology config descriptors, validation, env resolution |
| Configuration Test Plan | Conformance test plan for the configuration specification |
| CLI Specification | tsn generate, tsn build, tsn run, and tsn check command behavior |
| CLI Test Plan | Conformance test plan for the CLI specification |
| System Specification | Core language: values, expressions, and evaluation rules |
| Kernel Specification | Kernel semantics, environments, and effect dispatch |
| Agent Specification | Typed agent declarations, implementations, and invocation |
| Compiler Specification | TypeScript-to-IR compilation rules and restrictions |
| Compiler Test Plan | Conformance test plan for rooted import-graph compilation and diagnostics |
| Compound Concurrency Specification | all, race, spawn, and join orchestration semantics |
| Spawn Specification | Authored spawn(...), task handles, join, and structured child-task lifecycle |
| Claude Code Specification | Claude Code transport adapter bindings: ACP stdio and SDK adapters, protocol translation, operations, and lifecycle |
| Claude Code Test Plan | Conformance test plan for the Claude Code transport adapter layer |
| Resource Specification | resource(...) and provide(...) scope-creating primitives for managed initialization and cleanup |
| Inline Invocation Specification | invokeInline(...) shared-lifetime step execution, inline-lane identity, capability/counter ownership semantics |
| Inline Invocation Test Plan | Conformance test plan for the inline invocation specification |
| Stream Iteration Specification | Authored for (const x of yield* each(expr)), stream.subscribe, stream.next, and subscription-handle runtime rules |
| Browser Contract Specification | Browser transport boundary with navigate, batched in-browser execute, and transport-configured local capability composition |
| Timebox Specification | timebox compound external: deadline-bounded execution returning completed/timeout result |
| Timebox Test Plan | Test plan for timebox and converge across compiler, runtime, and journaling layers |
| Authoring Layer Specification | Generator-based authoring format and contract declarations |
| Constructor DSL Specification | Grammar, constructor table, and recovery semantics for the DSL parser |
| Architecture | System architecture and package relationships |
Tisyn separates concerns cleanly:
- the program model is explicit and serializable
- the kernel defines how expressions evaluate
- the runtime executes and continues work
- the agent layer moves work across boundaries
- the transport layer carries messages between hosts and agents
That separation is what lets Tisyn support deterministic coordination, safe delegation, bounded concurrency, and durable continuation in one system.