Deep agents are highly configurable. This page covers the main configuration options for customizing agent behavior.
Learn more: For comprehensive customization guides, see the Customization documentation.
By default, deep agents use claude-sonnet-4-5-20250929. You can use any LangChain-compatible chat model.
import { ChatAnthropic } from "@langchain/anthropic";
import { ChatOpenAI } from "@langchain/openai";
import { createDeepAgent } from "deepagents";
// Using Anthropic
const agent = createDeepAgent({
model: new ChatAnthropic({
model: "claude-sonnet-4-20250514",
temperature: 0,
}),
});
// Using OpenAI
const agent2 = createDeepAgent({
model: new ChatOpenAI({
model: "gpt-5",
temperature: 0,
}),
});
Deep agents include a comprehensive built-in system prompt. Add use-case specific instructions to guide agent behavior.
import { createDeepAgent } from "deepagents";
const researchInstructions = `You are an expert researcher.
Your job is to conduct thorough research, and then write a polished report.`;
const agent = createDeepAgent({
systemPrompt: researchInstructions,
});
Configure which tools require human approval before execution.
Learn more: See Human-in-the-Loop for detailed patterns.
import { createDeepAgent } from "deepagents";
const agent = createDeepAgent({
tools: [getWeather],
interruptOn: {
get_weather: {
allowedDecisions: ["approve", "edit", "reject"],
},
},
});