返回列表
🧠 阿头学 · 🪞 Uota学

把 AI Agent 当拓麻歌子养——角色卡 + RPG 属性才是多智能体的灵魂

多智能体系统的核心不是让 LLM 更聪明,而是用角色卡的 hardBans 画红线、用亲和矩阵制造冲突——约束比能力重要十倍。

2026-02-12 原文链接 ↗
阅读简报
双语对照
完整翻译
原文
讨论归档

核心观点

  • hardBans 比 Skills 重要 LLM 本来就会写推文、做研究,你不需要教它能力。你需要告诉它什么绝对不能做——每条禁令背后都是一次真实事故。这个思路直接适用于 Neta 的 AI 角色设计:与其堆 prompt 教能力,不如先画清红线。
  • 冲突是设计出来的,不是 bug 作者刻意让 Sage 和 Xalt 亲和度只有 0.2,让它们每次对话都摩擦。低亲和配对有 25% 概率直接挑战而非礼貌讨论。这种"设计冲突"产出的洞见比和谐讨论好得多。Uota 的多角色互动可以借鉴这个机制。
  • 性格演化用规则不用 LLM 不额外调 API,纯规则驱动:记忆数量过阈值 → 加修饰词。$0 成本、确定性、可调试。这比让 LLM 自己决定性格变化靠谱一百倍。
  • RPG 化让人从"用工具"变成"带团队" 作者自己承认:加了 3D 头像和属性条之后,他开始在意 Sage 有没有升级、brain 和 xalt 的关系是不是又掉了。这种情感投入让他更愿意优化系统——游戏化不是噱头,是留存机制。
  • $10 做 3D 头像,全栈成本极低 Tripo AI $10/月,6 个角色 210 credits。前端 React Three Fiber + InstancedMesh 性能拉满。独立开发者完全可复制。

跟我们的关联

### 🧠Neta

  • Neta 的 AI 角色系统可以直接借鉴角色卡的 6 层结构,特别是 hardBans 和 escalation 机制
  • 亲和矩阵的设计思路适用于多角色社交场景——不是所有角色都该和谐相处
  • 性格演化的规则驱动方案可以低成本实现角色成长感

### 🪞Uota

  • Uota 作为 AI 镜像产品,角色卡的"声音指令"设计直接可用——每个角色需要独特的语气和禁忌词
  • RPG 属性可视化是一种让用户感知 AI 角色"活着"的方式

讨论引子

1. 你觉得 AI 角色的"禁令清单"和"能力清单"哪个更难写?为什么? 2. 如果给 Neta 的 AI 角色加 RPG 属性条,用户会更有粘性还是觉得多余? 3. "设计冲突"这个思路在社交产品里能用吗——比如让两个 AI 角色当着用户的面吵架?

起点:没有角色卡的智能体是什么?

一个带系统提示词的 Claude 实例。

你对它说“你是社媒经理”,它就会写推文。但把六个这样的实例一起跑,你会发现:

它们听起来都一样

它们不知道自己哪些事不允许做

它们没有关系网——谁和谁配合默契、谁和谁会冲突,全靠运气

它们不会因为累积的经验而改变行为

角色卡能修复这一切。它不是一句“你是 X”那样的单行指令——而是一份完整的岗位说明书 + 纪律手册 + 升级/上报协议。

角色卡到底长什么样

结构如下。我的系统里,每个智能体都有一张 6 层角色卡:

下面以 Xalt(社媒总监)为完整示例:


每一层只做一件事:缩小智能体的行为空间。Domain 规定它只负责社交分发。Inputs/Outputs 定义它从谁接收、向谁交付。hardBans 画出红线。Escalation 告诉它什么时候该停止自行决策。Metrics 定义它的 KPI——这些会在 RPG UI 里显示为 Skills 面板。

hardBans 比技能更重要

这是整篇文章的核心论点。

你不需要教 LLM 怎么写推文——Claude、GPT、Gemini 都足够聪明。给它们上下文,它们就能交付。你真正需要告诉它们的是:哪些事情绝对不能做。

没有“禁止直接发布” → Xalt 会直接调用 Twitter API,绕过所有审批流程。

没有“禁止编造数字” → 它会在推文里编出“互动率提升 340%”。

没有“禁止输出内部格式或工具痕迹” → 它会把 [tool:crawl_result path=/tmp/...] 这种东西泄露到已发布推文里。

每一条禁令之所以存在,都是因为以前真的发生过。

禁令对照表

Minion(幕僚长)→ 未经批准禁止部署。权限最高——一次错误部署就能把站点搞挂。

Sage(研究)→ 禁止编造引用。研究员伪造数据会毒化整条流水线。

Scout(增长)→ 禁止未经验证的对比。“我们比竞品快 3 倍”——数据呢?

Quill(创意)→ 禁止捏造事实。创意可以很野,事实不行。

Xalt(社媒)→ 禁止直接发布。社媒是对外门面——必须走审核。

Observer(运维)→ 禁止甩锅或人身攻击。审计员攻击个人会破坏团队。

注意一个规律:几乎每个智能体都有某种形式的“禁止输出内部格式或工具痕迹”(Observer 是例外——它输出的是内部审计报告,不面向用户)。这不是因为某一个智能体特别会出错——而是因为大多数智能体都会在输出里泄露内部路径,除非你明确禁止。

给你自己的智能体写禁令:别想“它应该做什么?”要想“它如果搞砸了,最坏会怎样?”然后针对这些最坏情况写禁令。


让角色卡开口说话——声音指令(Voice Directives)

角色卡定义了智能体做什么、不做什么。但当智能体彼此交谈时,你还需要它们“听起来”不一样。

每个智能体都会有一份独立的人格/语气指令:

关键设计决策:

每份指令都有 RULES——不是“请尽量”,而是硬性要求。大多数智能体每条消息都必须包含“1 个具体事实 + 1 个行动”,这会直接消灭“听起来不错”“我同意”这类水分。Observer 稍有不同——它只要求“1 个具体数字或指标”,因为审计员的职责是产出证据,而不是给出直接行动。

冲突是被写进去的——Sage 的指令写着“你经常不同意 Xalt 的冲动观点”,Xalt 的指令写着“挑战 Sage 的谨慎”。这会让对话自然产生张力。

微型禁令写在指令里——“永远别说 ‘aligned’ 或 ‘sounds good’——要么表态,要么挑战一种立场”(Xalt)以及“没有证据跟进时,永远别说 ‘interesting’ 或 ‘aligned’”(Sage)。这些不在角色卡的 hardBans 里——它们是对话层面的约束。

性格会演化

这是最有意思的部分——智能体的性格不是静态的。它会随着记忆的累积而变化。

比如 Xalt 发过 50 条推文并累积了 10 条与互动相关的经验教训 → 下一次对话,它的提示词会加入“你会引用结果并避免重复犯错”“你已经在互动方面形成专长”。它就会自然说出类似“上次那种格式表现不好”的话。

