CUSTOM slot in the prompt assembly order — completely replaces
BASE_AGENT_PROMPT as the base prompt when set.
None (the default) means use BASE_AGENT_PROMPT unchanged.
If both base_system_prompt and system_prompt_suffix are set, the
suffix is appended to this custom base. A caller-supplied
system_prompt= is still placed before this base — see
create_deep_agent's system_prompt parameter or
Prompt assembly
for the full assembly order.
Declarative harness-profile config for YAML/JSON-backed profiles.
deepagents.profiles exposes beta APIs that may receive minor changes in
future releases. Refer to the versioning documentation
for more details.
A HarnessProfileConfig contains the file-friendly subset of harness
settings: plain strings, bools, lists, and nested dicts that can be loaded
from YAML or JSON. For in-code/runtime-only adjustments such as
extra_middleware or class-form excluded_middleware, use
HarnessProfile instead.
excluded_middleware in config files currently only accepts plain
middleware-name strings matched against AgentMiddleware.name. A
future revision may add explicit class-path (module:Class) entries
for excluding middleware whose class isn't part of the public import
surface; until then, exclude such middleware via its .name (using
serialized_name for stable public aliases) or stay on the runtime
HarnessProfile and pass the class directly.
Config objects may be passed directly to register_harness_profile; the
helper converts them to runtime HarnessProfile objects automatically.
Example:
Construct a config object directly in Python:
from deepagents import HarnessProfileConfig, register_harness_profile
register_harness_profile(
"openai:gpt-5.4",
HarnessProfileConfig(
system_prompt_suffix="Think step by step.",
excluded_middleware={"SummarizationMiddleware"},
),
)
Or load the equivalent declarative form from YAML:
# openai-gpt-5.4.yaml
system_prompt_suffix: Think step by step.
excluded_middleware:
- SummarizationMiddleware
import yaml
from deepagents import HarnessProfileConfig, register_harness_profile
with open("openai-gpt-5.4.yaml") as f:
register_harness_profile(
"openai:gpt-5.4",
HarnessProfileConfig.from_dict(yaml.safe_load(f)),
)