You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [0.3.16] - 2026-04-22
9
+
10
+
### Changed
11
+
12
+
-**`instructions` now replaces `BASE_PROMPT` instead of appending to it** — previously, passing `instructions="..."` to `create_deep_agent()` produced a system prompt of `BASE_PROMPT + "\n\n" + instructions`. Now `instructions` is used verbatim as the full system prompt. `instructions=None` (the default) keeps the existing behaviour — `BASE_PROMPT` is used automatically. Users who want to extend the default rather than replace it can do so with an f-string: `instructions=f"{BASE_PROMPT}\n\nYour extra text"`. `BASE_PROMPT` is exported from the top-level package. ([#84](https://github.com/vstorm-co/pydantic-deepagents/issues/84), reported by [@rremilian](https://github.com/rremilian))
13
+
-**Subagent and team-member factories always prepend `BASE_PROMPT`** — agents spawned automatically by the `task()` tool or `spawn_team()` continue to receive `BASE_PROMPT` followed by their task-specific `instructions`, so subagent behaviour is unchanged.
14
+
-**`apps/deepresearch` double-prompt bug fixed** — `MAIN_INSTRUCTIONS` already contained `BASE_PROMPT`; it was previously duplicated in the final system prompt because the old append logic prepended it again. The new semantics resolve this without any change to the deepresearch app itself.
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@
36
36
37
37
## What's New
38
38
39
+
-**2026-04-22** **v0.3.16** — `instructions=` now replaces `BASE_PROMPT` directly. Use `f"{BASE_PROMPT}\n\n..."` to extend it. Subagents still get `BASE_PROMPT` automatically.
39
40
-**2026-04-12** **v0.3.8** — Stuck loop detection, context limit warnings for the model, expanded context file discovery (CLAUDE.md, .cursorrules, etc.), eviction & orphan repair migrated to capabilities hooks.
The `instructions` parameter sets the agent's system prompt. When provided, it **replaces** the built-in [`BASE_PROMPT`][pydantic_deep.prompts.BASE_PROMPT] entirely:
37
+
36
38
```python
37
39
agent = create_deep_agent(
38
40
instructions="""
@@ -46,6 +48,24 @@ agent = create_deep_agent(
46
48
)
47
49
```
48
50
51
+
To build on top of the default behavior instead of replacing it, import `BASE_PROMPT` and compose with an f-string:
52
+
53
+
```python
54
+
from pydantic_deep importBASE_PROMPT, create_deep_agent
55
+
56
+
agent = create_deep_agent(
57
+
instructions=f"""{BASE_PROMPT}
58
+
59
+
## Extra Guidelines
60
+
61
+
You are a Python expert. Always use type hints and docstrings.
62
+
"""
63
+
)
64
+
```
65
+
66
+
!!! note "Subagent instructions work differently"
67
+
The `instructions` field in [`SubAgentConfig`][pydantic_deep.types.SubAgentConfig] is always **appended** to `BASE_PROMPT` automatically — you only write the specialized part. This keeps subagent configs concise.
68
+
49
69
### Enabling/Disabling Features
50
70
51
71
```python
@@ -321,15 +341,15 @@ Pydantic Deep Agents uses a dynamic system prompt mechanism that automatically c
321
341
```python
322
342
# The agent automatically includes relevant prompts based on enabled features
323
343
agent = create_deep_agent(
324
-
instructions="You are a Python expert.", #Your base instructions
344
+
instructions="You are a Python expert.", #Replaces BASE_PROMPT
325
345
include_todo=True, # Adds todo prompt
326
346
include_filesystem=True, # Adds console prompt
327
347
include_subagents=True, # Adds subagent prompt
328
348
include_skills=True, # Adds skills prompt
329
349
)
330
350
331
351
# At runtime, the agent sees:
332
-
# 1. Your instructions: "You are a Python expert."
352
+
# 1. Static instructions: "You are a Python expert." (or BASE_PROMPT if instructions=None)
0 commit comments