interface DeepAgentConfigOptional backend for filesystem operations. Can be either a backend instance or a factory function that creates one. The factory receives a config object with state and store.
Optional checkpointer for persisting agent state between runs
Commands capability
Optional schema for context (not persisted between invocations)
Optional list of memory file paths (AGENTS.md files) to load (e.g., ["~/.deepagents/AGENTS.md", "./.deepagents/AGENTS.md"]). Display names are automatically derived from paths. Memory is loaded at agent startup and added into the system prompt.
Custom middleware to apply after standard middleware
The model to use (model name string or LanguageModelLike instance). Defaults to claude-sonnet-4-5-20250929
Environment variable name (e.g. "OPENAI_API_KEY")
Structured output response format for the agent (Zod schema or other format)
Optional list of skill source paths (e.g., ["/skills/user/", "/skills/project/"]).
Paths use POSIX conventions (forward slashes) and are relative to the backend's root. Later sources override earlier ones for skills with the same name (last one wins).
// With FilesystemBackend - skills loaded from disk
const agent = await createDeepAgent({
backend: new FilesystemBackend({ rootDir: "/home/user/.deepagents" }),
skills: ["/skills/"],
});
// With StateBackend - skills provided in state
const agent = await createDeepAgent({
skills: ["/skills/"],
});
const result = await agent.invoke({
messages: [...],
files: {
"/skills/my-skill/SKILL.md": {
content: ["---", "name: my-skill", "description: ...", "---", "# My Skill"],
created_at: new Date().toISOString(),
modified_at: new Date().toISOString(),
},
},
});Optional store for persisting longterm memories
List of subagent specifications for task delegation
Custom system prompt for the agent. This will be combined with the base agent prompt
Tools the agent should have access to
Configuration for a DeepAgent exposed via ACP
Extends CreateDeepAgentParams from deepagents with ACP-specific fields.
The name field is required for ACP session routing.