代理代表团
这个包提供了一种代理工具来检查远程的Wunderland代理,授权任务和通过HTTP收集回复.
安装
npm install @framers/agentos-ext-agent-delegation
同伴依赖 : @framers/agentos 有范围 >=0.10.40。 。 。 .
使用量
import { AgentOS } from '@framers/agentos';
const agentos = await AgentOS.create({
extensionManifest: {
packs: [{ package: '@framers/agentos-ext-agent-delegation' }],
},
});
配置
| 选项 | 秘密编号 | 环境变量 | 需求 | 默认 |
|---|---|---|---|---|
logger | 无 | 无 | 没有 | 无 |
工具
| 工具 | 它会做什么 |
|---|---|
agent_ping | 检查远程 Wunderland 代理是否可以到达并检索其元数据 . |
agent_delegate | 向远程Wunderland代理发送任务或问题并收到其文本回复. |
agent_broadcast | 将同样的任务平行地发送给遥远的文德兰特工,并收集他们的响应. |
agent_ping
| 参数 | 类型 | 需求 | 说明 |
|---|---|---|---|
url | string | 对 | 远程 Wunderland 代理的 URL . |
includePersonas | boolean | 没有 | 从远程代理中获取可用的个人列表 . |
agent_delegate
| 参数 | 类型 | 需求 | 说明 |
|---|---|---|---|
url | string | 对 | 远程 Wunderland 代理的 URL . |
message | string | 对 | 任务,问题,或指示发送到远程代理. |
secret | string | 没有 | 为远程代理聊天秘密( 如果需要) . |
sessionId | string | 没有 | 对话连续性的会话标识符 。 用同样的 sessionId 多次呼吁保持上下文. |
personaId | string | 没有 | 把目标锁定在远程特工身上. |
reset | boolean | 没有 | 发送此消息前清除远程会话历史 . |
timeoutMs | integer | 没有 | 超时数毫秒。 调用工具的代理任务可能需要一段时间. |
agent_broadcast
| 参数 | 类型 | 需求 | 说明 |
|---|---|---|---|
message | string | 对 | 向所有特工广播的任务或问题. |
agents | array 联 合 国 object | 对 | 要播出的代理端点列表 . |
sessionId | string | 没有 | 所有特工共享会话ID. |
timeoutMs | integer | 没有 | 代理超时数以毫秒计. |
每个对象在 agents 有这个计划:
| 参数 | 类型 | 需求 | 说明 |
|---|---|---|---|
url | string | 对 | 特务URL. |
secret | string | 没有 | 聊天秘密( 如果需要的话) . |
label | string | 没有 | 这个特工的可读标签. |
personaId | string | 没有 | 这个特工的目标人物. |
页:1
agent_ping 读取 /health 选择 /api/agentos/personas。这些请求使用超时 8000 数量和数量 5000 分别为ms. includePersonas 默认为 false。 。 。 .
代表团和广播向 /chat提供 secret 成为 X-Wunderland-Chat-Secret 头曰. 这些通话可以触发远程代理的工具和LLM. reset 默认为 false。 。 。 .
授权和广播默认为 a 120000 ms超时. 他们的计策允许从 5000 毫升为 600000 m. 广播需要一个非空目标阵列,并在其计划中设定最大阵列长度.
一个失败的 ping 返回 reachable: false。失败的代表团返回 ok: false 在一个成功的工具结果中。 每个代理商的广播报告失败, 仍然返回一个成功的工具结果 .
许可证
阿帕奇 - 2.0