pub struct Agent {Show 28 fields
pub id: String,
pub name: String,
pub harness: Harness,
pub state: AgentState,
pub activity: Activity,
pub pid: Option<u32>,
pub session_id: Option<String>,
pub session_path: Option<PathBuf>,
pub cwd: Option<PathBuf>,
pub model: Option<String>,
pub harness_version: Option<String>,
pub usage: TokenUsage,
pub cost_usd: f64,
pub unpriced_tokens: u64,
pub turns: u64,
pub subagent_turns: u64,
pub tool_calls: u64,
pub spans: Vec<ToolSpan>,
pub age_secs: u64,
pub idle_secs: Option<u64>,
pub cpu_percent: f32,
pub rss_bytes: u64,
pub process_count: usize,
pub mcp_count: usize,
pub tree: Option<ProcNode>,
pub attribution: Attribution,
pub shares_process: bool,
pub parse_warning: Option<String>,
}Expand description
A single row in the agent table.
Fields§
§id: StringStable identity across refreshes: pid:<n> for live agents, session:<id> for stopped ones.
name: String§harness: Harness§state: AgentState§activity: Activity§pid: Option<u32>§session_id: Option<String>§session_path: Option<PathBuf>§cwd: Option<PathBuf>§model: Option<String>§harness_version: Option<String>§usage: TokenUsage§cost_usd: f64USD spent on messages whose model had a known price.
unpriced_tokens: u64Tokens on messages whose model had no known price (so cost_usd is a floor).
turns: u64§subagent_turns: u64§tool_calls: u64§spans: Vec<ToolSpan>The most recent tool calls as spans, oldest first. Bounded; see
harness::MAX_SPANS.
age_secs: u64Seconds since the process started (live) or since the last transcript write (stopped).
idle_secs: Option<u64>Seconds since the transcript was last written.
cpu_percent: f32§rss_bytes: u64§process_count: usize§mcp_count: usize§tree: Option<ProcNode>§attribution: AttributionHow the session was attributed to the process, for debugging attribution.
True when another row shares this pid and carries its CPU, memory and process counts. One Codex app-server hosts many conversations, so its threads each get a row while the process is only counted once.
parse_warning: Option<String>Set when the transcript parsed but its usage records did not, which means this row’s tokens and cost are not to be believed. Almost always a harness that changed its format under us.