-
Notifications
You must be signed in to change notification settings - Fork 617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add mode for fully customizable system prompt template #1249
feat: Add mode for fully customizable system prompt template #1249
Conversation
@@ -39,6 +39,8 @@ pub async fn build_session( | |||
} | |||
.expect("Failed to create agent"); | |||
|
|||
let system_mode: Option<String> = config.get("GOOSE_SYSTEM_MODE").ok(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of checking the mode, can we check whether we have system file provided? If yes, we use it as the system prompt input file, if no, leave it empty. Right now other users must have the same file name system.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea that makes sense! Will push that change. Thanks for taking a look!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the updates! To simply the code, is it better to have followings?
let system_prompt_file: Option<String> = config.get("GOOSE_SYSTEM_PROMPT_FILE_PATH").ok();
if system_prompt_file is empty, we use the default file, so you don't need to override
How do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that works! I thought letting it autodetect the default path was less intrusive and left the goose config file alone for now. Happy to add this option. Should I add it to the configure tool in this PR as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yingjiehe-xyz I've pushed up changes to enable the GOOSE_SYSTEM_PROMPT_FILE_PATH
option in the config file. It helped reduce the total number of line changes. Thanks for the suggestion!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
Please implement this.We need easy and full control of the system prompt. I wasn't sure why it was so important until this morning. I was just porting the agent communications protocol and instructions for GooseTeam so that I could finally see the agents use the new MCP server and execute their protocol instructions in order to collaborate. I had not yet put a message into the server, I just ran goose with the instructions, it assumed project coordinator role and since it had no marching orders, and it KNEW IT WAS MADE BY BLOCK it began planning how it could dream up some integrations between Square and CashApp! ![]() |
This reverts commit 448a11e.
f08a360
to
340ef78
Compare
Summary of changes
This PR introduces a custom system mode that enables full customization of the system prompt by defining a
system.md
template file in the~/.config/goose
directory.The custom system prompt supports all of the context about the user's enabled extensions and the system prompt extensions (introduced in #1167) as the main system prompt in the goose source code. You can copy goose's core
system.md
as a starter and customize it to your needs.Why enable full customizability?
When building personal assistants and rigorously testing reasoning and chain of thought strategies it is useful you have complete control on the entire system prompt. I do the locally by running goose from source and manually changed the source code
system.md
file. This change gives end users the same control over their system prompt.Trade-offs