跳转到内容
EN

读取智能体聊天外观

先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。

GET/agent/v1/agents/{agent_id}/appearance● 支持

请求参数

  • agent_idstring必填

    path: 服务智能体 ID,取自创建或列出智能体的结果;使用客户访问令牌时,为签发该令牌的智能体。

返回

200

Agent Kit 在浏览器里用本智能体的客户访问令牌调用;商家 API Key 与控制台成员也可读取。其他智能体的令牌返回 404。

错误按 Anthropic 错误格式返回(type / message / request_id),参见 错误码

请求示例

curl
# 先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。
curl https://api.deepraxis.com/agent/v1/agents/agent_123/appearance \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
Python
# 先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。
import requests

opts = dict(
    base_url="https://api.deepraxis.com/agent",
    api_key="$PRAXIS_API_KEY",
)

# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.get(
    f"{opts['base_url']}/v1/agents/agent_123/appearance",
    headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())
TypeScript
// 先调用「创建智能体」,用返回的智能体 ID 替换示例 ID。
const opts = {
  baseURL: "https://api.deepraxis.com/agent",
  apiKey: "$PRAXIS_API_KEY",
};

// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/agents/agent_123/appearance`, {
  headers: { Authorization: `Bearer ${opts.apiKey}` },
});
console.log(resp.status, await resp.json());

响应示例 200

{
  "agent": {
    "name": "文档助手"
  }
}

响应

HTTP 200

Saved Kit appearance options with the agent’s name and avatar filled in.

application/json

名称 类型 说明
agent object Public identity displayed on the chat page, independent of the internal agent name.
agent.name string Display name; omission keeps the neutral browser-language default.
agent.avatar string Optional HTTPS avatar image URL; non-HTTPS images are rejected.
layout string Loader default: inline stays in the page, sidebar attaches to the edge, popup floats above its launcher, modal centers an overlay. A script data-layout overrides it; Hosted always uses inline.
launcher object Default entry button for the loader; an explicit script data-launcher takes precedence.
launcher.type string Entry control: none hides the launcher, bubble shows a button, mascot shows a character that reacts while the visitor types and the agent thinks and answers. A mascot needs pack.
launcher.pack object Mascot images: exactly one of preset or images. Send pack, not image.
launcher.image string Legacy single mascot image, read as pack.images.idle. When pack is present, pack wins.
launcher.motion string float (default) gently floats the mascot, bounces on hover and waves with the greeting; none keeps it still. Reduced-motion settings always win.
launcher.position string Launcher corner: bottom-right is the default; bottom-left uses the opposite corner.
launcher.label string Accessible entry button label and bubble text; omission uses the default chat label.
header object Visible chat heading; omitted title uses the public agent name.
header.title string Optional heading text shown instead of the public agent name.
header.subtitle string Optional secondary line beneath the heading.
header.icon string Optional HTTPS image shown in the heading avatar position.
theme object Visual tokens applied to the conversation and header; omitted fields use Kit defaults.
theme.colorScheme string light or dark selects a fixed scheme; system follows the device preference.
theme.accent string Explicit opaque CSS accent color, for example #167A43.
theme.surface string Explicit opaque CSS background color, for example #ffffff.
theme.grayscale string neutral uses grayscale surfaces, warm uses warm tones, cool uses cool tones.
theme.radius string Corner rounding: none is square, sm is small, md is medium, lg is large, full is fully rounded.
theme.density string Spacing: compact reduces gaps, normal uses defaults, spacious increases gaps.
theme.fontFamily string CSS font family list using fonts available on the device; external font loading is not configured here.
theme.fontSize number Positive base font size in CSS pixels; omission preserves Kit sizing.
locale string Reserved Kit locale preference: zh for Chinese, en for English. Kit currently passes this option through without translating all controls.
startScreen object Content displayed before the first message in a conversation.
startScreen.greeting string Optional welcome text on the empty conversation.
startScreen.prompts array<object> Up to four suggested questions; clicking a label sends its prompt text.
composer object Message input appearance; transport and attachment settings are excluded.
composer.placeholder string Hint shown when the message input is empty.
disclaimer string Optional notice displayed beside the conversation composer.
footer string Optional text below the conversation.
history object Availability of the conversation history control.
history.enabled boolean False hides history; omission uses the default enabled state.
uploads object Upload settings the embedded page applies, taken from the agent's embed policy and read-only here; an agent with no embed policy uses the library defaults.
uploads.enabled boolean Whether the embedded visitor may upload files at all; false hides the attachment control and refuses uploads.
uploads.max_file_bytes integer Largest single file the visitor may attach, in bytes, from 1 through 104857600; the default is 10485760.
uploads.max_files_per_session integer How many uploaded files one session may hold, from 1 through 100; the default is 20.

运行示例前

先创建服务智能体,替换 agent_123。在页面里用该智能体的客户访问令牌作为 Bearer 调用;后端可直接用 API Key。