agent-profile-images
name: agent-profile-images
version: 1.0.0
author: Charles Sears
description: Adds agent profile image upload, AI generation, preview/keep-regenerate-cancel flow, and avatar persistence fixes to the OpenClaw Control UI.
What This Skill Adds
1. Agent Profile Image Card in Agents → Overview
Adds a dedicated
Profile Image section to the Agents Overview panel with:
- - current avatar preview
- upload button
- remove button
- theme selector
- custom generation instructions
- generate button
- preview state messaging
2. Avatar Upload RPC
Adds
agents.avatar.upload so the Control UI can upload a PNG/JPG/WEBP/GIF image and save it into the agent workspace.
3. AI Avatar Generation RPC
Adds
agents.avatar.generate for themed image generation using OpenAI Images.
4. Preview / Keep / Regenerate / Cancel Loop
Generation does
not auto-save. Instead:
- - Generate → preview only
- Keep → saves generated image as the agent avatar
- Regenerate → requests a new preview
- Cancel → discards preview and preserves the previous avatar
5. Persistent Avatar Resolution
Fixes the gateway agent-list/session-utils path so avatar information from workspace
IDENTITY.md is reflected correctly across Agents UI, chat UI, refreshes, and reloads.
6. Fresh Identity Reloads on Agents Tab
Fixes stale UI state by forcing the Agents tab to refresh identity data when entering the tab and after avatar-changing actions.
Backend Methods Added
| Method | Description |
|---|
| INLINECODE3 | Upload and save a profile image into the agent workspace |
| INLINECODE4 |
Generate a themed avatar preview using OpenAI Images |
|
agents.avatar.remove | Remove the current stored avatar |
Theme Presets Included
- - Professional
- Sci-Fi
- Cyberpunk
- Fantasy
- Space Opera
- Creature Collector
- Mascot
- Noir
Storage Model
Saved avatars are written into the agent workspace under avatars/ and persisted via IDENTITY.md using:
CODEBLOCK0
This reuses the existing Control UI avatar serving path (/avatar/:agentId) and keeps images portable with the agent workspace.
Files Included
The references/ folder contains the feature implementation snapshots for these files:
- - INLINECODE10
- INLINECODE11
- INLINECODE12
- INLINECODE13
- INLINECODE14
- INLINECODE15
- INLINECODE16
- INLINECODE17
- INLINECODE18
- INLINECODE19
- INLINECODE20
- INLINECODE21
- INLINECODE22
- INLINECODE23
- INLINECODE24
- INLINECODE25
Notes
- - This skill packages the source-level feature implementation.
- A temporary live compiled-bundle hotfix was used during development to unblock testing, but that tactical dist patch is not part of this skill package.
- OpenAI image generation is currently the implemented provider path in this package.
- The full OpenClaw repo may contain unrelated build/runtime issues outside this feature; this skill is scoped only to agent profile image functionality.
Recommended Publish Changelog
CODEBLOCK1
agent-profile-images
名称: agent-profile-images
版本: 1.0.0
作者: Charles Sears
描述: 为 OpenClaw Control UI 添加智能体头像图片上传、AI 生成、预览/保留-重新生成-取消流程以及头像持久化修复功能。
此技能新增内容
1. 智能体 → 概览中的智能体头像图片卡片
在智能体概览面板中添加专用的
头像图片区域,包含:
- - 当前头像预览
- 上传按钮
- 移除按钮
- 主题选择器
- 自定义生成指令
- 生成按钮
- 预览状态提示
2. 头像上传 RPC
新增 agents.avatar.upload,使 Control UI 能够上传 PNG/JPG/WEBP/GIF 格式图片并将其保存到智能体工作区。
3. AI 头像生成 RPC
新增 agents.avatar.generate,使用 OpenAI Images 进行主题化图片生成。
4. 预览 / 保留 / 重新生成 / 取消循环
生成操作
不会自动保存。而是:
- - 生成 → 仅预览
- 保留 → 将生成的图片保存为智能体头像
- 重新生成 → 请求新的预览
- 取消 → 丢弃预览并保留之前的头像
5. 持久化头像解析
修复网关 agent-list/session-utils 路径,使来自工作区 IDENTITY.md 的头像信息能够在智能体 UI、聊天 UI、刷新和重新加载时正确显示。
6. 智能体标签页的即时身份重新加载
通过强制智能体标签页在进入标签页以及执行头像更改操作后刷新身份数据,修复 UI 状态过时问题。
新增的后端方法
| 方法 | 描述 |
|---|
| agents.avatar.upload | 上传并保存头像图片到智能体工作区 |
| agents.avatar.generate |
使用 OpenAI Images 生成主题化头像预览 |
| agents.avatar.remove | 移除当前存储的头像 |
包含的主题预设
- - 专业
- 科幻
- 赛博朋克
- 奇幻
- 太空歌剧
- 宠物收集
- 吉祥物
- 黑色电影
存储模型
保存的头像写入智能体工作区下的 avatars/ 目录,并通过 IDENTITY.md 使用以下格式持久化:
md
- - 头像: avatars/profile.png
这复用了现有的 Control UI 头像服务路径(/avatar/:agentId),并使图片随智能体工作区保持可移植性。
包含的文件
references/ 文件夹包含以下文件的功能实现快照:
- - src/gateway/method-scopes.ts
- src/gateway/protocol/index.ts
- src/gateway/protocol/schema/agent.ts
- src/gateway/protocol/schema/agents-models-skills.ts
- src/gateway/protocol/schema/protocol-schemas.ts
- src/gateway/protocol/schema/types.ts
- src/gateway/server-methods-list.ts
- src/gateway/server-methods/agent.ts
- src/gateway/server-methods/agents.ts
- src/gateway/session-utils.ts
- ui/src/ui/app-render.ts
- ui/src/ui/app-view-state.ts
- ui/src/ui/app.ts
- ui/src/ui/types.ts
- ui/src/ui/views/agents-panels-overview.ts
- ui/src/ui/views/agents.ts
备注
- - 此技能打包了源码级别的功能实现。
- 开发期间使用了临时的实时编译捆绑热修复以解除测试阻塞,但该临时性 dist 补丁不包含在此技能包中。
- 此包中实现的提供商路径目前为 OpenAI 图片生成。
- 完整的 OpenClaw 仓库可能包含与此功能无关的构建/运行时问题;此技能仅限定于智能体头像图片功能。
推荐发布更新日志
text
初始发布:智能体头像图片上传、主题化 AI 生成、预览/保留-重新生成-取消循环以及刷新状态修复。