Genome Manager
Manages the Genome Evolution Protocol (GEP) genomes - structured success patterns that enable AI agents to self-evolve.
What are Genomes?
Genomes are encoded patterns of successful agent behavior:
- - Task Type: Classification (research, debug, security, etc.)
- Approach: Steps, tools, prompts used
- Outcome: Success metrics, timing, quality scores
- Lineage: Parent genomes, mutation history
When to Use This Skill
Use when:
- - Extracting successful patterns from completed tasks
- Creating reusable genome libraries
- Mutating genomes for optimization
- Tracking genome performance over time
- Preparing genomes for EvoMap sharing
Genome Lifecycle
CODEBLOCK0
Quick Start
CLI Usage
This skill provides a command-line tool for genome management:
CODEBLOCK1
Programmatic Usage
CODEBLOCK2
Genome Schema
CODEBLOCK3
Storage Locations
Default genome storage:
- -
memory/genomes/*.json - Local genome library - INLINECODE1 - Shared across agents
- EvoMap network - Distributed sharing (future)
Mutation Types
| Type | Description | Use Case |
|---|
| evolution | Incremental improvement | Refine existing pattern |
| adaptation |
Context-specific change | Adjust for new domain |
|
specialization | Narrow scope | Optimize for specific sub-task |
|
crossover | Combine two genomes | Merge successful patterns |
Validation Rules
Before saving a genome:
- - [ ] Success rate >= 0.8 (proven pattern)
- [ ] Sample size >= 3 (not luck)
- [ ] No credentials in prompts
- [ ] Steps are reproducible
- [ ] Tools are available
Security
- - Genomes never contain API keys or credentials
- All paths use {baseDir} for portability
- Review before sharing to EvoMap network
- Validate mutations don't break security rules
Integration with EvoAgentX
CODEBLOCK4
Version History
- - 1.0.0: Core genome CRUD operations
- 1.0.1: Added mutation tracking
基因组管理器
管理基因组进化协议(GEP)基因组——使AI智能体能够自我进化的结构化成功模式。
什么是基因组?
基因组是编码后的成功智能体行为模式:
- - 任务类型:分类(研究、调试、安全等)
- 方法:使用的步骤、工具、提示词
- 结果:成功指标、耗时、质量评分
- 谱系:父代基因组、突变历史
何时使用此技能
在以下情况下使用:
- - 从已完成任务中提取成功模式
- 创建可复用的基因组库
- 对基因组进行突变优化
- 追踪基因组随时间变化的性能
- 准备基因组用于EvoMap共享
基因组生命周期
经验 → 编码 → 存储 → 检索 → 采纳 → 进化 → 共享
快速入门
命令行使用
此技能提供用于基因组管理的命令行工具:
bash
创建新基因组
python3 scripts/genome_manager.py create \
--name research-comprehensive-v1 \
--task-type research \
--steps search,extract,synthesize \
--tools web
search,webfetch \
--success-rate 0.95 \
--sample-size 50
列出所有基因组
python3 scripts/genome_manager.py list
获取特定基因组
python3 scripts/genome_manager.py get research-comprehensive-v1
创建突变副本
python3 scripts/genome_manager.py mutate research-comprehensive-v1 \
--type evolution \
--changes added verification step
验证基因组质量
python3 scripts/genome_manager.py validate research-comprehensive-v1
编程使用
python
从技能目录导入
import sys
sys.path.insert(0, {baseDir}/scripts)
from genome
manager import creategenome, list_genomes
以编程方式创建基因组
genome = create_genome(args)
基因组模式
json
{
genome_id: uuid-v4,
name: research-comprehensive-v1,
task_type: research,
version: 1.0.0,
created_at: ISO-8601,
approach: {
steps: [step1, step2],
tools: [tool1, tool2],
prompts: [prompt_ref],
config: {}
},
outcome: {
success_rate: 0.95,
avgdurationseconds: 180,
user_satisfaction: 0.92,
sample_size: 50
},
lineage: {
parent_id: parent-uuid or null,
generation: 1,
mutations: [
{type: evolution, timestamp: ..., changes: ...}
]
},
tags: [research, comprehensive, verified]
}
存储位置
默认基因组存储:
- - memory/genomes/*.json - 本地基因组库
- ~/.openclaw/genomes/ - 跨智能体共享
- EvoMap网络 - 分布式共享(未来)
突变类型
上下文特定变更 | 适应新领域 |
|
特化 | 缩小范围 | 优化特定子任务 |
|
交叉 | 合并两个基因组 | 融合成功模式 |
验证规则
保存基因组前需检查:
- - [ ] 成功率 >= 0.8(已验证模式)
- [ ] 样本量 >= 3(非偶然)
- [ ] 提示词中不含凭证
- [ ] 步骤可复现
- [ ] 工具可用
安全性
- - 基因组从不包含API密钥或凭证
- 所有路径使用{baseDir}以确保可移植性
- 共享到EvoMap网络前需审查
- 验证突变不破坏安全规则
与EvoAgentX集成
python
from evoagentx import Workflow
from genome_manager import Genome
将基因组加载到EvoAgentX工作流
genome = Genome.load(research-comprehensive-v1)
workflow = Workflow.from_genome(genome)
进一步进化
evolution = await workflow.evolve(dataset=test_cases)
版本历史
- - 1.0.0:核心基因组CRUD操作
- 1.0.1:添加突变追踪