Drop redundant system prompt — all info is in memory nodes

The system prompt duplicated what's already in core-personality and
other memory nodes. Moving everything to memory means it's all
trainable data rather than hardcoded strings.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-12 01:23:50 -04:00
parent b646221787
commit 125927e2f1
8 changed files with 10 additions and 67 deletions

View file

@ -186,7 +186,6 @@ pub struct AgentState {
impl Agent {
pub async fn new(
client: ApiClient,
system_prompt: String,
personality: Vec<(String, String)>,
app_config: crate::config::AppConfig,
prompt_file: String,
@ -196,7 +195,6 @@ impl Agent {
) -> Arc<Self> {
let mut context = ContextState::new();
context.conversation_log = conversation_log;
context.push_no_log(Section::System, AstNode::system_msg(&system_prompt));
let tool_defs: Vec<String> = agent_tools.iter().map(|t| t.to_json()).collect();
@ -571,7 +569,7 @@ impl Agent {
pub async fn compact(&self) {
match crate::config::reload_for_model(&self.app_config, &self.prompt_file) {
Ok((_system_prompt, personality)) => {
Ok(personality) => {
let mut ctx = self.context.lock().await;
// System section (prompt + tools) set by new(), don't touch it
ctx.clear(Section::Identity);