createDeepAgent call site. Use HarnessProfileOptions to build profiles; use parseHarnessProfileConfig when loading or saving YAML/JSON files. Deep Agents ships built-in harness profiles for OpenAI and Anthropic (Claude) models.
Provider profiles (for controlling model-construction kwargs) and the plugin registration system are Python-only features. The TypeScript SDK supports harness profiles only.
Harness profiles
A harness profile describes prompt-assembly, tool-visibility, middleware, and default-subagent adjustments thatcreateDeepAgent applies after the chat model has been constructed:
Replace the base Deep Agents system prompt (
CUSTOM in Prompt assembly).Append text to the assembled base prompt (
SUFFIX in Prompt assembly); applied to the main agent, declarative subagents, and the auto-added general-purpose subagent.Override individual tool descriptions, keyed by tool name.
Remove specific harness-level tools from the tool set. Matched by tool name, applied as a post-injection filter so it catches both user-provided and middleware-provided tools.
Strip specific middleware from the assembled stack. Matched against each middleware’s
.name property. Cannot include required scaffolding names (FilesystemMiddleware, SubAgentMiddleware).Additional middleware appended to the stack after user middleware. Can be a static array or a zero-arg factory that returns fresh instances per agent construction.
Disable, rename, or re-prompt the general-purpose subagent (
enabled, description, systemPrompt).Caller-supplied
systemPrompt always sits at the front of the assembled prompt, and systemPromptSuffix always sits at the end—regardless of which model is selected. The same overlay rules apply to subagents: each subagent re-runs profile resolution against its own model. See Prompt assembly for the full per-case breakdown (main agent, subagents, and the general-purpose subagent).Lookup order for preconfigured model instances
Lookup order for preconfigured model instances
When you pass a preconfigured chat model instance instead of a
provider:model string, the harness synthesizes the canonical provider:identifier key from the instance and looks it up in this order:- Exact
provider:identifiermatch - Identifier-only (only when the identifier already contains
:) - Provider-only fallback
Registration keys
Both profile types use the same key format:- Provider-level — a bare provider name like
"openai"applies to every model from that provider. - Model-level — a fully qualified
provider:modelkey like"openai:gpt-5.5"applies only to that specific model.
There is no wildcard key that matches every provider. To apply the same overrides everywhere—say, dropping
TodoListMiddleware regardless of which model is selected—register the profile under each provider key you use. Profiles are intended for adjustments that depend on the model being selected. Global adjustments that should apply regardless of model should be made on the createDeepAgent call site.Merge semantics
| Field | Merge behavior |
|---|---|
baseSystemPrompt, systemPromptSuffix | New value wins when set; otherwise inherits |
toolDescriptionOverrides | Mappings merge per key; new value wins on a shared key |
excludedTools, excludedMiddleware | Set union |
extraMiddleware | Merged by name: new instance replaces existing at its position, novel entries append |
generalPurposeSubagent | Merged field-wise (unset fields inherit) |
Provider profiles
Provider profiles (for controlling model-construction kwargs liketemperature) are a Python-only feature and are not available in the TypeScript SDK.
Load profiles from config files
For YAML/JSON-backed workflows, useparseHarnessProfileConfig. It validates and builds a HarnessProfile from a plain object with camelCase keys. Runtime-only state — extraMiddleware instances — cannot be represented in JSON/YAML and must be set programmatically.
serializeProfile:
extraMiddleware cannot be serialized — serializeProfile throws if middleware instances are present.
Ship a profile as a plugin
The plugin registration system (via package entry points) is a Python-only feature. In TypeScript, callregisterHarnessProfile directly at application startup or in your package’s initialization code.
Related
- Harness — overview of harness capabilities
- Models — configure model providers and parameters
-
Customization — full
createDeepAgentconfiguration surface
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