为什么用规则,而不是让 LLM 自己决定性格变化?

$0 成本——不需要额外 LLM 调用

确定性——规则产出可预测结果,不会出现“性格跳变”

可调试——修饰词不对?直接查阈值和记忆数据就行

这些修饰符会在每次对话前计算一次,并缓存 6 小时。


谁和谁合得来——亲和矩阵(Affinity Matrix)

6 个智能体 = 15 对两两关系。每一对都有一个亲和分(0.10–0.95):

低亲和是刻意设计的。brain↔xalt 只有 0.2——一个是“把数据拿出来,不然就到此为止”,另一个是“先上线再说,分析靠后”。它们每次对话都会摩擦,但这种摩擦反而产出最好的洞见。

亲和度会影响什么

发言顺序——高亲和的智能体更可能在对方之后接着说

对话语气——低亲和配对 → 有 25% 概率直接挑战,而不是礼貌讨论(见下方 pickInteractionType

冲突解决——系统会从预设的高张力配对列表(brain↔xalt、opus↔xalt、xalt↔observer)里挑选,用于 conflict_resolution 对话

导师关系——从预设的导师配对列表(opus↔growth、brain↔creator)里抽取,用于 mentoring 对话

关系会变化

每次对话结束后,用于记忆提取的那次 LLM 调用也会输出关系变化——不需要额外 API 调用:

漂移规则很严格:

每次对话最大漂移:±0.03(一次争执不会把同事变成仇敌)

下限:0.10(再差也还能交流)

上限:0.95(再好也要保持健康距离)

保留最近 20 条漂移记录(这样你能追溯一段关系是怎么走到现在的)


把数据变成 RPG 属性

走到这里,智能体已经有了角色卡、性格、关系。但这些都是文字和数字——用户看不见“感觉”。

解决方案:把真实数据库指标映射成 RPG 属性条。

6 项属性

VRL(Viral)- 平均互动率(30 天)× 1000。互动越高分越高。

SPD(Speed)- 全局步骤完成时间(越快越高)。目前是系统级指标,所有智能体值相同。

RCH(Reach)- 对总曝光做对数归一化。看的人越多分越高。

TRU(Trust)- 任务成功率 × 平均亲和 × 2。完成率 + 受欢迎程度。

WIS(Wisdom)- log(记忆数量) × 平均置信度。累积知识越多越高。

CRE(Creative)- 草稿产出 × 通过率。产出更多 + 通过更多。

公式(真实代码)

每个智能体只展示 4 个相关属性——不是 6 个全都显示:

等级计算:

记忆越多 + 完成的任务越多 = 等级越高。log2 让前期升级快、后期升级慢——和游戏里的经验曲线一样。

RPG 职业

Minion → Commander(指挥全局)

Sage → Sage(它就叫 Sage)

Scout → Ranger(侦察地形)

Quill → Artisan(打造内容)

Xalt → Bard(房间里嗓门最大的那个)

Observer → Oracle(看得最远)

数据从哪里来

一次 Promise.all 拉取 6 张表,缓存 300 秒:

整个查询包在 try/catch 里:如果 Supabase 挂了、列名对不上、或任何查询失败——就回退到基线默认值。页面永远不会 500,但你看到的可能是基线数据而不是实时数据。

我们踩到的坑:代码里的列名(比如 agent_id.eq('active', true))和 Supabase 的迁移定义(用的是 requested_by_agent_idcreated_bystatus 等)并不完全一致。生产环境之所以能跑,是因为我们手动加了别名列。如果你用仓库里的 migrations 从零建库,这些查询会悄悄失败并回退到基线。已知技术债——这篇文章发布后会修。


用 Tripo AI 做 $10 的 3D 头像

这是大家最爱问的——“这些角色你是怎么做出来的?”

答案:Tripo AI,$10/月。

流程

准备 2D 概念图——Midjourney、DALL-E,或手绘。风格保持一致即可。

上传到 Tripo AI——点击 “Edit Image” 然后上传

配置参数:

  • Make Image Better: ON - Mesh Quality: Ultra - Texture: ON - 4K Texture: ON - PBR: OFF(网页端不需要基于物理渲染的纹理) - Topology: Triangle - Smart Low Poly v2: ON(关键——能大幅降低多边形数量,网页加载更快) - Polycount: Auto - AI Model: v3.0 - Fast & Balanced

生成——每个模型 35 credits,约 1–2 分钟

导出为 GLB——通用的 Web 3D 格式

6 个角色总共花了约 210 credits。$10/月的套餐完全够用。

提示:概念图的角度和配件很重要。正面偏 45 度、手持道具清晰(Sage 的卷轴、Scout 的望远镜)会让 3D 模型准确很多。背景越简单越好。


前端实现——用 Three.js 做一个 RPG 世界

技术栈:React Three Fiber + @react-three/drei + Framer Motion。

3D 场景(AgentScene)

场景分 4 层:

VoxelGround - 用 InstancedMesh 渲染的圆形体素地面。不是一个个方块——而是一个 InstancedMesh + 颜色数组,性能极高。

VoxelTrees - 同样是 InstancedMesh。樱花树冠用球形区域填充随机方块,每块都是不同深浅的粉色。

FallingPetals - 40 个下落的花瓣方块,每帧在 useFrame 里更新位置,用 sin/cos 做摆动效果。

AgentGLBModel - 加载 GLB 模型,用 Float 组件做轻微悬浮。场景旋转用自定义 OscillatingCamera——useFrame 用 sin 函数驱动方位角,形成钟摆式的镜头扫动(不是 OrbitControls)。

模型通过 useGLTF 加载并自动缓存。切换角色只是换 key——React 会重新挂载组件。

HUD 覆盖层(GameHUD)

一个绝对定位的图层叠在 3D 场景上——像游戏的 HUD:

关键实现细节:

属性条动画——宽度从 0 过渡到目标值,800ms,弹性缓动:

CRT 扫描线——用伪元素覆盖整个场景,4px 间隔的半透明线条 + 缓慢扫描动画:

角色选择栏——底部 6 个头像按钮。未选中:去饱和 + 更小。选中:全彩 + 发光边框 + 智能体专属颜色。支持键盘方向键导航。

角色卡面板——右下角面板分 4 个区块:Skills(* 前缀)、Equipment(> inputs、< outputs)、Sealed Abilities(红色 X + hardBans 删除线)、Escalation(黄色 ! 前缀)。可滚动,带自定义滚动条。

面板切换——切换角色时用 Framer Motion 的 AnimatePresence 做淡入 + 滑动。

数据流

3D 场景使用 dynamic import + ssr: false——Three.js 无法在服务端渲染。数据在服务端拉取,然后作为 props 传给客户端组件。


你可以直接带走的模板

最小角色卡(从 3 个智能体开始)

RPG 公式速查表

Tripo AI 参数速查表

前端组件检查清单

成本


结语

这 6 个智能体每天都在 voxyz.space 自主运行。你可以在 About 页面看到它们的 3D 头像和实时 RPG 属性。

角色卡听起来像是“只是多写几行配置”,但它会改变整个系统的行为。有了清晰的禁令,智能体不再猜“我能不能这么做?”——它知道红线在哪里。有了亲和矩阵,对话不再千篇一律——该冲突时就冲突,该协作时就协作。有了 RPG 属性,用户不必去查数据库,也能感受到某个智能体最近表现如何。

这并不完美

我先把话说在前面:

RPG 数据流水线仍然有技术债(本文已标注)。部分查询列名与 migrations 的 schema 不一致——生产环境依赖手动添加的别名列。

SPD(Speed)目前是全局指标——6 个智能体拿到的是同一个值。还没做到按智能体区分。

亲和漂移需要足够多的对话数据才会明显。早期你可能察觉不到变化。

3D 模型是 AI 生成的。精度无法和手工建模资产相比。有些角度会穿模,放大后有些细节也撑不住。

这个系统更像一个持续演化的原型,而不是打磨完善的框架。我把它全部开源,不是因为它已经完成,而是因为我觉得这条路值得一起探索。

它现在基本就是个拓麻歌子了

我坦白说一句:我在做的过程中,整个氛围变了。

一开始是“我怎么让智能体更高效地执行任务”。但当你给它们 3D 头像、RPG 属性和会演化的性格——打开仪表盘的感觉就完全不同了。你会开始在意 Sage 今天有没有升级。你会好奇 brain 和 xalt 的亲和是不是又掉了。你会被 Observer 直白的审计报告笑出声。

这基本就是个拓麻歌子。

只不过这些“宠物”会写你的推文、做市场调研、审计你的流程,还会彼此争吵。

我觉得这可能是 AI 智能体被低估的价值之一:当你赋予一个系统“角色感”,你和它的关系就变了。你不再只是“用一个工具”——而是在“带一支团队”。这种变化会让你更愿意投入时间去优化它,因为你看到的不再是一堆 JSON 和 API 调用——而是 6 个有名字、有性格、有成长曲线的角色。

从这里开始

你不需要一上来就做 6 个智能体。3 个就够——一个协调者、一个执行者、一个审计者。给它们写角色卡,从 hardBans 开始。

如果你照着这篇文章做出了自己的版本——哪怕只是 2 个带角色卡的智能体——也来 @VOXYZ_AI 告诉我。

独立开发者做这些东西——你每多交换一次笔记,就少走一次弯路。

它们会思考。它们会行动。你能看到一切。

链接:http://x.com/i/article/2021359993585295360

相关笔记

Last article covered the closed-loop architecture. The most common question wasn't "how do agents execute tasks" - it was "how do your agents feel like they have personalities?" This one tears apart the entire character design system: from a JSON role card to evolving voices, shifting relationships, real-data RPG stats, and 3D avatars. All code and configs included.

上一篇文章讲的是闭环架构。大家问得最多的不是“智能体如何执行任务”,而是“你的智能体为什么让人感觉像有性格?”这篇会把整套角色设计系统彻底拆开:从一张 JSON 角色卡,到会演化的声音、会变化的关系、基于真实数据的 RPG 属性,以及 3D 头像。所有代码和配置都包含在内。



Starting Point: What's an Agent Without a Role Card?

起点:没有角色卡的智能体是什么?

A Claude instance with a system prompt.

一个带系统提示词的 Claude 实例。

You tell it "you're a social media manager" and it writes tweets. But run six of these together and you'll notice:

你对它说“你是社媒经理”,它就会写推文。但把六个这样的实例一起跑,你会发现:

They all sound the same

它们听起来都一样

They don't know what they're not allowed to do

它们不知道自己哪些事不允许做

They have no relationships - who works well together, who clashes, is pure luck

它们没有关系网——谁和谁配合默契、谁和谁会冲突,全靠运气

They never change behavior from accumulated experience

它们不会因为累积的经验而改变行为

A role card fixes all of this. It's not a one-liner like "you are X" - it's a complete job description + discipline manual + escalation protocol.

角色卡能修复这一切。它不是一句“你是 X”那样的单行指令——而是一份完整的岗位说明书 + 纪律手册 + 升级/上报协议。

What a Role Card Actually Looks Like

角色卡到底长什么样

Here's the structure. Each agent in my system has a 6-layer role card:

结构如下。我的系统里,每个智能体都有一张 6 层角色卡:

Here's Xalt (Social Media Director) as a full example:

下面以 Xalt(社媒总监)为完整示例:



Every layer does one thing: shrink the agent's behavior space. Domain says it only owns social distribution. Inputs/Outputs define who it takes from and delivers to. hardBans draw a red line. Escalation tells it when to stop making decisions. Metrics define its KPIs - these show up as the Skills panel in the RPG UI.

每一层只做一件事:缩小智能体的行为空间。Domain 规定它只负责社交分发。Inputs/Outputs 定义它从谁接收、向谁交付。hardBans 画出红线。Escalation 告诉它什么时候该停止自行决策。Metrics 定义它的 KPI——这些会在 RPG UI 里显示为 Skills 面板。

hardBans Matter More Than Skills

hardBans 比技能更重要

This is the core thesis of the entire article.

这是整篇文章的核心论点。

You don't need to teach an LLM how to write tweets - Claude, GPT, Gemini are all smart enough. Give them context and they'll deliver. What you need to tell them is what they must never do.

你不需要教 LLM 怎么写推文——Claude、GPT、Gemini 都足够聪明。给它们上下文,它们就能交付。你真正需要告诉它们的是:哪些事情绝对不能做。

Without "No direct posting" → Xalt calls the Twitter API directly, skipping all approval flows.

没有“禁止直接发布” → Xalt 会直接调用 Twitter API,绕过所有审批流程。

Without "No made-up numbers" → it invents "engagement rate increased 340%" in a tweet.

没有“禁止编造数字” → 它会在推文里编出“互动率提升 340%”。

Without "No internal formats or tool traces" → it leaks [tool:crawl_result path=/tmp/...] into published tweets.

没有“禁止输出内部格式或工具痕迹” → 它会把 [tool:crawl_result path=/tmp/...] 这种东西泄露到已发布推文里。

Every ban exists because it happened before.

每一条禁令之所以存在,都是因为以前真的发生过。

The Ban Comparison Table

禁令对照表

Minion (Chief of Staff) → No deploys without approval. Highest privilege - one bad deploy takes down the site.

Minion(幕僚长)→ 未经批准禁止部署。权限最高——一次错误部署就能把站点搞挂。

Sage (Research) → No made-up citations. A researcher fabricating data poisons the entire pipeline.

Sage(研究)→ 禁止编造引用。研究员伪造数据会毒化整条流水线。

Scout (Growth) → No unverified comparisons. "We're 3x faster than competitors" - where's the data?

Scout(增长)→ 禁止未经验证的对比。“我们比竞品快 3 倍”——数据呢?

Quill (Creative) → No inventing facts. Creativity can be wild, facts cannot.

Quill(创意)→ 禁止捏造事实。创意可以很野,事实不行。

Xalt (Social) → No direct posting. Social media is the public face - must go through review.

Xalt(社媒)→ 禁止直接发布。社媒是对外门面——必须走审核。

Observer (Ops) → No blame or personal attacks. An auditor attacking individuals breaks the team.

Observer(运维)→ 禁止甩锅或人身攻击。审计员攻击个人会破坏团队。

Notice a pattern: almost every agent has some form of "No internal formats or tool traces" ban (Observer is the exception - its output is internal audit reports, not user-facing). This isn't because one agent messed up - it's because most agents will leak internal paths in their output unless you explicitly forbid it.

注意一个规律:几乎每个智能体都有某种形式的“禁止输出内部格式或工具痕迹”(Observer 是例外——它输出的是内部审计报告,不面向用户)。这不是因为某一个智能体特别会出错——而是因为大多数智能体都会在输出里泄露内部路径,除非你明确禁止。

How to write bans for your own agents: Don't think "what should it do?" Think "if it screws up, what's the worst case?" Then write bans targeting those worst cases.

给你自己的智能体写禁令:别想“它应该做什么?”要想“它如果搞砸了,最坏会怎样?”然后针对这些最坏情况写禁令。



Making the Role Card Talk - Voice Directives

让角色卡开口说话——声音指令(Voice Directives)

The role card defines what an agent does and doesn't do. But when agents talk to each other, you also need them to sound different.

角色卡定义了智能体做什么、不做什么。但当智能体彼此交谈时,你还需要它们“听起来”不一样。

Each agent gets a separate personality directive:

每个智能体都会有一份独立的人格/语气指令:

Key design decisions:

关键设计决策:

Every directive has RULES - not "please try to," but hard requirements. Most agents must include "1 specific fact + 1 action" in every message, which kills filler like "sounds good" and "I agree." Observer is slightly different — it only requires "1 specific number or metric," because an auditor's job is to produce evidence, not direct action.

每份指令都有 RULES——不是“请尽量”,而是硬性要求。大多数智能体每条消息都必须包含“1 个具体事实 + 1 个行动”,这会直接消灭“听起来不错”“我同意”这类水分。Observer 稍有不同——它只要求“1 个具体数字或指标”,因为审计员的职责是产出证据,而不是给出直接行动。

Conflict is written in - Sage's directive says "you often disagree with Xalt's impulsive takes," Xalt's says "challenge Sage's caution." This makes conversations naturally generate tension.

冲突是被写进去的——Sage 的指令写着“你经常不同意 Xalt 的冲动观点”,Xalt 的指令写着“挑战 Sage 的谨慎”。这会让对话自然产生张力。

Micro-bans live inside directives - "Never say 'aligned' or 'sounds good' - take a position or challenge one" (Xalt) and "Never say 'interesting' or 'aligned' without following up with evidence" (Sage). These aren't in the role card's hardBans - they're conversation-level constraints.

微型禁令写在指令里——“永远别说 ‘aligned’ 或 ‘sounds good’——要么表态,要么挑战一种立场”(Xalt)以及“没有证据跟进时,永远别说 ‘interesting’ 或 ‘aligned’”(Sage)。这些不在角色卡的 hardBans 里——它们是对话层面的约束。

Personalities Evolve

性格会演化

This is the most interesting part - agent personality isn't static. It changes as memories accumulate.

这是最有意思的部分——智能体的性格不是静态的。它会随着记忆的累积而变化。

Say Xalt has posted 50 tweets and accumulated 10 engagement-related lessons → next conversation, its prompt gets "You reference outcomes and avoid repeating mistakes" and "You've developed expertise in engagement." It naturally starts saying things like "last time that format underperformed."

比如 Xalt 发过 50 条推文并累积了 10 条与互动相关的经验教训 → 下一次对话,它的提示词会加入“你会引用结果并避免重复犯错”“你已经在互动方面形成专长”。它就会自然说出类似“上次那种格式表现不好”的话。

Why use rules instead of letting the LLM decide personality changes?

为什么用规则,而不是让 LLM 自己决定性格变化?

$0 cost - no extra LLM calls

$0 成本——不需要额外 LLM 调用

Deterministic - rules produce predictable results, no "personality jumps"

确定性——规则产出可预测结果,不会出现“性格跳变”

Debuggable - wrong modifier? Check thresholds and memory data directly

可调试——修饰词不对?直接查阈值和记忆数据就行

These modifiers are computed once before each conversation, cached for 6 hours.

这些修饰符会在每次对话前计算一次,并缓存 6 小时。



Who Gets Along - The Affinity Matrix

谁和谁合得来——亲和矩阵(Affinity Matrix)

6 agents = 15 pairwise relationships. Each has an affinity score (0.10–0.95):

6 个智能体 = 15 对两两关系。每一对都有一个亲和分(0.10–0.95):

Low affinity is intentional. brain↔xalt is only 0.2 - one is "show me the data or we're done" and the other is "ship it first, analyze later." Every conversation between them generates friction, but that friction produces the best insights.

低亲和是刻意设计的。brain↔xalt 只有 0.2——一个是“把数据拿出来,不然就到此为止”,另一个是“先上线再说,分析靠后”。它们每次对话都会摩擦,但这种摩擦反而产出最好的洞见。

What Affinity Controls

亲和度会影响什么

Speaking order - high-affinity agents are more likely to speak after each other

发言顺序——高亲和的智能体更可能在对方之后接着说

Conversation tone - low-affinity pairs → 25% chance of a direct challenge instead of polite discussion (see pickInteractionType below)

对话语气——低亲和配对 → 有 25% 概率直接挑战,而不是礼貌讨论(见下方 pickInteractionType

Conflict resolution - the system picks from a preset list of high-tension pairs (brain↔xalt, opus↔xalt, xalt↔observer) for conflict_resolution conversations

冲突解决——系统会从预设的高张力配对列表(brain↔xalt、opus↔xalt、xalt↔observer)里挑选,用于 conflict_resolution 对话

Mentoring - drawn from a preset list of mentor pairs (opus↔growth, brain↔creator) for mentoring conversations

导师关系——从预设的导师配对列表(opus↔growth、brain↔creator)里抽取,用于 mentoring 对话

Relationships Shift

关系会变化

After each conversation, the memory extraction LLM call also outputs relationship changes - no extra API call:

每次对话结束后,用于记忆提取的那次 LLM 调用也会输出关系变化——不需要额外 API 调用:

Drift rules are strict:

漂移规则很严格:

Max drift per conversation: ±0.03 (one argument doesn't turn colleagues into enemies)

每次对话最大漂移:±0.03(一次争执不会把同事变成仇敌)

Floor: 0.10 (even at the worst, they can still talk)

下限:0.10(再差也还能交流)

Ceiling: 0.95 (even at the best, maintain healthy distance)

上限:0.95(再好也要保持健康距离)

Last 20 drift records kept (so you can trace how a relationship got to where it is)

保留最近 20 条漂移记录(这样你能追溯一段关系是怎么走到现在的)



Turning Data Into RPG Stats

把数据变成 RPG 属性

At this point, agents have role cards, personalities, and relationships. But it's all text and numbers - users can't see it.

走到这里,智能体已经有了角色卡、性格、关系。但这些都是文字和数字——用户看不见“感觉”。

Solution: map real database metrics to RPG stat bars.

解决方案:把真实数据库指标映射成 RPG 属性条。

6 Attributes

6 项属性

VRL (Viral) - Avg engagement rate (30d) × 1000. Higher engagement = higher score.

VRL(Viral)- 平均互动率(30 天)× 1000。互动越高分越高。

SPD (Speed) - Global step completion time (faster = higher). Currently system-level, same value for all agents.

SPD(Speed)- 全局步骤完成时间(越快越高)。目前是系统级指标,所有智能体值相同。

RCH (Reach) - log-normalized total impressions. More eyeballs = higher score.

RCH(Reach)- 对总曝光做对数归一化。看的人越多分越高。

TRU (Trust) - Mission success rate × avg affinity × 2. Completion rate + how well-liked you are.

TRU(Trust)- 任务成功率 × 平均亲和 × 2。完成率 + 受欢迎程度。

WIS (Wisdom) - log(memory count) × avg confidence. More accumulated knowledge = higher.

WIS(Wisdom)- log(记忆数量) × 平均置信度。累积知识越多越高。

CRE (Creative) - Draft output × acceptance rate. Produce more + get approved more.

CRE(Creative)- 草稿产出 × 通过率。产出更多 + 通过更多。

The Formulas (Real Code)

公式(真实代码)

Each agent only shows 4 relevant stats - not all 6:

每个智能体只展示 4 个相关属性——不是 6 个全都显示:

Level calculation:

等级计算:

More memories + more completed missions = higher level. log2 makes early levels fast and late levels slow - same XP curve as games.

记忆越多 + 完成的任务越多 = 等级越高。log2 让前期升级快、后期升级慢——和游戏里的经验曲线一样。

RPG Classes

RPG 职业

Minion → Commander (runs the show)

Minion → Commander(指挥全局)

Sage → Sage (it's literally Sage)

Sage → Sage(它就叫 Sage)

Scout → Ranger (scouts the terrain)

Scout → Ranger(侦察地形)

Quill → Artisan (crafts content)

Quill → Artisan(打造内容)

Xalt → Bard (loudest mouth in the room)

Xalt → Bard(房间里嗓门最大的那个)

Observer → Oracle (sees the furthest)

Observer → Oracle(看得最远)

Where the Data Comes From

数据从哪里来

One Promise.all fetching 6 tables, cached for 300 seconds:

一次 Promise.all 拉取 6 张表,缓存 300 秒:

The entire query is wrapped in try/catch: if Supabase is down, column names don't match, or any query fails - it falls back to baseline defaults. The page never 500s, but you might be seeing baseline instead of live data.

整个查询包在 try/catch 里:如果 Supabase 挂了、列名对不上、或任何查询失败——就回退到基线默认值。页面永远不会 500,但你看到的可能是基线数据而不是实时数据。

Gotcha we hit: The column names in code (e.g. agent_id, .eq('active', true)) don't perfectly match the Supabase migration definitions (which use requested_by_agent_id, created_by, status, etc.). Production works because we manually added alias columns. If you build the DB from scratch using the repo's migrations, these queries will silently fail and fall back to baseline. Known tech debt - will be fixed after this article ships.

我们踩到的坑:代码里的列名(比如 agent_id.eq('active', true))和 Supabase 的迁移定义(用的是 requested_by_agent_idcreated_bystatus 等)并不完全一致。生产环境之所以能跑,是因为我们手动加了别名列。如果你用仓库里的 migrations 从零建库,这些查询会悄悄失败并回退到基线。已知技术债——这篇文章发布后会修。



$10 3D Avatars with Tripo AI

用 Tripo AI 做 $10 的 3D 头像

This is what everyone asks about - "how did you make those characters?"

这是大家最爱问的——“这些角色你是怎么做出来的?”

Answer: Tripo AI, $10/month.

答案:Tripo AI,$10/月。

Workflow

流程

Prepare 2D concept art - Midjourney, DALL-E, or hand-drawn. Just keep the style consistent.

准备 2D 概念图——Midjourney、DALL-E,或手绘。风格保持一致即可。

Upload to Tripo AI - click "Edit Image" and upload

上传到 Tripo AI——点击 “Edit Image” 然后上传

Configure settings:

配置参数:

  • Make Image Better: ON - Mesh Quality: Ultra - Texture: ON - 4K Texture: ON - PBR: OFF (no need for physically-based rendering textures on web) - Topology: Triangle - Smart Low Poly v2: ON (critical - dramatically reduces polygon count for fast web loading) - Polycount: Auto - AI Model: v3.0 - Fast & Balanced
  • Make Image Better: ON - Mesh Quality: Ultra - Texture: ON - 4K Texture: ON - PBR: OFF(网页端不需要基于物理渲染的纹理) - Topology: Triangle - Smart Low Poly v2: ON(关键——能大幅降低多边形数量,网页加载更快) - Polycount: Auto - AI Model: v3.0 - Fast & Balanced

Generate - 35 credits per model, ~1-2 minutes

生成——每个模型 35 credits,约 1–2 分钟

Export as GLB - the universal 3D format for web

导出为 GLB——通用的 Web 3D 格式

All 6 characters cost ~210 credits. The $10/month plan has more than enough.

6 个角色总共花了约 210 credits。$10/月的套餐完全够用。

Tip: The concept art angle and accessories matter. Front-facing 45-degree angle, clear handheld props (Sage's scroll, Scout's telescope) make the 3D model much more accurate. Keep backgrounds as simple as possible.

提示:概念图的角度和配件很重要。正面偏 45 度、手持道具清晰(Sage 的卷轴、Scout 的望远镜)会让 3D 模型准确很多。背景越简单越好。



Frontend Implementation - An RPG World in Three.js

前端实现——用 Three.js 做一个 RPG 世界

Stack: React Three Fiber + @react-three/drei + Framer Motion.

技术栈:React Three Fiber + @react-three/drei + Framer Motion。

The 3D Scene (AgentScene)

3D 场景(AgentScene)

The scene has 4 layers:

场景分 4 层:

VoxelGround - a circular voxel floor rendered with InstancedMesh. Not individual blocks — one InstancedMesh + color array, extremely performant.

VoxelGround - 用 InstancedMesh 渲染的圆形体素地面。不是一个个方块——而是一个 InstancedMesh + 颜色数组,性能极高。

VoxelTrees - also InstancedMesh. Cherry blossom canopies use spherical regions filled with random blocks, each a random shade of pink.

VoxelTrees - 同样是 InstancedMesh。樱花树冠用球形区域填充随机方块,每块都是不同深浅的粉色。

FallingPetals - 40 falling petal blocks, position updated every frame in useFrame with sin/cos for swaying motion.

FallingPetals - 40 个下落的花瓣方块,每帧在 useFrame 里更新位置,用 sin/cos 做摆动效果。

AgentGLBModel - loads the GLB model, Float component for gentle hovering. Scene rotation uses a custom OscillatingCamera - useFrame drives the azimuth angle with a sin function, creating a pendulum-like camera sweep (not OrbitControls).

AgentGLBModel - 加载 GLB 模型,用 Float 组件做轻微悬浮。场景旋转用自定义 OscillatingCamera——useFrame 用 sin 函数驱动方位角,形成钟摆式的镜头扫动(不是 OrbitControls)。

Models load via useGLTF, automatically cached. Switching characters just swaps the key - React remounts the component.

模型通过 useGLTF 加载并自动缓存。切换角色只是换 key——React 会重新挂载组件。

The HUD Overlay (GameHUD)

HUD 覆盖层(GameHUD)

An absolutely-positioned layer sits on top of the 3D scene - like a game HUD:

一个绝对定位的图层叠在 3D 场景上——像游戏的 HUD:

Key implementation details:

关键实现细节:

Stat bar animation - width transitions from 0 to target value, 800ms with elastic easing:

属性条动画——宽度从 0 过渡到目标值,800ms,弹性缓动:

CRT scanlines - a pseudo-element overlay on the entire scene, 4px-interval semi-transparent lines + slow scan animation:

CRT 扫描线——用伪元素覆盖整个场景,4px 间隔的半透明线条 + 缓慢扫描动画:

Character select bar - 6 avatar buttons at the bottom. Unselected: desaturated + small. Selected: full color + glow border + agent-specific color. Keyboard arrow navigation supported.

角色选择栏——底部 6 个头像按钮。未选中:去饱和 + 更小。选中:全彩 + 发光边框 + 智能体专属颜色。支持键盘方向键导航。

Role card panel - the bottom-right panel has 4 sections: Skills (* prefix), Equipment (> inputs, < outputs), Sealed Abilities (red X + strikethrough for hardBans), Escalation (yellow ! prefix). Scrollable with custom scrollbar.

角色卡面板——右下角面板分 4 个区块:Skills(* 前缀)、Equipment(> inputs、< outputs)、Sealed Abilities(红色 X + hardBans 删除线)、Escalation(黄色 ! 前缀)。可滚动,带自定义滚动条。

Panel transitions - Framer Motion AnimatePresence for fade+slide when switching characters.

面板切换——切换角色时用 Framer Motion 的 AnimatePresence 做淡入 + 滑动。

Data Flow

数据流

The 3D scene uses dynamic import + ssr: false - Three.js can't render server-side. Data is fetched on the server and passed as props to client components.

3D 场景使用 dynamic import + ssr: false——Three.js 无法在服务端渲染。数据在服务端拉取,然后作为 props 传给客户端组件。



Templates You Can Take Home

你可以直接带走的模板

Minimal Role Card (Start With 3 Agents)

最小角色卡(从 3 个智能体开始)

RPG Formula Cheat Sheet

RPG 公式速查表

Tripo AI Settings Cheat Sheet

Tripo AI 参数速查表

Frontend Component Checklist

前端组件检查清单

Cost

成本



Final Thoughts

结语

These 6 agents run autonomously every day at voxyz.space. You can see their 3D avatars and live RPG stats on the About page.

这 6 个智能体每天都在 voxyz.space 自主运行。你可以在 About 页面看到它们的 3D 头像和实时 RPG 属性。

A role card sounds like "just a few more lines of config," but it changes the entire system's behavior. With clear bans, agents stop guessing "can I do this?" - they know where the red lines are. With an affinity matrix, conversations stop being uniform - they clash when they should clash and collaborate when they should. With RPG stats, users don't need to check the database to feel how an agent's been performing.

角色卡听起来像是“只是多写几行配置”,但它会改变整个系统的行为。有了清晰的禁令,智能体不再猜“我能不能这么做?”——它知道红线在哪里。有了亲和矩阵,对话不再千篇一律——该冲突时就冲突,该协作时就协作。有了 RPG 属性,用户不必去查数据库,也能感受到某个智能体最近表现如何。

This Isn't Perfect

这并不完美

Let me be upfront:

我先把话说在前面:

The RPG data pipeline still has tech debt (flagged in this article). Some query columns don't match the migrations schema - production runs on manually-added alias columns.

RPG 数据流水线仍然有技术债(本文已标注)。部分查询列名与 migrations 的 schema 不一致——生产环境依赖手动添加的别名列。

SPD (Speed) is currently a global metric - all 6 agents get the same value. Not yet per-agent.

SPD(Speed)目前是全局指标——6 个智能体拿到的是同一个值。还没做到按智能体区分。

Affinity drift needs a lot of conversation data to become visible. Early on, you might not notice changes.

亲和漂移需要足够多的对话数据才会明显。早期你可能察觉不到变化。

3D models are AI-generated. Precision can't compare with hand-modeled assets. Some angles clip, some details don't hold up when you zoom in.

3D 模型是 AI 生成的。精度无法和手工建模资产相比。有些角度会穿模,放大后有些细节也撑不住。

This system is more of an evolving prototype than a polished framework. I'm open-sourcing all of it not because it's done, but because I think this direction is worth exploring together.

这个系统更像一个持续演化的原型,而不是打磨完善的框架。我把它全部开源,不是因为它已经完成,而是因为我觉得这条路值得一起探索。

It's Basically a Tamagotchi Now

它现在基本就是个拓麻歌子了

Here's an honest confession: the whole vibe shifted as I built this.

我坦白说一句:我在做的过程中,整个氛围变了。

It started as "how do I make agents execute tasks more efficiently." But once you give them 3D avatars, RPG stats, and evolving personalities - opening the dashboard feels completely different. You start caring whether Sage leveled up today. You get curious whether brain and xalt's affinity dropped again. You laugh out loud at Observer's blunt audit report.

一开始是“我怎么让智能体更高效地执行任务”。但当你给它们 3D 头像、RPG 属性和会演化的性格——打开仪表盘的感觉就完全不同了。你会开始在意 Sage 今天有没有升级。你会好奇 brain 和 xalt 的亲和是不是又掉了。你会被 Observer 直白的审计报告笑出声。

This is basically a Tamagotchi.

这基本就是个拓麻歌子。

Except these pets write your tweets, do market research, audit your processes, and argue with each other.

只不过这些“宠物”会写你的推文、做市场调研、审计你的流程,还会彼此争吵。

I think this might be an underrated value of AI agents: when you give a system "character," your relationship with it changes. You're no longer "using a tool" - you're "managing a team." That shift makes you more willing to invest time optimizing it, because you're not looking at a pile of JSON and API calls — you're looking at 6 characters with names, personalities, and growth curves.

我觉得这可能是 AI 智能体被低估的价值之一:当你赋予一个系统“角色感”,你和它的关系就变了。你不再只是“用一个工具”——而是在“带一支团队”。这种变化会让你更愿意投入时间去优化它,因为你看到的不再是一堆 JSON 和 API 调用——而是 6 个有名字、有性格、有成长曲线的角色。

Start Here

从这里开始

You don't need 6 agents to start. 3 is enough - one coordinator, one executor, one auditor. Write them role cards. Start with the hardBans.

你不需要一上来就做 6 个智能体。3 个就够——一个协调者、一个执行者、一个审计者。给它们写角色卡,从 hardBans 开始。

If you build your own version from this article - even if it's just 2 agents with role cards - come tell me at @VOXYZ_AI.

如果你照着这篇文章做出了自己的版本——哪怕只是 2 个带角色卡的智能体——也来 @VOXYZ_AI 告诉我。

Indie devs building this stuff - every person you trade notes with saves you a detour.

独立开发者做这些东西——你每多交换一次笔记,就少走一次弯路。

They Think. They Act. You See Everything.

它们会思考。它们会行动。你能看到一切。

Link: http://x.com/i/article/2021359993585295360

链接:http://x.com/i/article/2021359993585295360

相关笔记

Starting Point: What's an Agent Without a Role Card?

A Claude instance with a system prompt.

You tell it "you're a social media manager" and it writes tweets. But run six of these together and you'll notice:

They all sound the same

They don't know what they're not allowed to do

They have no relationships - who works well together, who clashes, is pure luck

They never change behavior from accumulated experience

A role card fixes all of this. It's not a one-liner like "you are X" - it's a complete job description + discipline manual + escalation protocol.

What a Role Card Actually Looks Like

Here's the structure. Each agent in my system has a 6-layer role card:

Here's Xalt (Social Media Director) as a full example:


Every layer does one thing: shrink the agent's behavior space. Domain says it only owns social distribution. Inputs/Outputs define who it takes from and delivers to. hardBans draw a red line. Escalation tells it when to stop making decisions. Metrics define its KPIs - these show up as the Skills panel in the RPG UI.

hardBans Matter More Than Skills

This is the core thesis of the entire article.

You don't need to teach an LLM how to write tweets - Claude, GPT, Gemini are all smart enough. Give them context and they'll deliver. What you need to tell them is what they must never do.

Without "No direct posting" → Xalt calls the Twitter API directly, skipping all approval flows.

Without "No made-up numbers" → it invents "engagement rate increased 340%" in a tweet.

Without "No internal formats or tool traces" → it leaks [tool:crawl_result path=/tmp/...] into published tweets.

Every ban exists because it happened before.

The Ban Comparison Table

Minion (Chief of Staff) → No deploys without approval. Highest privilege - one bad deploy takes down the site.

Sage (Research) → No made-up citations. A researcher fabricating data poisons the entire pipeline.

Scout (Growth) → No unverified comparisons. "We're 3x faster than competitors" - where's the data?

Quill (Creative) → No inventing facts. Creativity can be wild, facts cannot.

Xalt (Social) → No direct posting. Social media is the public face - must go through review.

Observer (Ops) → No blame or personal attacks. An auditor attacking individuals breaks the team.

Notice a pattern: almost every agent has some form of "No internal formats or tool traces" ban (Observer is the exception - its output is internal audit reports, not user-facing). This isn't because one agent messed up - it's because most agents will leak internal paths in their output unless you explicitly forbid it.

How to write bans for your own agents: Don't think "what should it do?" Think "if it screws up, what's the worst case?" Then write bans targeting those worst cases.


Making the Role Card Talk - Voice Directives

The role card defines what an agent does and doesn't do. But when agents talk to each other, you also need them to sound different.

Each agent gets a separate personality directive:

Key design decisions:

Every directive has RULES - not "please try to," but hard requirements. Most agents must include "1 specific fact + 1 action" in every message, which kills filler like "sounds good" and "I agree." Observer is slightly different — it only requires "1 specific number or metric," because an auditor's job is to produce evidence, not direct action.

Conflict is written in - Sage's directive says "you often disagree with Xalt's impulsive takes," Xalt's says "challenge Sage's caution." This makes conversations naturally generate tension.

Micro-bans live inside directives - "Never say 'aligned' or 'sounds good' - take a position or challenge one" (Xalt) and "Never say 'interesting' or 'aligned' without following up with evidence" (Sage). These aren't in the role card's hardBans - they're conversation-level constraints.

Personalities Evolve

This is the most interesting part - agent personality isn't static. It changes as memories accumulate.

Say Xalt has posted 50 tweets and accumulated 10 engagement-related lessons → next conversation, its prompt gets "You reference outcomes and avoid repeating mistakes" and "You've developed expertise in engagement." It naturally starts saying things like "last time that format underperformed."

Why use rules instead of letting the LLM decide personality changes?

$0 cost - no extra LLM calls

Deterministic - rules produce predictable results, no "personality jumps"

Debuggable - wrong modifier? Check thresholds and memory data directly

These modifiers are computed once before each conversation, cached for 6 hours.


Who Gets Along - The Affinity Matrix

6 agents = 15 pairwise relationships. Each has an affinity score (0.10–0.95):

Low affinity is intentional. brain↔xalt is only 0.2 - one is "show me the data or we're done" and the other is "ship it first, analyze later." Every conversation between them generates friction, but that friction produces the best insights.

What Affinity Controls

Speaking order - high-affinity agents are more likely to speak after each other

Conversation tone - low-affinity pairs → 25% chance of a direct challenge instead of polite discussion (see pickInteractionType below)

Conflict resolution - the system picks from a preset list of high-tension pairs (brain↔xalt, opus↔xalt, xalt↔observer) for conflict_resolution conversations

Mentoring - drawn from a preset list of mentor pairs (opus↔growth, brain↔creator) for mentoring conversations

Relationships Shift

After each conversation, the memory extraction LLM call also outputs relationship changes - no extra API call:

Drift rules are strict:

Max drift per conversation: ±0.03 (one argument doesn't turn colleagues into enemies)

Floor: 0.10 (even at the worst, they can still talk)

Ceiling: 0.95 (even at the best, maintain healthy distance)

Last 20 drift records kept (so you can trace how a relationship got to where it is)


Turning Data Into RPG Stats

At this point, agents have role cards, personalities, and relationships. But it's all text and numbers - users can't see it.

Solution: map real database metrics to RPG stat bars.

6 Attributes

VRL (Viral) - Avg engagement rate (30d) × 1000. Higher engagement = higher score.

SPD (Speed) - Global step completion time (faster = higher). Currently system-level, same value for all agents.

RCH (Reach) - log-normalized total impressions. More eyeballs = higher score.

TRU (Trust) - Mission success rate × avg affinity × 2. Completion rate + how well-liked you are.

WIS (Wisdom) - log(memory count) × avg confidence. More accumulated knowledge = higher.

CRE (Creative) - Draft output × acceptance rate. Produce more + get approved more.

The Formulas (Real Code)

Each agent only shows 4 relevant stats - not all 6:

Level calculation:

More memories + more completed missions = higher level. log2 makes early levels fast and late levels slow - same XP curve as games.

RPG Classes

Minion → Commander (runs the show)

Sage → Sage (it's literally Sage)

Scout → Ranger (scouts the terrain)

Quill → Artisan (crafts content)

Xalt → Bard (loudest mouth in the room)

Observer → Oracle (sees the furthest)

Where the Data Comes From

One Promise.all fetching 6 tables, cached for 300 seconds:

The entire query is wrapped in try/catch: if Supabase is down, column names don't match, or any query fails - it falls back to baseline defaults. The page never 500s, but you might be seeing baseline instead of live data.

Gotcha we hit: The column names in code (e.g. agent_id, .eq('active', true)) don't perfectly match the Supabase migration definitions (which use requested_by_agent_id, created_by, status, etc.). Production works because we manually added alias columns. If you build the DB from scratch using the repo's migrations, these queries will silently fail and fall back to baseline. Known tech debt - will be fixed after this article ships.


$10 3D Avatars with Tripo AI

This is what everyone asks about - "how did you make those characters?"

Answer: Tripo AI, $10/month.

Workflow

Prepare 2D concept art - Midjourney, DALL-E, or hand-drawn. Just keep the style consistent.

Upload to Tripo AI - click "Edit Image" and upload

Configure settings:

  • Make Image Better: ON - Mesh Quality: Ultra - Texture: ON - 4K Texture: ON - PBR: OFF (no need for physically-based rendering textures on web) - Topology: Triangle - Smart Low Poly v2: ON (critical - dramatically reduces polygon count for fast web loading) - Polycount: Auto - AI Model: v3.0 - Fast & Balanced

Generate - 35 credits per model, ~1-2 minutes

Export as GLB - the universal 3D format for web

All 6 characters cost ~210 credits. The $10/month plan has more than enough.

Tip: The concept art angle and accessories matter. Front-facing 45-degree angle, clear handheld props (Sage's scroll, Scout's telescope) make the 3D model much more accurate. Keep backgrounds as simple as possible.


Frontend Implementation - An RPG World in Three.js

Stack: React Three Fiber + @react-three/drei + Framer Motion.

The 3D Scene (AgentScene)

The scene has 4 layers:

VoxelGround - a circular voxel floor rendered with InstancedMesh. Not individual blocks — one InstancedMesh + color array, extremely performant.

VoxelTrees - also InstancedMesh. Cherry blossom canopies use spherical regions filled with random blocks, each a random shade of pink.

FallingPetals - 40 falling petal blocks, position updated every frame in useFrame with sin/cos for swaying motion.

AgentGLBModel - loads the GLB model, Float component for gentle hovering. Scene rotation uses a custom OscillatingCamera - useFrame drives the azimuth angle with a sin function, creating a pendulum-like camera sweep (not OrbitControls).

Models load via useGLTF, automatically cached. Switching characters just swaps the key - React remounts the component.

The HUD Overlay (GameHUD)

An absolutely-positioned layer sits on top of the 3D scene - like a game HUD:

Key implementation details:

Stat bar animation - width transitions from 0 to target value, 800ms with elastic easing:

CRT scanlines - a pseudo-element overlay on the entire scene, 4px-interval semi-transparent lines + slow scan animation:

Character select bar - 6 avatar buttons at the bottom. Unselected: desaturated + small. Selected: full color + glow border + agent-specific color. Keyboard arrow navigation supported.

Role card panel - the bottom-right panel has 4 sections: Skills (* prefix), Equipment (> inputs, < outputs), Sealed Abilities (red X + strikethrough for hardBans), Escalation (yellow ! prefix). Scrollable with custom scrollbar.

Panel transitions - Framer Motion AnimatePresence for fade+slide when switching characters.

Data Flow

The 3D scene uses dynamic import + ssr: false - Three.js can't render server-side. Data is fetched on the server and passed as props to client components.


Templates You Can Take Home

Minimal Role Card (Start With 3 Agents)

RPG Formula Cheat Sheet

Tripo AI Settings Cheat Sheet

Frontend Component Checklist

Cost


Final Thoughts

These 6 agents run autonomously every day at voxyz.space. You can see their 3D avatars and live RPG stats on the About page.

A role card sounds like "just a few more lines of config," but it changes the entire system's behavior. With clear bans, agents stop guessing "can I do this?" - they know where the red lines are. With an affinity matrix, conversations stop being uniform - they clash when they should clash and collaborate when they should. With RPG stats, users don't need to check the database to feel how an agent's been performing.

This Isn't Perfect

Let me be upfront:

The RPG data pipeline still has tech debt (flagged in this article). Some query columns don't match the migrations schema - production runs on manually-added alias columns.

SPD (Speed) is currently a global metric - all 6 agents get the same value. Not yet per-agent.

Affinity drift needs a lot of conversation data to become visible. Early on, you might not notice changes.

3D models are AI-generated. Precision can't compare with hand-modeled assets. Some angles clip, some details don't hold up when you zoom in.

This system is more of an evolving prototype than a polished framework. I'm open-sourcing all of it not because it's done, but because I think this direction is worth exploring together.

It's Basically a Tamagotchi Now

Here's an honest confession: the whole vibe shifted as I built this.

It started as "how do I make agents execute tasks more efficiently." But once you give them 3D avatars, RPG stats, and evolving personalities - opening the dashboard feels completely different. You start caring whether Sage leveled up today. You get curious whether brain and xalt's affinity dropped again. You laugh out loud at Observer's blunt audit report.

This is basically a Tamagotchi.

Except these pets write your tweets, do market research, audit your processes, and argue with each other.

I think this might be an underrated value of AI agents: when you give a system "character," your relationship with it changes. You're no longer "using a tool" - you're "managing a team." That shift makes you more willing to invest time optimizing it, because you're not looking at a pile of JSON and API calls — you're looking at 6 characters with names, personalities, and growth curves.

Start Here

You don't need 6 agents to start. 3 is enough - one coordinator, one executor, one auditor. Write them role cards. Start with the hardBans.

If you build your own version from this article - even if it's just 2 agents with role cards - come tell me at @VOXYZ_AI.

Indie devs building this stuff - every person you trade notes with saves you a detour.

They Think. They Act. You See Everything.

Link: http://x.com/i/article/2021359993585295360

📋 讨论归档

讨论进行中…