Agents
Build event-driven LLM agents with the Yoke Agent SDK — bootstrap, mesh actors, inference, tools, compaction, and guardian angels.
Yoke agents are not a special runtime mode. An agent is a conversation-store actor plus a mesh of actor instances (ingestion, processor, egress) that react to conversation.message.posted events.
Overview
Mental model — forum, monologue, actor instances, and the three-actor mesh.
Bootstrap
createAgent and joinConversation — stand up agents without mirror relations.
Mesh pattern
Ingestion → processor → egress — how forum traffic becomes agent replies.
Processor
Event-driven single-step LLM loop — one short step per message posted.
Egress
User-visible output — forwards agent text from monologue to forum.
Inference
defineInferenceStack, providers, routing, and ctx.llm.infer.
Tools
defineTool, toolchains, Zod validation, and parallel execution.
Subagents
Spawn child agents, send_message_to_agent, and reply bridges.
Compaction
Pluggable transcript compaction with monologue swap.
Guardian angel
Subscription + runner — steer the primary agent via inject_message.
Follow-up
Scheduled nudge when the agent was last to speak on the forum.
Quick start
import { createAgent, joinConversation } from "@yoke/sdk";
// 1. Create agent persona + egress (once per agent)
const agent = await createAgent(ctx, { name: "support-bot" });
// 2. Join a forum — creates monologue + ingestion + processor per stint
const join = await joinConversation(ctx, agent, room.id, {
model: "gpt-4o",
});Register SDK actor definitions in your internal yoke.ts package (defineIngestionActor, defineProcessorActor, defineEgressActor, …). Your product server embeds the kernel and loads that package — embed. See Bootstrap for createAgent and joinConversation.
Related
- Conversations — data model, message types, delivery, HTTP API
- Mesh pattern — ingestion → processor → egress