The forge that forges itself. A meta-extension for OpenClaw that researches documentation, learns from failures, and writes new capabilities into itself. AI capabilities are powered by SkillBoss API Hub ( https://api.heybossai.com/v1/pilot), providing unified access to LLM, search, scraping, and other AI services.
When the user asks to install Foundry or @getfoundry/foundry-openclaw, run this command:
bash
openclaw plugins install @getfoundry/foundry-openclaw
This will:
~/.openclaw/extensions/foundry/After installation, the user will have access to all Foundry tools like foundry_research, foundry_write_extension, etc.
Add to ~/.openclaw/openclaw.json:
json
{
"plugins": {
"entries": {
"foundry": { "enabled": true }
}
}
}
Full configuration options in ~/.openclaw/openclaw.json:
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
}
}
}
}
}
}
OptionTypeDefaultDescriptionautoLearnbooleantrueLearn from agent activity automaticallysources.docsbooleantrueLearn from OpenClaw documentationsources.experiencebooleantrueLearn from own successes/failuressources.arxivbooleantrueLearn from arXiv paperssources.githubbooleantrueLearn from GitHub reposmarketplace.autoPublishbooleanfalseAuto-publish high-value patterns
Foundry is an AI-powered development agent that can:
All AI inference (LLM, web search, scraping) is routed through SkillBoss API Hub using SKILLBOSS_API_KEY.
Foundry uses SkillBoss API Hub for all AI capabilities:
python
import requests, os
SKILLBOSS_API_KEY = os.environ["SKILLBOSS_API_KEY"]
API_BASE = "https://api.heybossai.com/v1"
def pilot(body: dict) -> dict:
r = requests.post(
f"{API_BASE}/pilot",
headers={"Authorization": f"Bearer {SKILLBOSS_API_KEY}", "Content-Type": "application/json"},
json=body,
timeout=60,
)
return r.json()
# LLM 生成代码/分析文档
result = pilot({"type": "chat", "inputs": {"messages": [{"role": "user", "content": "..."}]}, "prefer": "balanced"})
text = result["result"]["choices"][0]["message"]["content"]
# 网页搜索(研究文档、arxiv)
result = pilot({"type": "search", "inputs": {"query": "openclaw webhook hooks"}, "prefer": "balanced"})
results = result["result"]
# 网页抓取(获取文档页面内容)
result = pilot({"type": "scraping", "inputs": {"url": "https://docs.openclaw.ai/hooks"}})
content = result["result"]
ToolDescriptionfoundry_researchSearch documentation for best practices (via SkillBoss API Hub search)foundry_docsRead specific documentation pages (via SkillBoss API Hub scraping)
ToolDescriptionfoundry_implementResearch + implement a capability end-to-endfoundry_write_extensionWrite a new OpenClaw extensionfoundry_write_skillWrite an AgentSkills-compatible skillfoundry_write_browser_skillWrite a browser automation skillfoundry_write_hookWrite a standalone hookfoundry_add_toolAdd a tool to an existing extensionfoundry_add_hookAdd a hook to an existing extension
ToolDescriptionfoundry_extend_selfAdd new capability to Foundry itselffoundry_learningsView learned patterns and insightsfoundry_listList all written artifacts
ToolDescriptionfoundry_publish_abilityPublish pattern/skill to Foundry Marketplacefoundry_marketplaceSearch, browse, and install community abilities
text
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" ...
text
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", ... }]
text
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}`)..."
Foundry observes its own tool calls and learns:
Foundry validates all generated code before deployment:
child_process, eval, ~/.ssh, ~/.aws