The createDeepAgent function is the main entry point for creating deep agents. It returns a DeepAgent instance with built-in planning, file system access, and subagent capabilities.
Learn more: For tutorials and guides on building deep agents, see the Deep Agents documentation.
import { createDeepAgent } from "deepagents";
// Create an agent with default settings
const agent = createDeepAgent();
// Run the agent
const result = await agent.invoke({
messages: [{ role: "user", content: "Research quantum computing" }],
});
import { createDeepAgent } from "deepagents";
const agent = createDeepAgent({
model: new ChatAnthropic({ model: "claude-sonnet-4-20250514" }),
tools: [mySearchTool],
subagents: [researchSubagent],
systemPrompt: "You are an expert researcher.",
});