agent run: add --target flag to run agents on specific nodes

Adds run_one_agent_with_keys() which bypasses the agent's query and
uses explicitly provided node keys. This allows testing agents on
specific graph neighborhoods:

  poc-memory agent run linker --target bcachefs --debug
This commit is contained in:
ProofOfConcept 2026-03-17 00:24:24 -04:00
parent 1aad6d90af
commit 8b959fb68d
3 changed files with 50 additions and 5 deletions

View file

@ -565,6 +565,9 @@ enum AgentCmd {
/// Batch size (number of seed nodes/fragments)
#[arg(long, default_value_t = 5)]
count: usize,
/// Target specific node keys (overrides agent's query)
#[arg(long)]
target: Vec<String>,
/// Dry run — set POC_MEMORY_DRY_RUN=1 so mutations are no-ops
#[arg(long)]
dry_run: bool,
@ -814,8 +817,8 @@ fn main() {
AgentCmd::FactMine { path, batch, dry_run, output, min_messages }
=> cli::agent::cmd_fact_mine(&path, batch, dry_run, output.as_deref(), min_messages),
AgentCmd::FactMineStore { path } => cli::agent::cmd_fact_mine_store(&path),
AgentCmd::Run { agent, count, dry_run, debug }
=> cli::agent::cmd_run_agent(&agent, count, dry_run, debug),
AgentCmd::Run { agent, count, target, dry_run, debug }
=> cli::agent::cmd_run_agent(&agent, count, &target, dry_run, debug),
AgentCmd::ReplayQueue { count } => cli::agent::cmd_replay_queue(count),
AgentCmd::Evaluate { matchups, model, dry_run }
=> cli::agent::cmd_evaluate_agents(matchups, &model, dry_run),