Yolk SDK

Yolk SDK

Build host-owned agent products with typed streams, tools, memory, integrations, sandbox execution, and durable runtimes.

Yolk SDK gives you the reusable parts of an agent product without taking over your app:

  • a typed agent transcript protocol
  • a streaming model/tool loop
  • schema-backed tools and HITL
  • browser/client state helpers
  • MCP adapters
  • knowledge ingestion/search contracts
  • bounded file-to-text extraction
  • connector actions
  • sandbox execution
  • Vercel Workflow orchestration helpers
  • a run-lifecycle harness for ownership, wakes, and recovery

You bring your app: auth, routes, DB, storage, provider credentials, UI, and product policy.

Build your first agent in one file

import { Effect, Layer, Stream } from 'effect'
import { ContextTransformer, LoopConfig, run } from '@yolk-sdk/agent/loop'
import { FauxProvider, Reply, TestToolExecutor } from '@yolk-sdk/agent/loop/testing'
import { UserMessage } from '@yolk-sdk/agent/protocol'

const TestLayer = Layer.mergeAll(
  FauxProvider.layer(Reply.text('Hello from Yolk.')),
  TestToolExecutor.layer({}),
  LoopConfig.defaultLayer,
  ContextTransformer.identity
)

const events = await Effect.runPromise(
  run({
    messages: [UserMessage.make({ content: 'Say hello' })],
    systemPrompt: 'Be concise.',
    tools: [],
    model: 'test-model'
  }).pipe(Stream.runCollect, Effect.provide(TestLayer))
)

This uses the test provider so you can learn the loop without a provider account. Swap in a real provider layer when your host app is ready.

What should I read?

I want to...Read
run a first agentQuickstart
create a Next routeBuild a chat route
add a typed toolAdd a tool
stream to ReactStream to React
persist sessionsPersist a session
choose model providersModel providers
see available integrationsAvailable integrations
add MCP toolsAdd MCP tools
add knowledge searchAdd knowledge search
run commands safelyAdd sandbox execution
script many tool callsAdd code mode
run tool writes onceLedger writes
extract text from filesExtract file text
move files between toolsMove files between tools
share subscription accountsShare subscription accounts
own run lifecycleHarness package

Public packages

PackageRole
@yolk-sdk/agentbuild and stream agent turns
@yolk-sdk/mcpuse MCP tools or expose Yolk tools as MCP
@yolk-sdk/knowledgemodel, ingest, search, and pack agent knowledge
@yolk-sdk/connectorsdefine reusable external API actions
@yolk-sdk/sandboxrun commands in sandbox sessions
@yolk-sdk/codemodelet one script call many tools (code mode)
@yolk-sdk/extractorsturn uploaded files into bounded, sanitized text
@yolk-sdk/filesmove files between tools by fileId
@yolk-sdk/poolserve several subscription accounts as one provider
@yolk-sdk/vercel-workflowsorchestrate durable agent loops on Vercel Workflows
@yolk-sdk/harnessown run lifecycle, claims, inbox, and recovery
@yolk-sdk/conformanceexperimental wire-fixture record, replay, and faults
@yolk-sdk/emulatorsexperimental service emulators for tests

How docs are organized

  • Quickstart gets one agent loop running.
  • Build guides show the app surfaces most hosts need.
  • Integrations show how packages combine into tools and runtime capabilities.
  • Reference is for package maps, protocol terminology, and boundaries.

AI-readable docs

  • /llms.txt lists the curated docs index for agents and coding assistants.
  • /llms-full.txt includes processed Markdown for all docs pages.

On this page