Skip to content

Agent Platform API

字数
436 字
阅读时间
2 分钟

社交型 Agent 平台控制台接口:人物事实、同意、观察队列、任务、口癖与工具目录。实现:packages/pb_webui/agent_platform_api.py

前端:人物 / 任务等在 AI 观测;工具清单与覆盖在 AI 配置 → 对话 → 工具。使用说明见 AI 扩展 · 观测与策略

基址与鉴权同 WebUI API 契约。写操作需写 token(X-Pallas-Token 或会话写权限)。

下表路径相对 /pallas/api

总览与工具目录

方法路径说明
GET/llm/agent-platform/overviewQuery:bot_idgroup_id(可选)。返回观察队列大小、工具数、任务数、口癖候选/已启用等
GET/llm/agent-platform/tools与对话配置页工具目录同源的可调用清单与策略摘要

人物事实与同意

方法路径说明
GET/llm/agent-platform/person-factsQuery:bot_id(必填)、group_iduser_idlimit
POST/llm/agent-platform/person-factsBody:bot_iduser_idcontent;可选 group_idscopesourceconfidence
POST/llm/agent-platform/person-facts/correctBody:fact_idcontent
GET/llm/agent-platform/consentQuery:user_id;可选 platform(默认 qq
POST/llm/agent-platform/consentBody:user_idgranted;可选 platformscopes

观察队列

方法路径说明
GET/llm/agent-platform/observationsQuery:bot_idgroup_idstatus(空或 all 表示全部)、limitdata.queue_size 为当前队列大小

任务

方法路径说明
GET/llm/agent-platform/tasksQuery:group_id(可选)、limit
POST/llm/agent-platform/tasks/cancelBody:task_id

口癖

方法路径说明
GET/llm/agent-platform/catchphrasesQuery:bot_idstatus(可选)
POST/llm/agent-platform/catchphrases/resolveBody:entry_idactionapprovereject

前端对应

WebUI:src/api/agentPlatformApi.ts;页面 AiPeoplePage / AiToolsPage / AiTasksPage

离线 Schema:openspec/pallas-console-v1.jsonuv run python tools/sync_console_openapi.py)。