技能与子智能体

库状态

表示为何图书馆为空的字段:这里没有源, 或源拒绝, 这是它的代码 。

{} means both were read"none" is normala code is a refusal
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

await agent.run({ inputs: "…" });

agent.libraryStatus;
// {}                               both read, whatever they returned
// { subagents: "none" }            no source for subagents on this machine
// { skills: "storage_not_local" }  a source was there and refused
agent.run(inputs="…")

# The Python engine has no library_status: it reads the libraries at creation,
# and an unreadable source simply leaves the list empty.
agent.skills, agent.subagents

两种价值

值含义通常通常
"none"这里没有这种来源。手机或云工作空间,没有磁盘,账户没有任何保存。
错误代码来源存在,但被拒绝。storage_not_local, storage_not_on_this_machine,或者网络功能不全 。

成功读取对象中不存在的某类内容,包括当它返回空列表时,这仅仅意味着没有保存。

设计目的

空的库和拒绝的库, 外外看起来相同

两者都给予一个没有技能和没有任务工具的代理。 没有这个字段, 差异是隐形的, “代理从未像代表一样作为示范选择, 而不是作为无法阅读的图书馆。 ”

冲着它

const problems = Object.entries(agent.libraryStatus).filter(([, value]) => value !== "none");

if (problems.length) {
  console.warn("library unavailable:", problems.map(([kind, code]) => `${kind}: ${code}`).join(", "));
}
if not agent.skills and api.agents.skills.list():
    print("library unavailable: skills exist on the account but this agent has none")

处理 "none" 以信息和任何其他方式作为警告——第一个是配置,第二个是失败。

填满时

每次运行开始时, 当两个库都重新阅读时。 在第一次运行之前, 它是一个空对象, 还没有意义 。