diff --git a/pipeline/preprocessors/link_map.py b/pipeline/preprocessors/link_map.py index 8c80b39f8b..311211e50c 100644 --- a/pipeline/preprocessors/link_map.py +++ b/pipeline/preprocessors/link_map.py @@ -35,7 +35,6 @@ class LinkMap(TypedDict): # Deep Agents "create_deep_agent": "deepagents/graph/create_deep_agent", "DeepAgentState": "deepagents/graph/DeepAgentState", - "SystemPromptConfig": "deepagents/graph/SystemPromptConfig", "SubAgent": "deepagents/middleware/subagents/SubAgent", "CompiledSubAgent": "deepagents/middleware/subagents/CompiledSubAgent", "SubAgentMiddleware": "deepagents/middleware/subagents/SubAgentMiddleware", diff --git a/src/oss/deepagents/customization.mdx b/src/oss/deepagents/customization.mdx index d4fe9e60e4..beeabf9ea1 100644 --- a/src/oss/deepagents/customization.mdx +++ b/src/oss/deepagents/customization.mdx @@ -177,7 +177,7 @@ For detailed configuration options including stdio servers, OAuth authentication ## System prompt -Deep Agents ship with a built-in base system prompt that teaches the agent how to use the harness scaffolding (planning, filesystem tools, subagents). Pass `system_prompt=` to prepend your own instructions before that base prompt: +Pass `system_prompt=` to give the agent your own instructions: :::python @@ -188,37 +188,9 @@ Deep Agents ship with a built-in base system prompt that teaches the agent how t ::: -Besides a string, the main agent also accepts a @[`SystemMessage`] with structured [content blocks](/oss/langchain/messages#standard-content-blocks); Deep Agents preserve those blocks and append the built-in base prompt ([subagent](/oss/deepagents/subagents) dictionary specs remain strings). +Besides a string, the main agent also accepts a @[`SystemMessage`] with structured [content blocks](/oss/langchain/messages#standard-content-blocks); Deep Agents preserve those blocks ([subagent](/oss/deepagents/subagents) dictionary specs remain strings). -When middleware adds special tools, like the filesystem tools, it appends its own guidance to the system prompt at runtime. - -:::python - -`SystemPromptConfig` requires `deepagents>=0.7.0a6`. - - -For full control over prompt assembly, pass a @[`SystemPromptConfig`] dict with `prefix`, `base`, and `suffix` keys: - -- **`prefix`**: text placed before the base prompt (same as passing a bare string). -- **`base`**: replaces the built-in base prompt. Omit the key to keep the built-in base, or set it to `None` to drop the base entirely. -- **`suffix`**: text placed after the base prompt. - -Parts are assembled in order: `prefix` -> `base` -> `suffix` -> any model-specific [profile](/oss/deepagents/profiles) suffix. Each part accepts a `str` or a `SystemMessage` (to preserve `cache_control` markers for Anthropic prompt caching). - -```python -# Overwrite the default base prompt: -create_deep_agent(..., system_prompt={"base": "..."}) - -# No system prompt except from middleware: -create_deep_agent(..., system_prompt={"base": None}) - -# Sandwich the default base prompt: -create_deep_agent(..., system_prompt={"prefix": "...", "suffix": "..."}) -``` - -For model-specific system prompt customization, such as replacing the base prompt or appending a suffix for a particular provider, use a [harness profile](/oss/deepagents/profiles#harness-profiles). -::: diff --git a/src/snippets/create-deep-agent-config-options-js.mdx b/src/snippets/create-deep-agent-config-options-js.mdx index 64e4f7e528..0e70e583e3 100644 --- a/src/snippets/create-deep-agent-config-options-js.mdx +++ b/src/snippets/create-deep-agent-config-options-js.mdx @@ -15,7 +15,7 @@ const agent = createDeepAgent({ store?: BaseStore, streamTransformers?: TStreamTransformers, subagents?: TSubagents, - systemPrompt?: string | SystemMessage> | SystemPromptConfig, + systemPrompt?: string | SystemMessage>, tools?: TTools | StructuredTool[] }); ```