feat(sdk): improve system prompt configurability - #4437
Merged
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Mason Daugherty (mdrxy)
self-requested a review
July 2, 2026 18:05
Hunter Lovell (hntrl)
added a commit
to langchain-ai/deepagentsjs
that referenced
this pull request
Jul 13, 2026
## Summary Ports the system prompt configuration in langchain-ai/deepagents#4437
Mason Daugherty (mdrxy)
added a commit
that referenced
this pull request
Jul 14, 2026
… prompt (#4516) Depends on alpha release of new SDK changes dcode's system prompt appears as though it was intended to replace the base system prompt instead of augmenting it (some of the sections are almost identical). #4437 introduced a mechanism to overwrite the base prompt. Here we apply it in dcode. Review system prompt snapshot for effective changes. --------- Co-authored-by: Mason Daugherty <mason@langchain.dev> Co-authored-by: Mason Daugherty <github@mdrxy.com>
Hunter Lovell (hntrl)
added a commit
to langchain-ai/deepagentsjs
that referenced
this pull request
Jul 24, 2026
## Summary Ports the system prompt configuration in langchain-ai/deepagents#4437
Marcelo5444
pushed a commit
to Marcelo5444/deepagents
that referenced
this pull request
Jul 30, 2026
Marcelo5444
pushed a commit
to Marcelo5444/deepagents
that referenced
this pull request
Jul 30, 2026
… prompt (langchain-ai#4516) Depends on alpha release of new SDK changes dcode's system prompt appears as though it was intended to replace the base system prompt instead of augmenting it (some of the sections are almost identical). langchain-ai#4437 introduced a mechanism to overwrite the base prompt. Here we apply it in dcode. Review system prompt snapshot for effective changes. --------- Co-authored-by: Mason Daugherty <mason@langchain.dev> Co-authored-by: Mason Daugherty <github@mdrxy.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We introduce a minimal structured representation of the base system prompt and widen the type for
system_promptincreate_deep_agentto allow users to specify it:Usage patterns:
The primary motivation here is to let users modify the base prompt
BASE_AGENT_PROMPT = """You are a deep agent..., which is currently fixed:We also expose a rendering functionrender_system_promptwhich takes aSystemPromptConfigand builds the prompt. We use this indeepagents-codeto clean up regex parsing that was used to modify the### Model Identitysection of the prompt during model switches. We can now build it into"suffix"(or"prefix"if desired) and assemble the prompt. This ends up moving the location of the### Model Identitysection.^ deferring this