pub struct AgentInfo {
pub description: String,
pub display_name: String,
pub id: String,
pub mcp_servers: Option<HashMap<String, Value>>,
pub model: Option<String>,
pub name: String,
pub path: Option<String>,
pub prompt: Option<String>,
pub skills: Option<Vec<String>>,
pub source: Option<AgentInfoSource>,
pub tools: Option<Vec<String>>,
pub user_invocable: Option<bool>,
}Expand description
Agent metadata, including identifiers, display details, source, tools, model, MCP servers, skills, and file path.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§description: StringDescription of the agent’s purpose
display_name: StringHuman-readable display name
id: StringStable identifier for selection. For most agents this is the same as name; for plugin/builtin agents it may differ. Always populated; defaults to name when no distinct id was assigned.
mcp_servers: Option<HashMap<String, Value>>MCP server configurations attached to this agent, keyed by server name. Server config shape mirrors the MCP mcpServers schema.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
model: Option<String>Authored preferred model id for this agent. Runtime model selection may choose a different model; omitted means no authored preference.
name: StringName of the agent. Use id as the stable selection identifier.
path: Option<String>Absolute local file path of the agent definition. Only set for file-based agents loaded from disk; remote agents do not have a path.
prompt: Option<String>Authored base prompt for the agent. Runtime prompt assembly may add dynamic context at invocation time. Omitted from session.agent.list unless includePrompt is true.
skills: Option<Vec<String>>Skill names preloaded into this agent’s context. Omitted means none.
source: Option<AgentInfoSource>Where the agent definition was loaded from
tools: Option<Vec<String>>Allowed tool names for this agent. Empty array means none; omitted means inherit defaults.
user_invocable: Option<bool>Whether the agent can be selected directly by the user. Agents marked false are subagent-only.