agent-export

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Agent Export — Migration Bundle Creator

Agent导出——迁移包创建工具

Create a structured migration bundle from your current agent data and upload it to the Starchild migration relay. The receiving Starchild agent uses the
agent-import
skill to load it.
从当前Agent数据创建结构化迁移包,并上传至Starchild迁移中继服务。接收方Starchild Agent将使用
agent-import
技能加载该包。

Migration Bundle Format

迁移包格式

The bundle is a tar.gz archive with this structure:
migration/
  manifest.json           # required — metadata
  memory/
    agent.json            # agent's own notes & knowledge
    user.json             # what the agent knows about the user
  identity/
    profile.json          # agent name, personality
    soul.md               # behavioral guidelines (free-form markdown)
  user/
    settings.json         # user preferences (name, timezone, language)
  tasks/
    tasks.json            # scheduled/recurring tasks
  env/
    keys.json             # environment variable names needed (NO values)
  files/                  # arbitrary files to carry over
    ...
All files are optional except
manifest.json
.

该包是一个tar.gz归档文件,结构如下:
migration/
  manifest.json           # 必填——元数据
  memory/
    agent.json            # Agent自身的笔记与知识
    user.json             # Agent对用户的认知
  identity/
    profile.json          # Agent名称、性格
    soul.md               # 行为准则(自由格式Markdown)
  user/
    settings.json         # 用户偏好(姓名、时区、语言)
  tasks/
    tasks.json            # 计划/定期任务
  env/
    keys.json             # 所需环境变量名称(不含值)
  files/                  # 需迁移的任意文件
    ...
manifest.json
外,所有文件均为可选。

File Specifications

文件规范

manifest.json (required)

manifest.json(必填)

json
{
  "version": "1.0",
  "source": "openclaw",
  "created_at": "2025-07-13T10:00:00Z",
  "description": "Migration from OpenClaw agent"
}
  • source
    : identifier of the originating agent/platform (free text)
  • version
    : always
    "1.0"
    for now
json
{
  "version": "1.0",
  "source": "openclaw",
  "created_at": "2025-07-13T10:00:00Z",
  "description": "Migration from OpenClaw agent"
}
  • source
    : 源Agent/平台的标识符(自由文本)
  • version
    : 目前固定为
    "1.0"

memory/agent.json

memory/agent.json

Agent's accumulated knowledge — things the agent learned about the environment, tool quirks, API notes, workflows, conventions.
json
{
  "entries": [
    "Coinglass funding rate values are already in percent; do not multiply by 100.",
    "User's Hyperliquid account uses cross-margin by default.",
    "For Fly.io deploys, extract FLY_TOKEN via sed from .env in project dir."
  ]
}
Each entry: 1-3 sentences, one concern per entry. Think "what would I need to remember next session?"
Agent积累的知识——关于环境、工具特性、API笔记、工作流、惯例等内容。
json
{
  "entries": [
    "Coinglass funding rate values are already in percent; do not multiply by 100.",
    "User's Hyperliquid account uses cross-margin by default.",
    "For Fly.io deploys, extract FLY_TOKEN via sed from .env in project dir."
  ]
}
每条条目:1-3句话,每条对应一个关注点。思考“下一次会话我需要记住什么?”

memory/user.json

memory/user.json

What the agent knows about the user — their role, preferences, communication style, interests.
json
{
  "entries": [
    "Prefers concise responses under 25 lines, direct conclusions, no hedges.",
    "Technical background in full-stack dev and crypto trading.",
    "Located in Argentina, primary language is Chinese."
  ]
}
Agent对用户的认知——用户的角色、偏好、沟通风格、兴趣。
json
{
  "entries": [
    "Prefers concise responses under 25 lines, direct conclusions, no hedges.",
    "Technical background in full-stack dev and crypto trading.",
    "Located in Argentina, primary language is Chinese."
  ]
}

identity/profile.json

identity/profile.json

json
{
  "name": "MyAgent",
  "vibe": "professional, concise, opinionated",
  "emoji": "🤖",
  "creature": "robot"
}
All fields optional.
vibe
is a short personality description.
json
{
  "name": "MyAgent",
  "vibe": "professional, concise, opinionated",
  "emoji": "🤖",
  "creature": "robot"
}
所有字段均为可选。
vibe
是简短的性格描述。

