Reve AI
MCP개발무료

Deuz-SDK

Zero-dependency TypeScript framework for production AI agents: durable execution, long-term memory, hybrid RAG, MCP tool calling, human-in-the-loop approval, planning and CodeAct sandboxes. One streaming API for Claude, GPT, Gemini, Grok, Mistral and DeepSeek — Node, Bun, Deno, serverless and edge.

1.3k

Deuz SDK

A TypeScript runtime for agents that have to survive production

Docs · What's new in 2.0 · Coming from the Vercel AI SDK · Changelog

Calling a model is a solved problem. What is not solved is everything around it: remembering a user across sessions, staying inside a context window on turn forty, asking a human before the irreversible thing, resuming after the process dies mid-run, and connecting a tool server without hand-rolling OAuth.

Most SDKs leave those to you. @deuz-sdk/core ships them — one package, zero runtime dependencies, and nothing ambient: clock, randomness, fetch, keys and logging are all injected, so the same code runs on Node, Bun, Deno and the edge, and tests stay deterministic.

We are not claiming to build ASI. This is meant to be honest infrastructure on that road — a vehicle, not the destination.

import { streamChat } from '@deuz-sdk/core';
import { createAnthropic } from '@deuz-sdk/core/anthropic';

const anthropic = createAnthropic({ apiKey: process.env.ANTHROPIC_API_KEY });

// Returns synchronously and never throws. Failures arrive as typed stream parts.
const res = streamChat({
  model: anthropic('claude-opus-4-8'),
  instructions: 'You are terse.',
  prompt: 'Hello!',
});

for await (const chunk of res.textStream) process.stdout.write(chunk);
const usage = await res.usage;

The two things nobody else ships

Every SDK gives you generateText. These are the ones you would otherwise build yourself, badly, twice.

Memory that outlives the session. Not a message array — a pipeline that extracts durable facts from a conversation, reconciles them against what it already knows (add / update / delete, never blind appends), scores them for importance, expires them, and pulls the relevant ones back on the next call. It runs on a vector store, a Postgres table, or an Obsidian vault.

await generateText({
  model, messages,
  memory: {
    seams: { store, embedder, llm: model },
    scope: { userId },
    recall: { topK: 6, maxChars: 2000, expandLinks: 1 },
    writePolicy: 'each-turn',
  },
});

Compaction that keeps a long run alive. When the window fills, it prunes stale tool output, drops old reasoning, and folds the earliest turns into a single running summary — one block that gets updated, not a stack that grows. And when a provider rejects a request as too long anyway, the loop force-compacts and retries that step instead of failing the run.

await generateText({ model, messages, maxSteps: 30, compaction: 'auto' });

What else is in the box


GitHub에서 전체 내용 보기