[feature] Custom system prompts — save, switch, and manage multiple prompt templates #923
Labels
No labels
area:chat
area:core
area:llm
area:routes
area:tools
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sleepy/odysseus#923
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature Request
Currently there is no way for users to customize the chat system prompt. The system prompt is assembled entirely in code (
src/agent/system_prompt.py+src/agent/prompt_sections.py) with no user-configurable sections.The existing preset system (
src/preset_manager.py) has asystem_promptfield per preset (code_analyze, brainstorm, reason, custom), but these are preset-specific overrides for specific modes — not a general way to customize the default chat behavior.What I Want
Editable system prompt — A settings field (or dedicated UI section) where I can write/edit the system prompt that gets injected into every chat session. This should support the full system prompt or a "custom instructions" appendix appended to the built-in prompt.
Save multiple templates — Ability to save named system prompt templates (e.g. "concise coder", "detailed explainer", "creative writer") and switch between them. Like presets but specifically for the system prompt/instructions.
Quick switch — Dropdown or keyboard shortcut to swap between saved prompts mid-conversation without losing the chat history.
Proposed Implementation
Storage
data/system_prompts.jsonfile:mode: "append"adds the instructions to the end of the built-in system promptmode: "replace"completely replaces the system prompt (advanced)Settings UI
Backend
system_prompt_template(active template name),system_prompt_instructions(inline override)src/agent/system_prompt.pyreads the active template and appends/replaces accordinglypreset_manager.pycustom preset could reference a saved template by nameAPI
GET /api/auth/system-prompts— list all templatesPOST /api/auth/system-prompts— save/update a templateDELETE /api/auth/system-prompts/{name}— delete a templatePATCH /api/auth/settingswithsystem_prompt_template: "name"— switch active templateRelated