跳到正文

获取 Agent

GET/v1/agents/{agent_id}

读取一个 Agent,包括已归档的 Agents。

路径参数

stringagent_id必填

Agent ID(agt_ 前缀)。

Agent 对象

由 create、get、update、archive、unarchive、restore 和 clone 返回。

stringid必填

带 agt_ 前缀的 Agent ID。

stringobject必填

始终为 agent。

integerversion必填

当前版本。每次有效写入都会创建一个新版本。

integerrow_version必填

用于 PATCH、archive、unarchive 和 restore 的比较并设置(compare-and-set)令牌。

stringstatus必填

active 或 archived。

stringprojection_status必填

当前版本的执行就绪状态。会话需要 ready;新建的 Agent 可能会短暂显示 pending。

stringruntime_profile必填

codex、claude 或 mcode。

stringvisibility必填

你的 Agents 为 private;目录条目为 public。

integer · nullcreated_at · updated_at · archived_at必填

Unix 秒级时间戳。处于 active 状态时 archived_at 为 null。