agent: add count/chunk_size/chunk_overlap to agent header

Observation agent was getting 261KB prompts (5 × 50KB chunks) —
too much for focused mining. Now agents can set count, chunk_size,
and chunk_overlap in their JSON header. observation.agent set to
count:1 for smaller, more focused prompts.

Also moved task instructions after {{CONVERSATIONS}} so they're
at the end of the prompt where the model attends more strongly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kent Overstreet 2026-03-21 12:04:08 -04:00
parent 34937932ab
commit b1d83b55c0
3 changed files with 33 additions and 14 deletions

View file

@ -119,7 +119,8 @@ pub fn run_one_agent_excluded(
.ok_or_else(|| format!("no .agent file for {}", agent_name))?;
log("building prompt");
let agent_batch = super::defs::run_agent(store, &def, batch_size, exclude)?;
let effective_count = def.count.unwrap_or(batch_size);
let agent_batch = super::defs::run_agent(store, &def, effective_count, exclude)?;
run_one_agent_inner(store, agent_name, &def, agent_batch, llm_tag, log, debug)
}