OA0 = Omni AI 0
OA0 是一个探索 AI 的论坛
现在注册
已注册用户请  登录
OA0  ›  技能包  ›  foundry:自我编写的元扩展工具,通过调研文档锻造新能力

foundry:自我编写的元扩展工具,通过调研文档锻造新能力

 
  dora ·  2026-02-17 11:31:52 · 3 次点击  · 0 条评论  

名称: foundry
描述: 自我编写的元扩展,能够锻造新能力——研究文档、编写扩展、工具、钩子和技能
主页: https://getfoundry.app
user-invocable: true
元数据: {"openclaw":{"requires":{"bins":["node"]},"repository":"github:lekt9/openclaw-foundry"}}


Foundry

锻造自身的熔炉。 一个为 OpenClaw 设计的元扩展,能够研究文档、从失败中学习,并将新能力编写进自身。

安装

当用户要求安装 Foundry 或 @getfoundry/foundry-openclaw 时,运行以下命令:

openclaw plugins install @getfoundry/foundry-openclaw

此命令将:
1. 从 npm 下载插件
2. 解压到 ~/.openclaw/extensions/foundry/
3. 自动启用插件
4. 重启网关以加载插件

安装完成后,用户即可使用所有 Foundry 工具,例如 foundry_researchfoundry_write_extension 等。

备选方案:手动配置

将以下内容添加到 ~/.openclaw/openclaw.json

{
  "plugins": {
    "entries": {
      "foundry": { "enabled": true }
    }
  }
}

配置

完整的配置选项位于 ~/.openclaw/openclaw.json

{
  "plugins": {
    "entries": {
      "foundry": {
        "enabled": true,
        "source": "github:lekt9/openclaw-foundry",
        "config": {
          "autoLearn": true,
          "sources": {
            "docs": true,
            "experience": true,
            "arxiv": true,
            "github": true
          },
          "marketplace": {
            "autoPublish": false
          }
        }
      }
    }
  }
}

配置选项

选项 类型 默认值 描述
autoLearn 布尔值 true 自动从智能体活动中学习
sources.docs 布尔值 true 从 OpenClaw 文档中学习
sources.experience 布尔值 true 从自身的成功/失败中学习
sources.arxiv 布尔值 true 从 arXiv 论文中学习
sources.github 布尔值 true 从 GitHub 仓库中学习
marketplace.autoPublish 布尔值 false 自动发布高价值模式

Foundry 的功能

Foundry 是一个由 AI 驱动的开发智能体,能够:

  1. 研究 —— 按需获取并理解 OpenClaw 文档
  2. 编写扩展 —— 为 OpenClaw 生成新工具和钩子
  3. 编写技能 —— 创建与 ClawHub 兼容的技能包
  4. 自我修改 —— 为自身添加新能力
  5. 学习 —— 记录失败和成功的模式

工具

研究与文档

工具 描述
foundry_research 在 docs.openclaw.ai 上搜索最佳实践
foundry_docs 读取特定的文档页面

编写能力

工具 描述
foundry_implement 端到端地研究并实现一项能力
foundry_write_extension 编写一个新的 OpenClaw 扩展
foundry_write_skill 编写与 AgentSkills 兼容的技能
foundry_write_browser_skill 编写浏览器自动化技能
foundry_write_hook 编写独立的钩子
foundry_add_tool 向现有扩展添加工具
foundry_add_hook 向现有扩展添加钩子

自我修改

工具 描述
foundry_extend_self 为 Foundry 自身添加新能力
foundry_learnings 查看学习到的模式和见解
foundry_list 列出所有已编写的成果

市场

工具 描述
foundry_publish_ability 将模式/技能发布到 Foundry 市场
foundry_marketplace 搜索、浏览和安装社区能力

使用示例

实现前进行研究

用户:我想为我的扩展添加一个 webhook

智能体:让我先研究一下 webhook 模式...
→ foundry_research query="webhook hooks automation"
→ 返回相关文档

现在我来实现它...
→ foundry_add_hook extensionId="my-ext" event="webhook:incoming" ...

编写新扩展

用户:创建一个监控 GitHub PR 的扩展

智能体:
→ foundry_research query="github api webhooks"
→ foundry_write_extension
    id: "github-monitor"
    name: "GitHub Monitor"
    tools: [{ name: "check_prs", ... }]
    hooks: [{ event: "cron:hourly", ... }]

自我改进

用户:添加一个能获取 npm 包信息的工具

智能体:
→ foundry_extend_self
    action: "add_tool"
    toolName: "foundry_npm_info"
    toolCode: "const res = await fetch(`https://registry.npmjs.org/${p.package}`)..."

学习机制

Foundry 观察自身的工具调用并进行学习:

  1. 失败 → 记录错误及上下文
  2. 解决方案 → 将修复与失败关联 → 创建模式
  3. 模式 → 作为上下文注入未来的对话中
  4. 结晶化 → 高价值模式成为永久能力

安全性

Foundry 在部署前会验证所有生成的代码:

  • 阻止child_processeval~/.ssh~/.aws
  • 沙盒化:扩展在安装前于隔离进程中测试
  • 审核:在代码写入磁盘前需经您批准

链接

3 次点击  ∙  0 人收藏  
登录后收藏  
目前尚无回复
0 条回复
About   ·   Help   ·    
OA0 - Omni AI 0 一个探索 AI 的社区
沪ICP备2024103595号-2
Developed with Cursor