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.
| Item | What it does |
|---|---|
Unplaced enum | Why no computer can run the agent now. |
place fn | Choose the computer and project. |
HOST_DEFAULTS const | Runtimes 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.