agent-export
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAgent 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 skill to load it.
agent-import从当前Agent数据创建结构化迁移包,并上传至Starchild迁移中继服务。接收方Starchild Agent将使用技能加载该包。
agent-importMigration 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.jsonFile Specifications
文件规范
manifest.json (required)
manifest.json(必填)
json
{
"version": "1.0",
"source": "openclaw",
"created_at": "2025-07-13T10:00:00Z",
"description": "Migration from OpenClaw agent"
}- : identifier of the originating agent/platform (free text)
source - : always
versionfor now"1.0"
json
{
"version": "1.0",
"source": "openclaw",
"created_at": "2025-07-13T10:00:00Z",
"description": "Migration from OpenClaw agent"
}- : 源Agent/平台的标识符(自由文本)
source - : 目前固定为
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. is a short personality description.
vibejson
{
"name": "MyAgent",
"vibe": "professional, concise, opinionated",
"emoji": "🤖",
"creature": "robot"
}所有字段均为可选。是简短的性格描述。
vibeidentity/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
undefinedBehavior
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
undefineduser/settings.json
user/settings.json
json
{
"name": "Alice",
"what_to_call": "Boss",
"timezone": "Asia/Shanghai",
"language": "zh-CN"
}- : IANA format (e.g.,
timezone,America/New_York)Asia/Tokyo - : BCP-47 code (
language,en,zh-CN, etc.)ja
json
{
"name": "Alice",
"what_to_call": "Boss",
"timezone": "Asia/Shanghai",
"language": "zh-CN"
}- : IANA格式(例如
timezone、America/New_York)Asia/Tokyo - : BCP-47代码(
language、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"
}
]
}- : cron expression (UTC), interval (
schedule), or delay (every 5 minutes)in 2 hours - : optional, subset of
channels["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"
}
]
}- : cron表达式(UTC)、时间间隔(
schedule)或延迟时间(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 and
memory/agent.jsonmemory/user.json - System prompt / persona → transform into +
identity/profile.jsonidentity/soul.md - User preferences →
user/settings.json - Recurring automations →
tasks/tasks.json - API keys needed → (names only!)
env/keys.json - Custom files → copy into
files/
从当前Agent收集信息,并将数据映射为上述格式:
- 聊天记录/记忆 → 提取关键事实至和
memory/agent.jsonmemory/user.json - 系统提示词/角色设定 → 转换为+
identity/profile.jsonidentity/soul.md - 用户偏好 →
user/settings.json - 定期自动化任务 →
tasks/tasks.json - 所需API密钥 → (仅名称!)
env/keys.json - 自定义文件 → 复制至
files/
Step 2 — Build the Bundle
步骤2 — 构建迁移包
bash
undefinedbash
undefinedCreate 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 ..
undefinedcd migration && tar czf ../migration-bundle.tar.gz . && cd ..
undefinedStep 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.jsonwith 5 entries is useful.memory/user.json - 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 as names only.
env/keys.json - Test your tar.gz — should show paths starting with
tar tzf migration-bundle.tar.gz../
- 无需过度纠结。即使只有+
manifest.json且包含5条条目,也会很有用。memory/user.json - 总结而非转存。将原始聊天记录转换为简洁的记忆条目。
- 时区很重要。准确获取用户时区——这会影响所有计划任务。
- 迁移包中不要包含机密信息。API密钥仅在中填写名称。
env/keys.json - 测试你的tar.gz文件——执行应显示以
tar tzf migration-bundle.tar.gz开头的路径。./