OpenClaw vs. Hermes: 我的发现blockquote style display block 微信 b ezpoda b 免费咨询 AI 编程 AI 模型微调 AI 私有化部署 br AI 模型价格对比 AI 工具导航 ONNX 模型库 Tripo 3D Meshy AI ElevenLabs br blockquote
每个使用过 AI 编程助手的开发者都经历过同样的挫败感。你花了一整个下午教你的 Agent 了解代码库的特性——命名规范、部署流水线、没人记录的遗留数据库模式。然后你关闭了会话。当你打开一个新会话时,大部分上下文都消失了。目前有两个项目正在从根本不同的方向解决这个问题。但只有一个被设计为会随时间变得越来越强。
Hermes 在执行之后增加了一个层。当它完成一个复杂任务时,它会进入 Nous Research 所谓的"反思阶段"。它分析自己的表现,提取可复用的模式,并编写一个新的技能文件,精确编码它是如何解决那个问题的。下次类似任务出现时,Agent 查询自己的技能库,而不是从零开始推理。积累的机构知识在跨会话中不断累积
git clone https://github.com/NousResearch/hermes-agent cd hermes-agent && pip install -e .
Initialize your workspace
hermes init ~/my-hermes-workspace cd ~/my-hermes-workspace
关键配置步骤——启用学习循环:
# ~/.hermes/config.toml — the most important file
[model] provider = “anthropic” # or openai, google, openrouter, etc. model = “claude-opus-4-5” base_url = “https://api.anthropic.com” # one line to switch providers
Hermes 内置了迁移工具,可以导入你的 OpenClaw 人设、记忆、技能、配置和 API 密钥:
# Dry run first — preview what will be imported hermes claw migrate –dry-run –source ~/.openclaw
Run the actual migration
hermes claw migrate –source ~/.openclaw
Verify the import
hermes skills list hermes memory status
运行任务并观察技能创建
import asyncio from hermes_agent import HermesAgent
async def main():
agent = await HermesAgent.create( config_path="~/.hermes/config.toml" ) # First time: agent reasons through the task result = await agent.run( "Review this PR diff and flag any security issues: ", context= ) print(result.response) print(f"New skills created: {result.skills_created}") print(f"Skills used: {result.skills_used}") print(f"Reflection: {result.reflection_summary}")
asyncio.run(main()) Output after first run: New skills created: [“pr-security-review-v1.md”] Skills used: [] Reflection: “Identified SQL injection risk in line 47.
Created skill for future SQL review tasks."
Output after 20 similar PRs: New skills created: [] Skills used: [“pr-security-review-v1.md”, “sql-injection-patterns.md”] Task completed 40% faster — skill library handled pattern matching
查询技能库
# Inspect what the agent has learned async def inspect_skills():
agent = await HermesAgent.create() # List all self-generated skills skills = await agent.skills.list(source="self-generated") for skill in skills: print(f"{skill.name}: used {skill.use_count}x, " f"success_rate={skill.success_rate:.1%}") # View user model user_model = await agent.memory.get_user_model() print(f"Preferences: {user_model.preferences}") print(f"Common tasks: {user_model.frequent_task_types}") print(f"Sessions logged: {user_model.session_count}")
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/281959.html