BASE slot in the prompt assembly order.
When applied to a stack, this replaces its authored base prompt. None
(the default) leaves that base unchanged; the main agent has no authored
base prompt by default.
For the main agent, a caller-supplied system_prompt= (USER) is placed
before this BASE, and system_prompt_suffix (SUFFIX) follows it. 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)),
)