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 refusedagent.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" 以信息和任何其他方式作为警告——第一个是配置,第二个是失败。
填满时
每次运行开始时, 当两个库都重新阅读时。 在第一次运行之前, 它是一个空对象, 还没有意义 。