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:
parent
34937932ab
commit
b1d83b55c0
3 changed files with 33 additions and 14 deletions
|
|
@ -33,6 +33,9 @@ pub struct AgentDef {
|
|||
pub model: String,
|
||||
pub schedule: String,
|
||||
pub tools: Vec<String>,
|
||||
pub count: Option<usize>,
|
||||
pub chunk_size: Option<usize>,
|
||||
pub chunk_overlap: Option<usize>,
|
||||
}
|
||||
|
||||
/// The JSON header portion (first line of the file).
|
||||
|
|
@ -47,6 +50,15 @@ struct AgentHeader {
|
|||
schedule: String,
|
||||
#[serde(default)]
|
||||
tools: Vec<String>,
|
||||
/// Number of seed nodes / conversation fragments (overrides --count)
|
||||
#[serde(default)]
|
||||
count: Option<usize>,
|
||||
/// Max size of conversation chunks in bytes (default 50000)
|
||||
#[serde(default)]
|
||||
chunk_size: Option<usize>,
|
||||
/// Overlap between chunks in bytes (default 10000)
|
||||
#[serde(default)]
|
||||
chunk_overlap: Option<usize>,
|
||||
}
|
||||
|
||||
fn default_model() -> String { "sonnet".into() }
|
||||
|
|
@ -64,6 +76,9 @@ fn parse_agent_file(content: &str) -> Option<AgentDef> {
|
|||
model: header.model,
|
||||
schedule: header.schedule,
|
||||
tools: header.tools,
|
||||
count: header.count,
|
||||
chunk_size: header.chunk_size,
|
||||
chunk_overlap: header.chunk_overlap,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue