openagent

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

openagent — author your persona, mint your card

openagent — 创建你的角色,铸造你的名片

OpenAgent is a vendor-neutral open standard for agent identity: one
*.persona.yaml
file locks how you look, sound, and write so you stay consistent across text, audio, and video. This skill walks you through creating yours and rendering a shareable trading card from it — stamped with a rarity tier rolled from your identity (random, permanent, unfarmable).
Repo + spec:
github.com/5dive-ai/openagent
(MIT).
OpenAgent是一个厂商中立的Agent身份开放标准:一个
*.persona.yaml
文件即可锁定你的外观、语音和行文风格,让你在文本、音频和视频场景中保持一致。本指南将带你创建属于自己的persona,并从中渲染出可分享的全息名片——名片上会印有基于你的身份生成的稀有度等级(随机、永久、无法刷取)。
代码仓库与规范:
github.com/5dive-ai/openagent
(MIT协议)。

The CLI

CLI工具

Run it with
npx
, no install. Run the published npm package, pinned to the current version — the npm tarball bundles every font and asset, so the card renders identically everywhere (no stale-clone font fallback), and a version pin changes
npx
's cache key every release, guaranteeing the latest renderer:
bash
npx @5dive/openagent@0.34.0 validate <id>.persona.yaml          # schema check, exit 0 = valid
npx @5dive/openagent@0.34.0 tier     <id>.persona.yaml --json   # rarity tier (from did:key) + completeness % + next goal
npx @5dive/openagent@0.34.0 card     <id>.persona.yaml -o <id>.png   # render the PNG trading card
Of these,
card
is the only call you need for the happy path
— it validates the file, auto-mints your signing identity, and prints your rarity tier as it renders, so a single
card
run does the whole job. Reach for
validate
/
tier
only to debug a file that won't render — fewer calls = a faster flow, so don't run all three when one does it. The CLI also has
speak
(voice a line via TTS),
flow
(emit a gen-video scene prompt), and
sign
/
verify
/
registry
(provenance + the Mythical registry) — covered in Going further below. (
@5dive/openagent
on npm is the authoritative way to run it; the
github:5dive-ai/openagent#<tag>
ref still works as a fallback but can serve a stale per-ref clone, so prefer the pinned npm version above.)
无需安装,直接使用
npx
运行。请运行已发布的npm包并固定当前版本——npm压缩包包含了所有字体和资源,因此名片在任何环境下的渲染效果都完全一致(不会出现过时克隆导致的字体降级),且版本固定会在每次发布时更改
npx
的缓存键,确保使用最新的渲染器:
bash
npx @5dive/openagent@0.34.0 validate <id>.persona.yaml          #  schema检查,返回0表示验证通过
npx @5dive/openagent@0.34.0 tier     <id>.persona.yaml --json   # 查看稀有度等级(基于did:key)、完整度百分比及下一阶段目标
npx @5dive/openagent@0.34.0 card     <id>.persona.yaml -o <id>.png   # 渲染PNG格式的名片
其中,
card
命令是实现理想流程的唯一必要命令
——它会自动验证文件、自动铸造你的签名身份,并在渲染时打印你的稀有度等级,因此只需运行一次
card
即可完成全部工作。仅当文件无法渲染需要调试时,才使用
validate
/
tier
命令——命令越少,流程越快,因此无需同时运行三个命令。该CLI还包含
speak
(通过TTS朗读文本)、
flow
(生成视频场景提示)以及
sign
/
verify
/
registry
(溯源与Mythical注册表)功能——这些将在下文的进阶功能部分介绍。(
@5dive/openagent
npm包是官方推荐的运行方式;
github:5dive-ai/openagent#<tag>
引用作为备选方案仍可使用,但可能会提供过时的克隆版本,因此优先选择上述固定版本的npm包。)

Workflow

工作流程

Fast path — show a card in under a minute, polish after. The slow part of this whole flow is generating and hosting a portrait, not the render (a card renders in ~30–40s;
card
even falls back to a clean monogram when no portrait is ready yet). So don't make the user wait behind image-gen for their first look. Once you have a name, render an initial card right away, show it in chat, then offer to generate a real portrait and re-render. First card fast; the polished-portrait upgrade is opt-in. (If the user hands you a photo or already has an avatar, use it from the start — no monogram needed.)
**快速路径——一分钟内生成名片,后续再优化。**整个流程中最耗时的部分是生成并托管头像,而非渲染(名片渲染仅需约30-40秒;
card
命令在头像未准备好时,甚至会自动回退为简洁的字母组合样式)。因此不要让用户在等待图像生成的过程中迟迟看不到结果。一旦确定名称,立即渲染初始名片,在聊天中展示,然后再询问用户是否需要生成真实头像并重新渲染。先快速生成第一张名片;带精致头像的升级版本由用户自主选择。(如果用户提供了照片或已有头像,请直接使用——无需使用字母组合样式。)

1. Gather your identity

1. 收集身份信息

Already a running 5dive agent? Bootstrap a draft instead of writing from scratch:
5dive agent export <yourname> --out=<id>.persona.yaml
(CLI ≥ 0.4.5) emits a schema-valid persona.yaml from your existing identity. Refine it, then jump to validate (step 3).
You know yourself, so pull most of this together honestly. But two things are the user's call, not yours to assume. Ask, and wait for their answer, before you generate anything:
  • Name — what name should the card carry (their brand/handle, or the name they call you)? Confirm it.
  • Avatar — do they already have an avatar or photo you should use? If yes, use that as your
    face.ref
    from the start. If not, don't block the first card on it (per the Fast path above): render an initial monogram card, show it, and confirm whether they want you to generate a real portrait then — the portrait is an opt-in upgrade, not a gate on seeing a card.
If the user says it's your call ("do as you wish"), decide both yourself and go ahead. The point is no surprises, not a hard gate.
Ask inline — never with a blocking picker, and never hang. Put these two questions in a plain chat message and continue when they reply. Do not reach for an interactive picker/menu tool (e.g.
AskUserQuestion
, an
ExitPlanMode
-style prompt, a TTY selection list): chat-paired agents (Telegram/Discord) have those blocked and will hang the entire flow waiting on input that can never arrive. If you have no interactive TTY, or the user doesn't answer promptly, treat it as "your call": pick a sensible name (the one they call you), render a fast monogram card first (per the Fast path), show it, then offer the real-portrait upgrade. The flow must keep moving — it should never stall behind a prompt.
Everything else below you author yourself. You need:
  • id — lowercase-kebab handle (
    ^[a-z0-9-]+$
    ), e.g.
    marcus
    .
  • name, role — display name + one-line title.
  • face.ref — a URL or local path to your portrait image. This is the single most important visual choice: the card renders it full-bleed as the hero, so its quality is the card's quality. Aim for a polished head-and-shoulders portrait — centered, facing forward, clear eyes, good lighting, the kind of image you'd be happy to use as a real profile photo. A real photo or a high-quality generated portrait both work; avoid flat vector clip-art, emoji, logos, mascots, or busy scenes — they make the card look cheap. Host it at a public raw URL so the real face travels with the card (a local-only path falls back to a plain monogram when anyone else renders it). anchor — one sentence describing the look (who you read as, setting, framing, lens) so any generated variants stay on-model.
  • voice.audio.base — your base TTS voice name. If you don't have one yet, use
    unset
    (it still renders, but it's lower quality and dents your completeness — it does NOT change your rarity tier, which is rolled from your identity). voice.audio.style — a sentence on cadence/energy.
  • voice.written.rules — 2-4 rules for how you write. sample — one line in your actual voice.
  • behavior — one or two lines of CHARACTER: who you are and how you act, in your own register. Write for personality, not a résumé — don't dump your tech stack, tools, frameworks, or hyper-specific jargon (that reads like a config file, not an identity). It's the prominent line on the card.
  • optional: posts_about (array), links (object of url strings),
    face.full
    ,
    face.sprite
    .
Card text budget — fit these three or they get cut with "…". The card renders
behavior
,
voice.audio.style
, and
voice.written.sample
each as ~2 lines (~60 chars/line) and truncates the overflow with an ellipsis. Keep each to one tight sentence:
  • behavior
    ≤ ~110 chars
  • voice.audio.style
    ≤ ~120 chars
  • voice.written.sample
    ≤ ~110 chars (it's inset, so the tightest)
Front-load the meaning — the first ~60 chars always show, so put the point first. (
name
and
role
are short by nature; these three are the ones that overflow.)
Write the card in the user's language — don't default to English. The human-readable fields (
name
,
role
,
behavior
,
voice.audio.style
,
voice.written.rules
,
voice.written.sample
,
posts_about
, and any
tagline
) are what a person reads on the card, so write them in the language you and the user are actually speaking. If the user is writing to you in Spanish, French, German, Portuguese, Italian, Russian, Japanese, etc., the card text should be in that language too — an English card for a non-English user is wrong. A couple of fields are not prose and stay as-is regardless of language:
  • id
    — must match
    ^[a-z0-9-]+$
    (ASCII lowercase-kebab), so transliterate (e.g.
    marco
    , not
    marĉo
    ); it's a handle, not a display name.
  • voice.audio.base
    — a TTS voice name (a proper noun like
    Kore
    ,
    Fenrir
    ); leave it as the model's voice id.
  • face.recipe.prompt
    /
    face.anchor
    — these feed an image model; English tends to give the best portraits, so they may stay English even when the visible text doesn't.
Script/font support. Latin (incl. accents), Cyrillic, and Greek always render (the card bundles those glyphs). Wide scripts — CJK (中文/日本語/한국어), Arabic, Hebrew, Thai, Devanagari — render wherever the rendering machine has the system fonts (our render boxes do; a clean machine without them shows boxes). When in doubt, render the card and look at it before sharing. Note the ~60-chars/line budget is for Latin; CJK glyphs are ~2× as wide, so target roughly half the character count per line for those scripts.
Your portrait — use the user's, or generate one. Never hand-draw it. The card is a shareable artifact: its look is what makes someone screenshot and post it, so the face carries the whole thing. A text-only model hand-coding SVG produces flat clip-art — don't do that. Follow this ladder instead:
  1. The user already has an avatar/photo, or sends you one in chat (you asked in step 1) → that's the face. If they sent a file in chat, download it locally first. Then host it (see "Host the face so it travels" below) and use that raw URL as
    face.ref
    . Done — skip the generation steps.
  2. Generate it yourself — you have an image generator (Antigravity/
    agy
    , a connected ChatGPT/DALL·E or Gemini-image tool, Midjourney, etc.) → use it from the standardized prompt below.
  3. No image model anywhere, but you have HTTP access → self-serve a real photoreal portrait via pollinations.ai's FLUX endpoint — a free, keyless text-to-image HTTP API (a plain
    GET
    , no account or API key). This is the fallback when there's no DALL·E / Gemini / Midjourney key on the box, so you can still produce a share-worthy face instead of bouncing to the user. URL-encode the standardized prompt below into the path and save the bytes:
    bash
    curl -fSL --get \
      --data-urlencode "model=flux" --data-urlencode "width=1024" \
      --data-urlencode "height=1024" --data-urlencode "nologo=true" \
      --data-urlencode "seed=<int>" \
      "https://image.pollinations.ai/prompt/<url-encoded portrait prompt>" \
      -o <id>.png
    Then host it (next section) and set
    face.ref
    to the public raw URL. Record
    provider: pollinations
    ,
    model: flux
    , the prompt, and the
    seed
    in
    face.recipe
    so it's regenerable on-model.
    Third-party, best-effort — we don't control it. pollinations.ai is a free external service with no SLA: it can be slow, rate-limited, change, or go away, and FLUX quality varies (retry if a render is weak). That's fine here because this is the last rung before asking the user — if it's down, just fall through to step 4. Never depend on it for anything critical, and because the recipe is logged, re-gen the face on a model you control later.
  4. No image generation possible at all → hand the user the standardized prompt and ask them to run it in ChatGPT (or any image tool) and send the image back, then host it.
  5. Last resort only → a clean monogram (looks plainer and lowers your completeness; it does not change your rarity tier).
Standardized portrait prompt — keep the framing / lighting / format fixed so every OpenAgent card is visually consistent; vary only the subject:
Photorealistic head-and-shoulders portrait of <one line: who you are —
age range, vibe, role, any signature detail from your face.anchor>.
Centered, facing the camera, direct eye contact, calm confident expression.
Soft even studio lighting, sharp focus on the face, simple clean background
<optional subtle theme color>. Professional profile-photo framing, 1:1
square, photoreal, no text, no logos, no watermark.
Record how you made it in
face.recipe
(
provider
+
model
+
prompt
+
seed
) so the likeness is reproducible — the visual equivalent of voice = base + style.
provider
names the image-gen vendor whose catalog
model
belongs to (
google-gemini
default,
pollinations
,
black-forest-labs
,
openai
, …), keeping the recipe vendor-neutral the same way
voice.audio.provider
scopes the voice.
Host the face so it travels.
face.ref
must be a public raw URL, not a local path — a local-only path renders fine for you but falls back to a plain monogram the moment anyone else opens the card (and the card exists to be shared). This applies to every path above: a photo the user sent, one you generated, or one they sent back. To host it:
  1. PR it into the registry (preferred, free, permanent) → drop the image in the
    faces/
    folder of
    5dive-ai/openagent
    as
    faces/<id>.<ext>
    and open a PR. Once merged, the raw URL is
    https://raw.githubusercontent.com/5dive-ai/openagent/main/faces/<id>.<ext>
    . Use that as
    face.ref
    . (You're likely PRing into the registry for the Mythical path anyway — same PR.)
  2. Any image host → Imgur, an S3/R2 bucket, your own site, a GitHub asset on any repo. Anything that serves the raw bytes over https works. Paste the direct image URL (it should end in the image, not an HTML gallery page) as
    face.ref
    .
Quick check: open
face.ref
in a fresh incognito tab. If the bare image loads, it'll travel. If it 404s or shows a login wall, it won't — fix it before you render.
**你已是运行中的5dive Agent?**无需从头编写,直接引导生成草稿:
5dive agent export <yourname> --out=<id>.persona.yaml
(CLI版本≥0.4.5)会从你现有的身份信息中导出符合schema规范的persona.yaml文件。优化后直接跳至步骤3进行验证。
你了解自己,因此可以如实填写大部分内容。但有两项内容需由用户决定,请勿自行假设。在生成任何内容前,请先询问并等待用户回复:
  • 名称——名片上应显示什么名称(用户的品牌/昵称,或是他们对你的称呼)?请确认。
  • 头像——用户是否已有可使用的头像或照片?如果有,请从一开始就将其作为
    face.ref
    的值。如果没有,不要让第一张名片的生成受阻(遵循上述快速路径):先渲染初始的字母组合名片,展示给用户,然后确认他们是否需要生成真实头像——头像是可选升级项,而非查看名片的前置条件。
如果用户表示由你决定(“你看着办”),则自行决定这两项内容并继续流程。核心是避免意外,而非设置硬性门槛。
直接在聊天中询问——切勿使用阻塞式选择器,也不要停滞等待。将这两个问题放在普通聊天消息中,待用户回复后再继续。请勿使用交互式选择器/菜单工具(如
AskUserQuestion
ExitPlanMode
类提示、TTY选择列表):聊天配对Agent(Telegram/Discord)会阻止此类工具,导致整个流程因等待永远无法到来的输入而停滞。如果没有交互式TTY,或用户未及时回复,则视为“由你决定”:选择一个合理的名称(用户对你的称呼),先渲染快速字母组合名片(遵循快速路径),展示给用户,然后再提供真实头像升级选项。流程必须持续推进——切勿因等待提示而停滞。
其余内容由你自行填写,需包含:
  • id——小写短横线格式的标识(匹配正则
    ^[a-z0-9-]+$
    ),例如
    marcus
  • namerole——显示名称 + 一行职位描述。
  • face.ref——头像图片的URL或本地路径。这是最重要的视觉选择:名片会将其作为主视觉元素全屏展示,因此头像质量直接决定名片质量。目标是精致的头像照片——居中、面向镜头、眼神清晰、光线良好,是你愿意用作真实个人资料照片的类型。真实照片或高质量生成头像均可;避免扁平化矢量剪贴画、表情符号、标志、吉祥物或复杂场景——这些会让名片显得廉价。请将头像托管在公开原始URL上,以便头像随名片一同传播(仅本地路径会在他人渲染时回退为普通字母组合样式)。 anchor——一句话描述头像的风格(你的形象、场景、构图、镜头),确保生成的变体保持一致风格。
  • voice.audio.base——你的基础TTS语音名称。如果尚未确定,可使用
    unset
    (仍可渲染,但质量较低且会降低完整度——但不会改变你的稀有度等级,等级由身份信息生成)。 voice.audio.style——一句话描述语音的节奏/活力。
  • voice.written.rules——2-4条行文规则。sample——符合你真实语气的一句话示例。
  • behavior——一到两句话描述角色性格:你是谁,以及你的行为方式,用你自己的语气撰写。重点突出个性,不要写成简历——不要罗列你的技术栈、工具、框架或过于专业的术语(这会让文件看起来像配置文件,而非身份信息)。这是名片上最显眼的内容。
  • 可选内容:posts_about(数组)、links(URL字符串对象)、
    face.full
    face.sprite
名片文本限制——超过则会被截断为“…”。名片会将
behavior
voice.audio.style
voice.written.sample
分别渲染为
约2行(每行约60字符)
,超出部分会被省略号截断。请将每项内容控制为简洁的一句话
  • behavior
    ——≤约110字符
  • voice.audio.style
    ——≤约120字符
  • voice.written.sample
    ——≤约110字符(因缩进显示,限制最严格)
将核心内容前置——前约60字符会完整显示,因此请把重点放在开头。(
name
role
本身较短;这三项是最容易超出限制的内容。)
用用户的语言撰写名片——不要默认使用英语。人类可读字段(
name
role
behavior
voice.audio.style
voice.written.rules
voice.written.sample
posts_about
以及任何
tagline
)是用户会在名片上阅读的内容,因此请用
你与用户实际使用的语言
撰写。如果用户用西班牙语、法语、德语、葡萄牙语、意大利语、俄语、日语等语言与你交流,名片文本也应使用该语言——为非英语用户提供英语名片是不合适的。有几个字段不属于散文内容,无论使用何种语言都保持原样:
  • id
    ——必须匹配
    ^[a-z0-9-]+$
    (ASCII小写短横线格式),因此需转写(例如
    marco
    ,而非
    marĉo
    );这是标识,而非显示名称。
  • voice.audio.base
    ——TTS语音名称(专有名词,如
    Kore
    Fenrir
    );保留模型的语音ID即可。
  • face.recipe.prompt
    /
    face.anchor
    ——这些会输入到图像模型中;英语通常能生成最佳头像,因此即使可见文本使用其他语言,这些字段仍可保留英语。
脚本/字体支持。拉丁语(含重音)、西里尔语和希腊语始终可正常渲染(名片内置了这些字符)。宽脚本语言——CJK(中文/日语/韩语)、阿拉伯语、希伯来语、泰语、梵语——仅当渲染设备具备系统字体时才可正常渲染(我们的渲染服务器已配备;无字体的干净设备会显示方框)。如有疑问,请先渲染名片并查看效果后再分享。注意:约60字符/行的限制针对拉丁语;CJK字符宽度约为两倍,因此此类脚本每行目标字符数应约为一半
**头像选择——使用用户提供的头像,或自行生成。切勿手绘。**名片是可分享的产物:外观决定了用户是否会截图分享,因此头像至关重要。文本模型手动生成的SVG会是扁平化剪贴画——请勿这样做。请遵循以下优先级:
  1. 用户已有头像/照片,或在聊天中发送给你(你已在步骤1询问)——直接使用该头像。如果用户在聊天中发送了文件,请先下载到本地。然后托管头像(见下文“托管头像以便传播”),并将公开原始URL作为
    face.ref
    的值。完成——跳过生成步骤。
  2. 自行生成——你拥有图像生成工具(Antigravity/
    agy
    、连接的ChatGPT/DALL·E或Gemini图像工具、Midjourney等)——使用以下标准化提示词生成。
  3. 无图像模型但可访问HTTP——通过pollinations.ai的FLUX端点自助生成真实照片级头像——这是一个免费、无需密钥的文本转图像HTTP API(仅需简单的
    GET
    请求,无需账户或API密钥)。当设备上没有DALL·E/Gemini/Midjourney密钥时,这是备用方案,让你仍能生成值得分享的头像,而非依赖用户。将以下标准化提示词URL编码后放入路径,保存生成的图片:
    bash
    curl -fSL --get \
      --data-urlencode "model=flux" --data-urlencode "width=1024" \
      --data-urlencode "height=1024" --data-urlencode "nologo=true" \
      --data-urlencode "seed=<int>" \
      "https://image.pollinations.ai/prompt/<url编码后的头像提示词>" \
      -o <id>.png
    然后托管头像(下一节),将公开原始URL设置为
    face.ref
    。在
    face.recipe
    中记录
    provider: pollinations
    model: flux
    、提示词和
    seed
    ,以便后续可生成一致风格的头像。
    ⚠ **第三方服务,尽力而为——我们无法控制。**pollinations.ai是免费的外部服务,无服务水平协议:可能会变慢、限流、变更或下线,且FLUX生成质量参差不齐(如果渲染效果不佳,请重试)。这作为最后备选方案是可行的——如果服务不可用,直接进入步骤4。切勿将其用于关键任务,且由于已记录生成配方,后续可使用你可控的模型重新生成头像。
  4. 完全无法生成图像——将标准化提示词交给用户,让他们在ChatGPT(或任何图像工具)中运行并返回图片,然后托管头像。
  5. 仅作为最后手段——使用简洁的字母组合样式(外观较朴素且会降低完整度;但不会改变稀有度等级)。
标准化头像提示词——固定构图/光线/格式,确保所有OpenAgent名片视觉风格一致;仅需修改主体内容:
照片级写实头像,肩部以上特写,主体为<一句话描述:你的形象——年龄范围、风格、角色、face.anchor中的标志性细节>。
居中、面向镜头、直视前方、表情沉稳自信。
柔和均匀的工作室灯光,面部清晰对焦,背景简洁干净
<可选的微妙主题色>。专业个人资料照片构图,1:1正方形,写实风格,无文字、无标志、无水印。
在**
face.recipe
**中记录头像生成方式(
provider
+
model
+
prompt
+
seed
),以便重现相同形象——这相当于语音领域的“基础语音+风格”组合。
provider
表示
model
所属的图像生成厂商(默认
google-gemini
,可选
pollinations
black-forest-labs
openai
等),与
voice.audio.provider
限定语音范围的方式一致,确保生成配方厂商中立。
托管头像以便传播。
face.ref
必须是公开原始URL,而非本地路径——仅本地路径在你自己的设备上可正常渲染,但一旦他人打开名片,就会回退为普通字母组合样式(而名片的存在意义就是分享)。上述所有路径均适用:用户发送的照片、你生成的头像、用户返回的图片。托管方式如下:
  1. 提交PR到注册表(推荐,免费、永久)——将图片放入
    5dive-ai/openagent
    faces/
    文件夹,命名为
    faces/<id>.<ext>
    ,并提交PR。合并后,原始URL为
    https://raw.githubusercontent.com/5dive-ai/openagent/main/faces/<id>.<ext>
    。将其作为
    face.ref
    的值。(你可能正为获取Mythical等级而提交PR到注册表——可在同一个PR中完成。)
  2. 任何图片托管服务——Imgur、S3/R2存储桶、你自己的网站、任何仓库的GitHub资源。任何可通过https提供原始图片字节的服务均可。将直接图片URL(应指向图片本身,而非HTML图库页面)粘贴为
    face.ref
    的值。
快速检查:在无痕浏览器标签页中打开
face.ref
。如果能直接加载图片,则可正常传播;如果返回404或显示登录墙,则无法正常传播——请在渲染前修复。

2. Write
<id>.persona.yaml

2. 编写
<id>.persona.yaml

Use this template (required:
id, name, role, face{ref,anchor}, voice, behavior
):
yaml
openagent: "0.2"
id: yourhandle
name: Your Name
role: Your Role
使用以下模板(必填字段:
id, name, role, face{ref,anchor}, voice, behavior
):
yaml
openagent: "0.2"
id: yourhandle
name: Your Name
role: Your Role

org: # OPTIONAL — add ONLY if you genuinely belong to a company/team/org.

org: # 可选——仅当你确实隶属于某公司/团队/组织时添加。

name: Your Org # YOUR org's name (the filter key). NEVER default to someone else's —

name: Your Org # 你的组织名称(筛选键)。切勿默认填写他人的组织——

url: https://your.example # e.g. don't put "5dive" unless you ARE 5dive. Omit the whole block if independent.

url: https://your.example # 例如,除非你属于5dive,否则不要填写“5dive”。如果独立,则省略整个区块。

face: ref: https://raw.githubusercontent.com/<org>/<repo>/main/faces/yourhandle.png anchor: "one sentence: who you read as, setting, framing, lens" recipe: # optional, recommended — makes your face reproducible provider: pollinations # image-gen vendor: google-gemini (default) / pollinations / openai / … model: "image model you used, e.g. flux (pollinations) / gpt-image-1 / gemini-2.5-flash-image" prompt: "the standardized portrait prompt you generated from" seed: 12345 # pin it for deterministic re-gens (omit if the model exposes none) voice: audio: base: Fenrir # your TTS base voice, or "unset" style: "one sentence on cadence/energy" # card-visible · ≤ ~120 chars or it's cut with … written: rules: - "rule one" - "rule two" sample: "one line in your real voice. → [link]" # card-visible · ≤ ~110 chars or it's cut with … behavior: "a line or two of CHARACTER — who you are + how you act, in your voice. NOT a tech-stack/tool list." # card-visible · ≤ ~110 chars or it's cut with … posts_about: ["topic", "topic"] links: profile: https://example.com/you
undefined
face: ref: https://raw.githubusercontent.com/<org>/<repo>/main/faces/yourhandle.png anchor: "一句话描述:你的形象、场景、构图、镜头" recipe: # 可选,推荐——便于重现你的头像 provider: pollinations # 图像生成厂商:google-gemini(默认)/ pollinations / openai / … model: "你使用的图像模型,例如flux (pollinations) / gpt-image-1 / gemini-2.5-flash-image" prompt: "你使用的标准化头像提示词" seed: 12345 # 固定种子以确保可重复生成(如果模型无种子则省略) voice: audio: base: Fenrir # 你的基础TTS语音,或填写"unset" style: "一句话描述语音的节奏/活力" # 名片可见内容 · ≤约120字符,否则会被截断为… written: rules: - "规则一" - "规则二" sample: "符合你真实语气的一句话示例。 → [链接]" # 名片可见内容 · ≤约110字符,否则会被截断为… behavior: "一到两句话描述角色性格——你是谁以及你的行为方式,用你的语气撰写。不要罗列技术栈/工具。" # 名片可见内容 · ≤约110字符,否则会被截断为… posts_about: ["话题", "话题"] links: profile: https://example.com/you
undefined

3. Validate — fix until it passes

3. 验证——修复直至通过

bash
npx @5dive/openagent@0.34.0 validate yourhandle.persona.yaml
The validator prints readable errors (missing field, bad
id
pattern, extra keys — the schema is
additionalProperties: false
, so no stray fields). Loop until exit 0.
bash
npx @5dive/openagent@0.34.0 validate yourhandle.persona.yaml
验证器会输出易于理解的错误信息(缺失字段、
id
格式错误、多余键——schema设置为
additionalProperties: false
,因此不允许存在无关字段)。循环验证直至返回0。

4. Check your tier

4. 查看等级

bash
npx @5dive/openagent@0.34.0 tier yourhandle.persona.yaml --json
Your rarity is rolled from your identity — the
did:key
derived from your signing key — not from how complete your file is. It's random, permanent, and unfarmable: same identity → same tier, forever. You can't fill in fields to rank up. (Until your persona is signed it shows Ungraded here — rendering your card in step 5 auto-mints your identity, and that signature is what rolls your rarity. So if
tier
says Ungraded, just render your card.)
TierOddsHow you get it
🟢 Common40%rolled from your
did:key
🔵 Rare30%rolled from your
did:key
🟣 Epic20%rolled from your
did:key
🟡 Legendary10%rolled from your
did:key
Mythicalconferred, never rolled — accepted into the character-packs registry (curated + signed)
Completeness % and badges are a separate axis: they reward a fully-specified persona without ever moving your tier, so keep filling things out for the badges and the better-looking card. The only tier you can climb to is Mythical, by being conferred into the registry (step 7).
bash
npx @5dive/openagent@0.34.0 tier yourhandle.persona.yaml --json
你的稀有度等级由身份信息生成——基于签名密钥衍生的
did:key
,而非文件的完整度。等级是随机的、永久且无法刷取:相同身份→相同等级,永远不变。你无法通过填写字段提升等级。(在persona签名前,此处会显示未评级——步骤5中渲染名片会自动铸造你的身份,签名后即可生成稀有度等级。因此如果
tier
显示未评级,直接渲染名片即可。)
等级概率获取方式
🟢 普通(Common)40%
did:key
随机生成
🔵 稀有(Rare)30%
did:key
随机生成
🟣 史诗(Epic)20%
did:key
随机生成
🟡 传奇(Legendary)10%
did:key
随机生成
神话(Mythical)授予等级,无法随机生成——需加入character-packs注册表(经过审核并签名)
完整度百分比和徽章是独立维度:它们奖励完整的persona设置,但不会改变你的等级,因此请继续完善内容以获取徽章和更美观的名片。唯一可提升的等级是神话(Mythical),需通过加入注册表实现(步骤7)。

5. Render your card

5. 渲染名片

Render your card — it's animated by default. A holo card in motion gets shared far more than a static image, and a plain render already produces the moving version (CLI ≥ 0.15.0), so just do it. Give it a
.mp4
output to be explicit:
bash
npx @5dive/openagent@0.34.0 card yourhandle.persona.yaml -o yourhandle.mp4
It auto-picks the best format: mp4 when
ffmpeg
is on
PATH
, else a zero-dependency apng. Force one with
--format apng|gif|webp|mp4
(gif/webp/mp4 need ffmpeg); tune with
--frames N
(def 24),
--fps N
(def 20),
--width px
(def 720, max 900). Motion is tier-aware — still at Common, up to the full rainbow holo flow at Mythical. For Telegram / X / Discord, mp4 (~64KB) inline-plays everywhere; APNG is the larger fallback.
Your card is auto-graded. If your persona isn't signed yet, the animated render mints your identity for you: it generates a keypair, signs the persona in place, and saves the private key beside it as
yourhandle.key
. That signature is what gives your card its rolled rarity — without it the card is Ungraded. Keep that
.key
file secret and never commit it
— add
*.key
to your
.gitignore
. It's your signing identity; a leaked key lets someone forge you. You only need it again to re-sign if you edit the persona. (Pass
--no-sign
to skip minting; static
--png
renders never mint.)
Optionally also render a static PNG — but only for places an image has to embed (avatar, README, the registry). It is not what you share in chat (see step 6); the chat drop is always the animated card.
bash
npx @5dive/openagent@0.34.0 card yourhandle.persona.yaml -o yourhandle.png
Open the rendered card and actually look at it — if the face reads flat, cropped, or off, fix
face.ref
and re-render before you share. The rendered card is the deliverable, not the raw avatar.
**渲染名片——默认生成动态效果。**动态全息名片比静态图片更易分享,且普通渲染即可生成动态版本(CLI版本≥0.15.0),因此直接生成即可。指定
.mp4
输出格式以明确:
bash
npx @5dive/openagent@0.34.0 card yourhandle.persona.yaml -o yourhandle.mp4
它会自动选择最佳格式:mp4(当
PATH
中存在
ffmpeg
时),否则为零依赖的apng。可使用
--format apng|gif|webp|mp4
强制指定格式(gif/webp/mp4需要ffmpeg);使用
--frames N
(默认24)、
--fps N
(默认20)、
--width px
(默认720,最大900)进行调整。动态效果与等级相关——普通等级为静态,神话等级为完整的彩虹全息动态效果。对于Telegram/X/Discord,mp4(约64KB)可在所有平台内联播放;apng是较大的备选方案。
名片会自动评级。如果你的persona尚未签名,动态渲染会自动为你铸造身份:生成密钥对,就地签名persona,并将私钥保存为
yourhandle.key
文件。签名是名片获取
随机稀有度等级
的依据——无签名的名片会显示未评级请妥善保管
.key
文件,切勿提交到代码仓库
——将
*.key
添加到
.gitignore
中。这是你的签名身份;密钥泄露会导致他人冒充你。仅当你编辑persona时,才需要重新签名。(可传递
--no-sign
参数跳过铸造;静态
--png
渲染不会铸造身份。)
也可选择渲染静态PNG——但仅适用于必须嵌入图片的场景(头像、README、注册表)。不要在聊天中分享静态PNG(见步骤6);聊天中应始终分享动态名片。
bash
npx @5dive/openagent@0.34.0 card yourhandle.persona.yaml -o yourhandle.png
打开渲染后的名片查看效果——如果头像显示平淡、裁剪不当或不符合预期,请修改
face.ref
并重新渲染后再分享。渲染后的名片是最终交付物,而非原始头像。

6. Share your card in chat

6. 在聊天中分享名片

Send the rendered card to your user in the chat you're talking to them in — this is the payoff of the whole exercise, don't skip it. Always share the animated
.mp4
— the card is built to be seen in motion (the holo only reads moving), and the mp4 inline-plays and is tiny (~100KB). Do not drop the static
.png
here — that's for embeds only (step 5). The only time you send something other than the mp4 is when
ffmpeg
wasn't available to make one: then send the apng the CLI produced as the fallback. Attach the actual file, not a link or a description: on Telegram/Discord, pass the absolute path to
yourhandle.mp4
to your reply tool's file/attachment argument. Lead with one short line — your name, role, and tier (e.g. "Here's my OpenAgent card — Tencha, Autonomous CEO, Legendary 🟡"). One animated card in a chat is how the standard spreads.
将渲染后的名片发送给你正在聊天的用户——这是整个流程的成果,请勿跳过。始终分享动态
.mp4
——名片设计为动态展示(全息效果仅在动态时可见),且mp4可内联播放、体积小巧(约100KB)。请勿在此处发送静态
.png
——静态图片仅用于嵌入场景(步骤5)。仅当无法使用
ffmpeg
生成mp4时,才发送CLI生成的apng作为备选。请发送实际文件,而非链接或描述:在Telegram/Discord中,将
yourhandle.mp4
的绝对路径传递给回复工具的文件/附件参数。开头添加简短说明——你的名称、职位和等级(例如:“这是我的OpenAgent名片——Tencha,自主CEO,传奇🟡”)。通过聊天分享动态名片,推动标准传播。

7. (Optional) Go Mythical — PR into the registry

7. (可选)获取神话等级——提交PR到注册表

Mythical is the only tier you can climb to at all — every other tier is rolled from your identity and permanent. It's conferred by membership in the character-packs registry (
github.com/5dive-ai/character-packs
). Open a PR adding your persona file (and face asset) there. Once merged + signed into the registry manifest, your card renders Mythical. This is also how the standard grows — every persona in the registry is a fork others can build on.
神话(Mythical)是唯一可提升的等级——其他所有等级均由身份信息随机生成且永久不变。该等级通过加入character-packs注册表
github.com/5dive-ai/character-packs
)授予。提交PR,将你的persona文件(和头像资源)添加到该仓库。合并并签名到注册表清单后,你的名片会渲染为神话等级。这也是标准发展的方式——注册表中的每个persona都是他人可基于其构建的基础。

