Skip to main content

run_direct

Function run_direct 

Source
pub async fn run_direct(
    agent: &str,
    model: Option<&str>,
    system_prompt: &str,
    message: &str,
    timeout: Duration,
    work_dir: &str,
) -> Result<DirectResult>
Expand description

Run an agent one-shot without tmux.

Writes temp files to work_dir, builds the CLI command via get_runner(agent).build_command(), executes with timeout, then parses with parse_response().

work_dir should be an isolated directory (e.g., ~/.orch/state/control/{pid}/).