# Yolk SDK

- [Yolk SDK](/docs): Build host-owned agent products with typed streams, tools, memory, integrations, sandbox execution, and durable runtimes.
- [Installation](/docs/installation): Install canary Yolk packages with matching lockstep versions.
- [Quickstart](/docs/quickstart): Run a complete Yolk agent loop with a typed tool and fake provider.
- Build guides
  - [Build a chat route](/docs/guides/build-chat-route): Create a Next.js route that accepts Yolk messages and streams NDJSON agent events.
  - [Add a tool](/docs/guides/add-tool): Define a typed tool with Effect Schema and pass it to an agent loop.
  - [Stream to React](/docs/guides/stream-react): Connect a browser chat UI to a Yolk route with client and React helpers.
  - [Build a React chat UI](/docs/guides/react-chat-ui): Use headless React helpers for streaming, stop, retry, edit, regenerate, and HITL controls.
  - [Persist a session](/docs/guides/persist-session): Use append-backed runtime requests when the server owns transcript state.
  - [Implement a session store](/docs/guides/durable-session-store): Back append-mode runtime with a database or append log.
  - [Implement durable compaction](/docs/guides/durable-compaction): Keep full session history while sending compacted context to models.
  - [Resolve private attachments](/docs/guides/private-attachments): Keep opaque file references in history and resolve native media for each provider request.
  - [Add human-in-the-loop](/docs/guides/hitl): Pause for approvals, questions, typed inputs, or action-backed interactions.
  - [Test an agent](/docs/guides/testing): Use package fakes to test loops, tools, streams, and integrations without provider calls.
  - [Test with emulators](/docs/guides/testing-with-emulators): Run integrations and conformance cases offline against service emulators.
- Integrations
  - [Available integrations](/docs/integrations): What Yolk ships today: model providers, connector modules, MCP, knowledge, sandbox, and workflow adapters.
  - [Model providers](/docs/integrations/model-providers): Available LLM provider adapters and OAuth helper surfaces.
  - [Use model providers](/docs/integrations/provider-setup): Wire OpenAI-compatible, Vercel AI Gateway, OpenCode Go, Codex, Claude, or Grok provider layers into an agent loop.
  - [Share subscription accounts](/docs/integrations/subscription-pools): Serve several accounts of one provider as one LLMProvider, spending the quota that resets soonest first and failing over when an account runs out.
  - [Connectors catalog](/docs/integrations/connectors): Built-in connector modules, credential slots, config keys, and action ids.
  - [Add MCP tools](/docs/integrations/mcp-tools): List MCP server tools and feed them into a Yolk agent loop.
  - [Add knowledge search](/docs/integrations/knowledge-search): Ingest documents, search them, and expose results as an agent tool.
  - [Extract file text](/docs/integrations/file-extraction): Turn PDF, DOCX, XLSX, PPTX, and text files into bounded, sanitized text, and feed it to knowledge ingestion.
  - [Move files between tools](/docs/integrations/files): Capture file bytes from tool results once and let the agent move them by fileId to upload URLs, download links, and the sandbox.
  - [Add connector tools](/docs/integrations/connector-tool): Turn typed external API actions into agent tools.
  - [Add sandbox execution](/docs/integrations/sandbox): Let an agent run commands inside a scoped sandbox session.
  - [Add code mode](/docs/integrations/code-mode): Let the model write one short script that calls many tools and returns only what matters.
  - [Deploy with Vercel Workflows](/docs/integrations/vercel-workflow): Orchestrate a durable agent run with host-owned model and tool steps.
- Cookbook
  - [Cookbook](/docs/cookbook): Practical recipes for combining Yolk packages in an app.
- Agent
  - [Agent package](/docs/agent): Build streaming agents with messages, model providers, tools, clients, and React state.
  - [Protocol](/docs/agent/protocol): Create transcript messages, pass files, and consume stream events.
  - [Loop and runtime](/docs/agent/loop-runtime): Choose `run` or `runRuntime` and stream agent events from your app.
  - [Tools and HITL](/docs/agent/tools-hitl): Define typed tools, expose them to the loop, and pause for human input.
  - [Client and React](/docs/agent/client-react): Connect browser UI to an agent stream and render replay-safe chat state.
  - [Agent status](/docs/agent/status): One typed status for a run (idle, working, blocked on a person, done, failed), from live events or stored state.
  - [Voice](/docs/agent/voice): Build live browser voice agents with Yolk tools, approvals, and durable transcripts.
  - [Classifier models](/docs/agent/classifier-models): Ask typed questions about data and get calibrated probabilities instead of text.
  - [Providers and OAuth](/docs/agent/providers-oauth): Provide model layers and keep token storage in your host app.
- MCP
  - [MCP package](/docs/mcp): List MCP tools, call them, or expose Yolk-compatible tools through MCP.
  - [MCP auth, local servers, and server policy](/docs/mcp/auth-local-server): Configure remote auth headers, Node-only local stdio, and tool-only MCP servers safely.
- Knowledge
  - [Knowledge package](/docs/knowledge): Store simple durable knowledge, inject pinned context, search chunks, and expose lookup/manage tools.
  - [Ingest knowledge](/docs/knowledge/ingestion-pipeline): Wire extraction, chunking, embeddings, summarization, and search storage into the ingestion pipeline.
- Connectors
  - [Connectors package](/docs/connectors): Define external API actions and turn them into agent tools.
  - [Transfer connector files](/docs/connectors/files): Download bytes and create or update files through bounded host-only ports.
  - [Afloat MCP conformance](/docs/connectors/afloat): Experimental Afloat MCP target, seeds, and fixtures for the MCP conformance cases, and the Afloat emulator profile.
  - [Figma MCP conformance](/docs/connectors/figma): Experimental Figma MCP target, seeds, and synthetic fixtures for the MCP conformance cases, and the Figma emulator profile.
  - [Read and write Fortnox records](/docs/connectors/fortnox): Read and write Fortnox records, prices, payments, offers, inbox, settings, and bookkeeping with host-owned OAuth.
  - [Kie conformance](/docs/connectors/kie): Experimental Kie conformance cases for tests and hand-run practice-account checks, and the Kie emulator.
  - [Microsoft conformance](/docs/connectors/microsoft): Experimental Microsoft Graph conformance cases for tests and hand-run practice-tenant checks.
  - [Email conformance](/docs/connectors/email): Experimental port-level conformance cases for the generic EmailClient, for tests and hand-run practice-mailbox checks.
  - [Dropbox conformance](/docs/connectors/dropbox): Experimental Dropbox conformance cases for tests and hand-run practice-account checks.
  - [Notion conformance](/docs/connectors/notion): Experimental Notion conformance cases for tests and hand-run practice-workspace checks.
  - [Todoist conformance](/docs/connectors/todoist): Experimental Todoist conformance cases for tests and hand-run practice-account checks.
  - [Telegram conformance](/docs/connectors/telegram): Experimental Telegram conformance cases for tests and hand-run practice-bot checks.
  - [GitHub conformance](/docs/connectors/github): Experimental GitHub conformance cases for tests and hand-run practice-repository checks.
  - [Google conformance](/docs/connectors/google): Experimental Gmail, Calendar, and Drive conformance cases for tests and hand-run practice-account checks.
  - [LinkedIn search conformance](/docs/connectors/linkedin-search): Experimental LinkedIn search conformance cases for tests and hand-run API checks.
  - [Cloudflare R2 conformance](/docs/connectors/r2-storage): Experimental port-level R2 conformance cases over the host R2Presigner and R2ObjectClient.
- Sandbox
  - [Sandbox package](/docs/sandbox): Run commands in sandbox sessions and expose one destructive agent tool.
  - [Sandbox lifecycle and safety](/docs/sandbox/lifecycle-safety): Configure Vercel Sandbox lifecycle, source, environment, ports, and agent approval policy.
  - [Cloudflare Containers](/docs/sandbox/cloudflare): Run the Sandbox service on Cloudflare Containers through a Durable Object.
- Vercel Workflows
  - [Vercel Workflows package](/docs/vercel-workflows): Run durable agent loops with host-owned Workflow steps.
  - [Step contracts](/docs/vercel-workflows/step-contracts): Model, tool, stream, error, retry, and terminal contracts for Vercel Workflow agents.
  - [Harness composition](/docs/vercel-workflows/harness-composition): Compose a finalized model collector with Vercel Workflows, and why harness outcomes are not drop-in.
  - [Routes](/docs/vercel-workflows/routes): Start, tail, resume, and cancel durable Workflow-backed agent runs.
  - [HITL resume](/docs/vercel-workflows/hitl-resume): Pause a Workflow run for approvals/questions and resume with validated responses.
  - [Test Workflows](/docs/vercel-workflows/testing): Test pure Workflow contracts and directive behavior for durable agent runs.
  - [Cloudflare runtime](/docs/vercel-workflows/cloudflare): Run Vercel Workflow code on Cloudflare Workers with one Durable Object per run.
- Harness
  - [Harness package](/docs/harness): Own agent run lifecycle with a host drain, claims, inbox admission, and optional recovery.
- [Troubleshooting](/docs/troubleshooting): Common setup, runtime, streaming, provider, MCP, sandbox, and workflow failures.
- [Migration and versioning](/docs/migration): Canary stability, lockstep package versions, upgrade checks, and migration workflow.
- API reference
  - [Agent APIs](/docs/api-reference/agent): Public agent subpaths and commonly used exports.
  - [Harness APIs](/docs/api-reference/harness): Public harness subpaths and commonly used exports.
  - [Conformance APIs](/docs/api-reference/conformance): Experimental wire-fixture record, replay, fault-injection, conformance case, and runner subpaths.
  - [Emulator APIs](/docs/api-reference/emulators): Experimental service emulators, HttpClient routing to them, and a loopback server.
  - [Integration APIs](/docs/api-reference/integrations): Public MCP, knowledge, connector, sandbox, code mode, and file extraction APIs.
  - [Workflow APIs](/docs/api-reference/workflows): Public Vercel Workflow orchestration exports.
- Reference
  - [Packages](/docs/reference/packages): Package roles and explicit public subpaths.
  - [Protocol glossary](/docs/reference/protocol): Core transcript and event terms used across Yolk packages.
  - [Architecture](/docs/reference/architecture): Package boundaries and dependency direction.
  - [Host responsibilities](/docs/reference/host-responsibilities): What your app must provide around Yolk SDK contracts.