Deuz SDK 2.0 ya está aquí — stores, guardrails, handoffs y MCP cero-config. Novedades de 2.0
Deuz SDK
Reference

Agent Skills

The two Agent Skills this repository ships for coding agents, what is in them, and the gates that keep them from inventing an API.

El contenido de las páginas de documentación está en inglés. La navegación, la búsqueda y la interfaz siguen el idioma elegido.

Coding agents write most of the code that uses an SDK now, and they write it from memory. For a library the model has never seen, that memory is a guess — a confident one, with plausible function names and the wrong call shape.

This repository ships two Agent Skills so an agent working on your project reads the real surface instead of reconstructing it.

npx skills add Deuz-AI/Deuz-SDK

Both install for Claude Code and any other agent that reads the format. They live in the repository under skills/.

deuz-sdk — building on the SDK

A build guide over the whole surface, not an API dump. SKILL.md is the part that is always in context: the mental model and its invariants, a reflex table mapping what an agent might reach for to what this SDK already has, a task-to-file router, and five recipes. Everything else is loaded only when the task needs it.

Reference fileCovers
core-callsThe six call functions, the StreamPart union, the Message/Part model, errors, timeouts, the Dependencies seam
providersEvery factory subpath, the compat hosts, the capability registry, key precedence
streaming-uiThe Deuz UI wire, validateChatRequest, the chat engine, useChat / useObject, correct part rendering
tools-agentsTools, the loop contract, approvals, createAgent, sub-agents, handoffs, guardrails
memory-compactionCross-session memory, the recall pipeline, compaction layers, overflow recovery
rag-and-skillsParsing, chunking, hybrid retrieval, citations, and the SDK's own skills module
persistence-durableThe four store seams, the SQLite/Redis/Postgres packs, checkpoints and resume
mcpZero-config servers, OAuth, stdio, sampling, roots
autonomy-workspacePlan/verify, ensembles, workspace memory, CodeAct, browser control, background runs
mediaImage, speech, transcription, video
opsObservation events, the OTel bridge, pricing and budgets, middleware, resilience
testing-and-edgeMock models, evals, the edge-safety rules and the Node-only subpath list
migrationPorting from the Vercel AI SDK, LangChain, LangGraph or LlamaIndex
api-indexGenerated from source: every subpath, every export, marked value or type

api-index is regenerated from package.json's exports crossed with the source export graph, so it is never hand-maintained and never drifts.

migrate-from-ai-sdk — porting an existing app

The verified name-by-name mapping from ai and @ai-sdk/*, with the porting order that keeps the app compiling at each step, and an honest list of what has no equivalent. See also Coming from the Vercel AI SDK.

Why you can trust what they say

Documentation drifts. These are gated the way code is:

  • Every symbol is resolved against the real export table. verify:docs-refs — part of npm run check, so it runs on every commit and every pull request — builds the export graph from tsup's entry map crossed with package.json's exports, following export * through the source, and fails on any @deuz-sdk import or subpath in the skills that does not resolve. A hallucinated name cannot be merged.
  • Every code example compiles. The fenced TypeScript blocks are extracted into a scratch project and typechecked against the built package under strict, which catches what a name check cannot: a wrong option key, a wrong result property, a wrong generic.
  • Staleness fails loudly. The skill carries the package version and a hash of the locked API contract. When a release moves either one, the check fails and says so, rather than letting the guidance quietly go out of date.
  • Every internal link is checked. The /docs/... links in the reference files are validated against real routes on the same gate.

They were also written test-first. Nine build tasks — streaming, a chat route, a tool loop, structured extraction, an approval UI, provider fallback, RAG, a durable agent, MCP — were given to agents with no access to the skill or the repository. Across nine answers there were 19 imports of things that do not exist: an invented client class, invented type names, defineTool, a hand-rolled SSE stream in place of the wire helper, and an await on the call that is documented never to need one. The skills target those failures specifically, and the same nine tasks are the acceptance test.

Keeping them current

The skills are maintained inside this repository, verified by the scripts under .claude/skills/deuz-sdk/scripts/:

npm run build -w @deuz-sdk/core
node .claude/skills/deuz-sdk/scripts/generate-api-index.mjs   # rebuild the index from source
node .claude/skills/deuz-sdk/scripts/verify-skill.mjs         # resolve every name, check freshness

The same content lives twice — once where Claude Code loads it for work inside this repository, once under skills/ where npx skills add distributes it — and the verifier fails if the two ever diverge.

En esta página