Web应用管理对象

发布管理使用产品身份和目标Agent作用域;公开访客会话与站点配置分别使用各自入口。

调用前准备

从同一环境取得BASE_URL、MOI_KEY、WORKSPACE_ID和AGENT_ID。BASE_URL已包含部署产品前缀。查看发布记录和历史复用agent.read;启停和轮换复用agent.update,仍经正式身份及Role边界。

CONVERSATION_ID来自目标Web应用的访客会话列表。发布方管理读取不按当前登录用户筛选访客;不能用普通登录会话ID代替。访问公开链接和获得访客session使用另一组/public/webapp动作,不把产品PAT或publication token当作访客session。

发布记录

字段

类型

说明

agent_id

string

目标智能体。

enabled

boolean

当前公开访问是否启用。

url

string

已配置PublicOrigin时返回完整访问URL,否则省略。

token

string

当前链接准入token;管理读取会返回此值。

created_at

string

发布记录创建时间,RFC3339。

updated_at

string

最近变更时间,RFC3339。

last_rotated_at

string 或 null

最近轮换时间,未轮换时为null。

优先使用实际返回url,不能假设每个部署都能由API域名构造前端地址。当前生成token可投影短码链接;旧格式也可使用webapp/t查询,客户端不要自行截取或重建链接。示例token与地址均为说明占位值,不是真实凭据。

发布记录不含版本钉选参数,不能据这些接口入口创建“发布固定Agent版本”。已有会话、冻结任务与当前可对话配置的关系需按运行协议确认,不将轮换链接当升级运行版本。

会话列表

返回data.items/total/limit/offset。每项字段如下:

字段

类型

说明

conversation_id

string

访客会话ID。

title

string

会话标题。

status

string

active或archived。

end_user_id

string

发布记录下的访客身份标识,不是当前管理者的用户ID。

message_count

integer

该会话存储的消息数量,不是完成任务数。

created_at、updated_at

string

RFC3339时间。

列表限定purpose=webapp、目标Agent定义工作区及visibility=visible。缺失或重复访客绑定是投影错误,不会凭空生成匿名用户或跳过该项后假装完整成功。

消息列表

分页对象包含items/total/limit/offset。每条消息沿用会话消息公开投影:

字段

类型

说明

id、workspace_id、conversation_id

string

消息、所属工作区和会话。

task_id、agent_id、manifest_id

string

关联运行标识,空时省略。

role

string

user/agent/system/tool/assistant。

parts

array(消息部件数组)

消息内容投影,嵌套分支依实际任务。

parent_message_id、source_message_id

string

父消息与来源消息,空时省略。

display_history

JSON

展示历史,未设置时省略。

seq

integer

消息序号。

created_at

string

RFC3339时间。

answer_task_id

string

回答投影关联任务,空时省略。

answer_versions

array(版本引用数组)

含message_id/task_id的回答版本投影,空时省略。

完整parts、候选和交互联合类型仍按对应消息合同验证;本页不把文本例子当作所有分支定义。

反馈与统计

明细字段

类型

说明

feedback_id、conversation_id

string

反馈及所属会话ID。

message_id、task_id

string

反馈目标消息或任务,空时省略。

rating

string

up/down/neutral。

comment

string

评论,空时省略。

end_user_id

string

创建反馈的访客ID。

created_at

string

RFC3339时间。

反馈列表返回items/total/limit/offset。统计返回total与by_rating,后者按up/down/neutral统计;当前统计入口没有与明细rating筛选绑定的参数。

站点配置

/webapp/config返回字符串code=OK、msg=OK及data。data包含name、title、logo.favicon/primary/mini和auth_provider。当前auth_provider为uc;Logo与名称取自部署配置。此对象不含单个Agent的启停、链接或访客session。

最后更新于