agents: always use API backend, remove tools field from .agent files

- Remove is_split special case in daemon — split now goes through
  job_consolidation_agent like all other agents
- call_for_def uses API whenever api_base_url is configured, regardless
  of tools field (was requiring non-empty tools to use API)
- Remove "tools" field from all .agent files — memory tools are always
  provided by the API layer, not configured per-agent
- Add prompt size guard: reject prompts over 800KB (~200K tokens) with
  clear error instead of hitting the model's context limit

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kent Overstreet 2026-03-20 14:26:39 -04:00
parent 9d476841b8
commit 6069efb7fc
9 changed files with 17 additions and 31 deletions

View file

@ -1189,7 +1189,6 @@ pub fn run_daemon() -> Result<(), String> {
let mut remaining = count;
let is_rename = *agent_type == "rename";
let is_split = *agent_type == "split";
// Targeted run: one task for a specific node
if let Some(ref key) = target_key {
@ -1212,29 +1211,6 @@ pub fn run_daemon() -> Result<(), String> {
remaining = 0;
}
if is_split {
let store = crate::store::Store::load().ok();
let candidates = store.as_ref()
.map(|s| super::prompts::split_candidates(s))
.unwrap_or_default();
let to_split: Vec<String> = candidates.into_iter()
.take(count)
.collect();
for key in &to_split {
let key = key.clone();
let task_name = format!("c-split-{}:{}", key, today);
choir_rpc.spawn(task_name)
.resource(&llm_rpc)
.retries(1)
.init(move |ctx| {
job_split_one(ctx, key.clone())
})
.run();
spawned += 1;
}
remaining = 0;
}
while remaining > 0 {
let batch = remaining.min(batch_size);
let agent = agent_type.to_string();