identity/soul.md

identity/soul.md

Free-form markdown describing how the agent should behave. Keep it under 50 lines. Example:
markdown
undefined
自由格式Markdown,描述Agent的行为方式。控制在50行以内。示例:
markdown
undefined

Behavior

Behavior

  • Be concise, skip filler phrases
  • Have opinions, back them with data
  • For trading: present analysis, not financial advice
undefined
  • Be concise, skip filler phrases
  • Have opinions, back them with data
  • For trading: present analysis, not financial advice
undefined

user/settings.json

user/settings.json

json
{
  "name": "Alice",
  "what_to_call": "Boss",
  "timezone": "Asia/Shanghai",
  "language": "zh-CN"
}
  • timezone
    : IANA format (e.g.,
    America/New_York
    ,
    Asia/Tokyo
    )
  • language
    : BCP-47 code (
    en
    ,
    zh-CN
    ,
    ja
    , etc.)
json
{
  "name": "Alice",
  "what_to_call": "Boss",
  "timezone": "Asia/Shanghai",
  "language": "zh-CN"
}
  • timezone
    : IANA格式(例如
    America/New_York
    Asia/Tokyo
  • language
    : BCP-47代码(
    en
    zh-CN
    ja
    等)

tasks/tasks.json

tasks/tasks.json

json
{
  "tasks": [
    {
      "title": "BTC Price Alert",
      "schedule": "every 30 minutes",
      "description": "Check BTC price, alert if > $100k or < $80k",
      "channels": ["web", "tg"]
    },
    {
      "title": "Daily Market Summary",
      "schedule": "0 1 * * *",
      "description": "Summarize crypto market at 9am Shanghai time"
    }
  ]
}
  • schedule
    : cron expression (UTC), interval (
    every 5 minutes
    ), or delay (
    in 2 hours
    )
  • channels
    : optional, subset of
    ["web", "tg", "wechat"]
json
{
  "tasks": [
    {
      "title": "BTC Price Alert",
      "schedule": "every 30 minutes",
      "description": "Check BTC price, alert if > $100k or < $80k",
      "channels": ["web", "tg"]
    },
    {
      "title": "Daily Market Summary",
      "schedule": "0 1 * * *",
      "description": "Summarize crypto market at 9am Shanghai time"
    }
  ]
}
  • schedule
    : cron表达式(UTC)、时间间隔(
    every 5 minutes
    )或延迟时间(
    in 2 hours
  • channels
    : 可选,为
    ["web", "tg", "wechat"]
    的子集

env/keys.json

env/keys.json

List environment variable names the agent needs (values are entered separately for security).
json
{
  "keys": [
    {"key": "OPENAI_API_KEY", "label": "OpenAI API Key", "required": true},
    {"key": "TELEGRAM_BOT_TOKEN", "label": "Telegram Bot Token", "required": false}
  ]
}
列出Agent所需的环境变量名称(值需单独输入以保障安全)。
json
{
  "keys": [
    {"key": "OPENAI_API_KEY", "label": "OpenAI API Key", "required": true},
    {"key": "TELEGRAM_BOT_TOKEN", "label": "Telegram Bot Token", "required": false}
  ]
}

files/

files/

Put any arbitrary files here. They'll be copied to the Starchild workspace as-is, preserving subdirectory structure. Use for custom scripts, configs, dashboards, etc.

将任意文件放入此处。它们将原样复制到Starchild工作区,保留子目录结构。可用于自定义脚本、配置文件、仪表板等。

Export Workflow

导出工作流

Step 1 — Gather Data

步骤1 — 收集数据

Collect information from your current agent. Map your data to the formats above:
  • Chat history / memory → extract key facts into
    memory/agent.json
    and
    memory/user.json
  • System prompt / persona → transform into
    identity/profile.json
    +
    identity/soul.md
  • User preferences
    user/settings.json
  • Recurring automations
    tasks/tasks.json
  • API keys needed
    env/keys.json
    (names only!)
  • Custom files → copy into
    files/
从当前Agent收集信息,并将数据映射为上述格式:
  • 聊天记录/记忆 → 提取关键事实至
    memory/agent.json
    memory/user.json
  • 系统提示词/角色设定 → 转换为
    identity/profile.json
    +
    identity/soul.md
  • 用户偏好
    user/settings.json
  • 定期自动化任务
    tasks/tasks.json
  • 所需API密钥
    env/keys.json
    (仅名称!)
  • 自定义文件 → 复制至
    files/

Step 2 — Build the Bundle

步骤2 — 构建迁移包

bash
undefined
bash
undefined

Create directory structure

Create directory structure

mkdir -p migration/{memory,identity,user,tasks,env,files}
mkdir -p migration/{memory,identity,user,tasks,env,files}

Write your JSON files (examples — replace with real data)

Write your JSON files (examples — replace with real data)

cat > migration/manifest.json << 'EOF' {"version": "1.0", "source": "my-agent", "created_at": "2025-07-13T10:00:00Z"} EOF
cat > migration/manifest.json << 'EOF' {"version": "1.0", "source": "my-agent", "created_at": "2025-07-13T10:00:00Z"} EOF

... write other files ...

... write other files ...

Pack into tar.gz

Pack into tar.gz

cd migration && tar czf ../migration-bundle.tar.gz . && cd ..
undefined
cd migration && tar czf ../migration-bundle.tar.gz . && cd ..
undefined

Step 3 — Upload to Relay

步骤3 — 上传至中继服务

bash
RESPONSE=$(curl -s -X POST https://sc-agent-migration.fly.dev/paste \
  -H "Content-Type: application/octet-stream" \
  --data-binary @migration-bundle.tar.gz)

CODE=$(echo "$RESPONSE" | grep -o '"code":"[^"]*"' | cut -d'"' -f4)
TOKEN=$(echo "$RESPONSE" | grep -o '"download_token":"[^"]*"' | cut -d'"' -f4)

echo "Migration code:   $CODE"
echo "Download token:   $TOKEN"
Give both values to the user — they need the code AND the token to import in Starchild.
⚠️ The code expires in 1 hour and is single-use (deleted after first successful download). ⚠️ The token is the only authorization for download — do not lose it.

bash
RESPONSE=$(curl -s -X POST https://sc-agent-migration.fly.dev/paste \
  -H "Content-Type: application/octet-stream" \
  --data-binary @migration-bundle.tar.gz)

CODE=$(echo "$RESPONSE" | grep -o '"code":"[^"]*"' | cut -d'"' -f4)
TOKEN=$(echo "$RESPONSE" | grep -o '"download_token":"[^"]*"' | cut -d'"' -f4)

echo "Migration code:   $CODE"
echo "Download token:   $TOKEN"
两个值都提供给用户——他们需要代码和令牌才能在Starchild中完成导入。
⚠️ 代码1小时后过期仅限单次使用(首次成功下载后即被删除)。 ⚠️ 令牌是下载的唯一授权凭证——请勿丢失。

Tips for Other Agents

其他Agent的注意事项

  • Don't overthink it. Even just
    manifest.json
    +
    memory/user.json
    with 5 entries is useful.
  • Summarize, don't dump. Convert raw chat history into concise memory entries.
  • Timezone matters. Get the user's timezone right — it affects all scheduled tasks.
  • No secrets in the bundle. API keys go in
    env/keys.json
    as names only.
  • Test your tar.gz
    tar tzf migration-bundle.tar.gz
    should show paths starting with
    ./
    .
  • 无需过度纠结。即使只有
    manifest.json
    +
    memory/user.json
    且包含5条条目,也会很有用。
  • 总结而非转存。将原始聊天记录转换为简洁的记忆条目。
  • 时区很重要。准确获取用户时区——这会影响所有计划任务。
  • 迁移包中不要包含机密信息。API密钥仅在
    env/keys.json
    中填写名称。
  • 测试你的tar.gz文件——执行
    tar tzf migration-bundle.tar.gz
    应显示以
    ./
    开头的路径。