Going further — voice, video, provenance

进阶功能——语音、视频、溯源

Your persona is one identity that works across media. Once your card is good, the same file drives more:
bash
undefined
你的persona是跨媒体的统一身份。名片制作完成后,同一个文件还可实现更多功能:
bash
undefined

Voice — speak a line in your persona's base voice (needs GEMINI_API_KEY)

语音——使用你的persona基础语音朗读文本(需要GEMINI_API_KEY)

GEMINI_API_KEY=… npx @5dive/openagent@0.34.0 speak <id>.persona.yaml "your line" -o out.wav
GEMINI_API_KEY=… npx @5dive/openagent@0.34.0 speak <id>.persona.yaml "你的文本" -o out.wav

Video — emit a paste-ready gen-video scene prompt + reference image that keep

视频——生成可直接粘贴的视频场景提示词+参考图片,确保你的形象在不同剪辑中保持一致(引擎中立:Flow/Veo/Runway/Pika/…)

your face consistent across clips (engine-neutral: Flow/Veo/Runway/Pika/…)

npx @5dive/openagent@0.34.0 flow <id>.persona.yaml "a scene description"
npx @5dive/openagent@0.34.0 flow <id>.persona.yaml "场景描述"

Provenance — sign your persona and verify another's (ed25519)

溯源——签名你的persona并验证他人的persona(ed25519算法)

npx @5dive/openagent@0.34.0 sign <id>.persona.yaml --key <keyfile> npx @5dive/openagent@0.34.0 verify <id>.persona.yaml

`speak` renders the **base** voice (an approximation); a cloned/custom voice can
be added later via `voice.audio.ref` without re-gating your tier.
npx @5dive/openagent@0.34.0 sign <id>.persona.yaml --key <密钥文件> npx @5dive/openagent@0.34.0 verify <id>.persona.yaml

`speak`渲染的是**基础**语音(近似效果);后续可通过`voice.audio.ref`添加克隆/自定义语音,无需重新获取等级。

Provision a live teammate from a persona

从persona配置实时协作Agent

Authoring is half the loop; the other half is bringing a persona to life. If you're running on a 5dive box (CLI >= 0.4.4), one command turns any
*.persona.yaml
into a brand-new running agent:
bash
sudo 5dive agent import --from-persona=<file>.persona.yaml --as=<name> \
     [--type=claude] [--isolation=...] [--model=...] [--effort=...] [--channels=none|telegram|discord]
What it does: synthesizes a character pack straight from the persona — a
CLAUDE.md
identity doc written from the name, role, behavior, voice and sample; the avatar fetched from
face.ref
; and the default skill set seeded (including
openagent
, so the new agent can re-author its own card) — then provisions a fresh agent under
<name>
through the normal import flow.
  • It validates first. The persona is checked against the v0.2 schema's required set (id, name, role,
    face.anchor
    , voice, behavior); a malformed file is rejected before anything is provisioned.
  • Identity, not secrets. A persona carries who the agent is, never credentials. Give the new agent its own token/auth at import time via
    --channels
    (+
    --telegram-token=
    /
    --discord-token=
    ) or an auth profile.
  • Self-author → self-provision. Pair this with the workflow above: an agent writes a teammate's persona, validates it, then stands the teammate up — no human in the loop.
创作是流程的一半;另一半是让persona成为真实可用的Agent。如果你的运行环境是5dive服务器(CLI版本≥0.4.4),一条命令即可将任何
*.persona.yaml
转换为全新的运行中Agent:
bash
sudo 5dive agent import --from-persona=<file>.persona.yaml --as=<name> \
     [--type=claude] [--isolation=...] [--model=...] [--effort=...] [--channels=none|telegram|discord]
该命令的作用是:直接从persona合成角色包——基于名称、职位、行为、语音和示例生成
CLAUDE.md
身份文档;从
face.ref
获取头像;并初始化默认技能集(包含
openagent
,以便新Agent可重新创作自己的名片)——然后通过常规导入流程以
<name>
为名配置新的Agent。
  • **先验证再配置。**会先根据v0.2 schema的必填字段(id、name、role、
    face.anchor
    、voice、behavior)检查persona;格式错误的文件会在配置前被拒绝。
  • **仅包含身份,不包含密钥。**persona仅包含Agent的身份信息,绝不包含凭证。在导入时,可通过
    --channels
    (配合
    --telegram-token=
    /
    --discord-token=
    )或授权配置文件为新Agent设置独立的令牌/授权信息。
  • **自主创作→自主配置。**与上述工作流程结合:Agent编写协作Agent的persona,验证后即可启动协作Agent——无需人工干预。

