Skip to main content
ai-sdk-deepagent// v0.9.2
DocsBlog
> cat README.md

Deep Agent SDK

Build agents that can plan, delegate to subagents, and leverage file systems for complex, multi-step tasks using Vercel AI SDK v6

Core Features

01

Planning & Task Decomposition

Built-in write_todos tool enables agents to break down complex tasks into discrete steps, track progress, and adapt plans as new information emerges during execution.

write_todos()
02

Context Management

File system tools (ls, read_file, write_file, edit_file, glob, grep) allow agents to offload large context to memory, preventing context window overflow and enabling work with variable-length tool results.

read_file() | write_file()
03

Subagent Spawning

Built-in task tool enables agents to spawn specialized subagents for context isolation. This keeps the main agent's context clean while still going deep on specific subtasks.

task(agent: "researcher")
04

Session Persistence

Checkpointers enable persistent memory across conversations. Agents can save and restore state (todos, files, messages) and resume long-running tasks later.

checkpointer: new FileSaver()

Quick Start

import { createDeepAgent } from 'ai-sdk-deep-agent';
import { anthropic } from '@ai-sdk/anthropic';

const agent = createDeepAgent({
  model: anthropic('claude-sonnet-4-20250514'),
  systemPrompt: "Break down complex tasks into todos, write research findings to files, and delegate specialized work to subagents.",
});

const result = await agent.generate({
  prompt: 'Research and compare AI agent frameworks',
  maxSteps: 20,
});

console.log(result.text);
console.log(result.state.todos);
console.log(Object.keys(result.state.files));

Capabilities

Core Tools
12
Storage Backends
4
Filesystem Ops
7 tools
Checkpointers
3 types

Technical Specifications

FrameworkVercel AI SDK v6
RuntimeBun
LanguageTypeScript 5.9+
Model ProvidersAnthropic, OpenAI, Azure, etc.
Built-in Toolswrite_todos, task, ls, read_file, write_file, edit_file, glob, grep
Storage BackendsIn-memory, Filesystem, Persistent, Composite