Skip to content

openagents_sdk::agents::place

Where a saved agent runs when asked: an online computer of the account with the agent's runtime and a project on it (#11934). The CLI's openagents agents ask and the website chat's agents door choose the same way.

ItemWhat it does
Unplaced enumWhy no computer can run the agent now.
place fnChoose the computer and project.
HOST_DEFAULTS constRuntimes a host may pick for an agent that leaves the choice to it.

Unplaced

pub enum Unplaced {
    NoComputer,
    NoProject,
}

Why no computer can run the agent now.

place

pub fn place(
    hosts: &[Host],
    agent: &AgentDefinition,
    computer: Option<&str>,
    project: Option<&str>,
    prefer: Option<&str>,
) -> Result<(Host, String), Unplaced>

Choose the computer and project. computer and project narrow the choice to an exact name or ID (names compare without regard to case). Without project, the project named prefer comes first, then the computer seen most recently and its first project.

HOST_DEFAULTS

pub const HOST_DEFAULTS: [&str; 3] = ["claude-code", "codex", "opencode"];

Runtimes a host may pick for an agent that leaves the choice to it.