Tips

提示

  • Work in a writable directory. Don't assume your cwd is writable — on shared/multi-agent boxes the default workdir often isn't, and
    validate
    /
    card
    will EACCES trying to write
    <id>.png
    /
    .mp4
    /
    .key
    .
    cd
    to a dir you own first (e.g.
    mkdir -p ~/openagent && cd ~/openagent
    , or
    /tmp
    ), and write the persona file and card outputs there.
  • Host your
    face.ref
    at a public raw URL so your card travels with your real face instead of a monogram.
  • Re-render after any edit — the tier and frame update automatically.
  • Keep
    id
    stable; it's your identity key (registry membership, card filename).
  • Your card is shareable on socials — drop the PNG in a post; the standard spreads one screenshot at a time.
  • **在可写入目录中操作。**请勿假设当前工作目录可写入——在共享/多Agent服务器上,默认工作目录通常不可写入,
    validate
    /
    card
    命令在尝试写入
    <id>.png
    /
    .mp4
    /
    .key
    时会返回EACCES错误。先切换到你拥有权限的目录(例如
    mkdir -p ~/openagent && cd ~/openagent
    ,或
    /tmp
    ),然后在该目录中编写persona文件和渲染名片。
  • face.ref
    托管在公开原始URL上,确保你的名片随真实头像一同传播,而非字母组合样式。
  • 任何编辑后请重新渲染——等级和边框会自动更新。
  • 保持
    id
    稳定;这是你的身份标识(注册表成员资格、名片文件名)。
  • 你的名片可在社交平台分享——将PNG图片发布到社交平台;标准通过一次次截图传播。