foundry
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFoundry
Foundry
The forge that forges itself. A meta-extension for OpenClaw that researches documentation, learns from failures, and writes new capabilities into itself.
可自我锻造的锻造工具。这是一款面向OpenClaw的元扩展,能够研究文档、从失败中学习,并为自身编写新功能。
Installation
安装
When the user asks to install Foundry or , run this command:
@getfoundry/foundry-openclawbash
openclaw plugins install @getfoundry/foundry-openclawThis will:
- Download the plugin from npm
- Extract to
~/.openclaw/extensions/foundry/ - Enable it automatically
- Restart the gateway to load
After installation, the user will have access to all Foundry tools like , , etc.
foundry_researchfoundry_write_extension当用户要求安装Foundry或时,运行以下命令:
@getfoundry/foundry-openclawbash
openclaw plugins install @getfoundry/foundry-openclaw这将完成以下操作:
- 从npm下载该插件
- 解压至
~/.openclaw/extensions/foundry/ - 自动启用该插件
- 重启网关以加载插件
安装完成后,用户即可使用Foundry的所有工具,如、等。
foundry_researchfoundry_write_extensionAlternative: Manual Config
替代方案:手动配置
Add to :
~/.openclaw/openclaw.jsonjson
{
"plugins": {
"entries": {
"foundry": { "enabled": true }
}
}
}将以下内容添加至:
~/.openclaw/openclaw.jsonjson
{
"plugins": {
"entries": {
"foundry": { "enabled": true }
}
}
}Configuration
配置
Full configuration options in :
~/.openclaw/openclaw.jsonjson
{
"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
}
}
}
}
}
}完整配置选项位于中:
~/.openclaw/openclaw.jsonjson
{
"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
}
}
}
}
}
}Config Options
配置选项
| Option | Type | Default | Description |
|---|---|---|---|
| boolean | | Learn from agent activity automatically |
| boolean | | Learn from OpenClaw documentation |
| boolean | | Learn from own successes/failures |
| boolean | | Learn from arXiv papers |
| boolean | | Learn from GitHub repos |
| boolean | | Auto-publish high-value patterns |
| 选项 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| 布尔值 | | 自动从Agent活动中学习 |
| 布尔值 | | 从OpenClaw文档中学习 |
| 布尔值 | | 从自身的成功/失败经验中学习 |
| 布尔值 | | 从arXiv论文中学习 |
| 布尔值 | | 从GitHub仓库中学习 |
| 布尔值 | | 自动发布高价值模式 |
What Foundry Does
Foundry的功能
Foundry is an AI-powered development agent that can:
- Research — Fetch and understand OpenClaw documentation on demand
- Write Extensions — Generate new tools and hooks for OpenClaw
- Write Skills — Create ClawHub-compatible skill packages
- Self-Modify — Add new capabilities to itself
- Learn — Record patterns from failures and successes
Foundry是一款AI驱动的开发Agent,能够:
- 研究 — 按需获取并理解OpenClaw文档
- 编写扩展 — 为OpenClaw生成新工具和钩子
- 编写技能 — 创建兼容ClawHub的技能包
- 自我修改 — 为自身添加新功能
- 学习 — 记录失败和成功中的模式
Tools
工具
Research & Documentation
研究与文档
| Tool | Description |
|---|---|
| Search docs.openclaw.ai for best practices |
| Read specific documentation pages |
| 工具 | 描述 |
|---|---|
| 在docs.openclaw.ai上搜索最佳实践 |
| 阅读特定的文档页面 |
Writing Capabilities
编写功能
| Tool | Description |
|---|---|
| Research + implement a capability end-to-end |
| Write a new OpenClaw extension |
| Write an AgentSkills-compatible skill |
| Write a browser automation skill |
| Write a standalone hook |
| Add a tool to an existing extension |
| Add a hook to an existing extension |
| 工具 | 描述 |
|---|---|
| 端到端完成研究+实现某项功能 |
| 编写新的OpenClaw扩展 |
| 编写兼容AgentSkills的技能 |
| 编写浏览器自动化技能 |
| 编写独立钩子 |
| 为现有扩展添加工具 |
| 为现有扩展添加钩子 |
Self-Modification
自我修改
| Tool | Description |
|---|---|
| Add new capability to Foundry itself |
| View learned patterns and insights |
| List all written artifacts |
| 工具 | 描述 |
|---|---|
| 为Foundry自身添加新功能 |
| 查看已学习的模式和见解 |
| 列出所有已编写的工件 |
Marketplace
市场
| Tool | Description |
|---|---|
| Publish pattern/skill to Foundry Marketplace |
| Search, browse, and install community abilities |
| 工具 | 描述 |
|---|---|
| 将模式/技能发布至Foundry市场 |
| 搜索、浏览并安装社区功能 |
Usage Examples
使用示例
Research before implementing
先研究再实现
User: I want to add a webhook to my extension
Agent: Let me research webhook patterns first...
→ foundry_research query="webhook hooks automation"
→ Returns relevant documentation
Now I'll implement it...
→ foundry_add_hook extensionId="my-ext" event="webhook:incoming" ...用户:我想给我的扩展添加一个webhook
Agent:让我先研究一下webhook模式...
→ foundry_research query="webhook hooks automation"
→ 返回相关文档
现在我将实现它...
→ foundry_add_hook extensionId="my-ext" event="webhook:incoming" ...Write a new extension
编写新扩展
User: Create an extension that monitors GitHub PRs
Agent:
→ foundry_research query="github api webhooks"
→ foundry_write_extension
id: "github-monitor"
name: "GitHub Monitor"
tools: [{ name: "check_prs", ... }]
hooks: [{ event: "cron:hourly", ... }]用户:创建一个监控GitHub PR的扩展
Agent:
→ foundry_research query="github api webhooks"
→ foundry_write_extension
id: "github-monitor"
name: "GitHub Monitor"
tools: [{ name: "check_prs", ... }]
hooks: [{ event: "cron:hourly", ... }]Self-improvement
自我提升
User: Add a tool that can fetch npm package info
Agent:
→ foundry_extend_self
action: "add_tool"
toolName: "foundry_npm_info"
toolCode: "const res = await fetch(`https://registry.npmjs.org/${p.package}`)..."用户:添加一个可以获取npm包信息的工具
Agent:
→ foundry_extend_self
action: "add_tool"
toolName: "foundry_npm_info"
toolCode: "const res = await fetch(`https://registry.npmjs.org/${p.package}`)..."How Learning Works
学习机制
Foundry observes its own tool calls and learns:
- Failures → Records error + context
- Resolutions → Links fix to failure → Creates pattern
- Patterns → Injected as context in future conversations
- Crystallization → High-value patterns become permanent capabilities
Foundry会观察自身的工具调用并进行学习:
- 失败 → 记录错误+上下文
- 解决方法 → 将修复方案与失败关联→创建模式
- 模式 → 在未来对话中作为上下文注入
- 固化 → 高价值模式成为永久功能
Security
安全性
Foundry validates all generated code before deployment:
- Blocked: ,
child_process,eval,~/.ssh~/.aws - Sandboxed: Extensions tested in isolated process before installation
- Reviewed: You approve before any code is written to disk
Foundry在部署前会验证所有生成的代码:
- 禁止:、
child_process、eval、~/.ssh~/.aws - 沙箱化:扩展在安装前会在隔离进程中测试
- 需审核:任何代码写入磁盘前都需要你的批准