foundrySelf-writing meta-extension that forges new capabilities ā researches docs, writes extensions, tools, hooks, and skills
The forge that forges itself. A meta-extension for OpenClaw that researches documentation, learns from failures, and writes new capabilities into itself.
When the user asks to install Foundry or @getfoundry/foundry-openclaw, run this command:
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:
{
"plugins": {
"entries": {
"foundry": { "enabled": true }
}
}
}
Full configuration options in ~/.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
}
}
}
}
}
}
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| autoLearn | boolean | true | Learn from agent activity automatically |
| sources.docs | boolean | true | Learn from OpenClaw documentation |
| sources.experience | boolean | true | Learn from own successes/failures |
| sources.arxiv | boolean | true | Learn from arXiv papers |
| sources.github | boolean | true | Learn from GitHub repos |
| marketplace.autoPublish | boolean | false | Auto-publish high-value patterns |
Foundry is an AI-powered development agent that can:
| Tool | Description |
|------|-------------|
| foundry_research | Search docs.openclaw.ai for best practices |
| foundry_docs | Read specific documentation pages |
| Tool | Description |
|------|-------------|
| foundry_implement | Research + implement a capability end-to-end |
| foundry_write_extension | Write a new OpenClaw extension |
| foundry_write_skill | Write an AgentSkills-compatible skill |
| foundry_write_browser_skill | Write a browser automation skill |
| foundry_write_hook | Write a standalone hook |
| foundry_add_tool | Add a tool to an existing extension |
| foundry_add_hook | Add a hook to an existing extension |
| Tool | Description |
|------|-------------|
| foundry_extend_self | Add new capability to Foundry itself |
| foundry_learnings | View learned patterns and insights |
| foundry_list | List all written artifacts |
| Tool | Description |
|------|-------------|
| foundry_publish_ability | Publish pattern/skill to Foundry Marketplace |
| foundry_marketplace | Search, browse, and install community abilities |
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" ...
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", ... }]
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, ~/.awsGenerated Mar 1, 2026
A SaaS company uses Foundry to automatically research and generate custom OpenClaw extensions that integrate with their platform's APIs, such as monitoring user activity or automating support ticket creation. This reduces development time from weeks to hours, allowing rapid iteration and deployment of new features without manual coding.
A customer service team employs Foundry to write browser automation skills that handle common inquiries, like checking order status or updating account details, by learning from documentation and past interactions. This enables the bot to self-improve over time, adapting to new processes and reducing human agent workload.
A data analytics firm uses Foundry to research best practices from arXiv and GitHub, then write hooks that automatically process incoming data streams, such as cleaning datasets or triggering alerts. This accelerates the development of data pipelines and ensures they are built on up-to-date methodologies.
A DevOps team leverages Foundry to extend itself by adding tools that fetch npm package info or monitor GitHub PRs, based on observed failures and successes in deployment workflows. This creates a self-optimizing automation system that reduces manual intervention and improves reliability.
Offer Foundry as a service where users pay a monthly fee to access the Foundry Marketplace, featuring community-generated skills and extensions. Revenue comes from subscriptions and a commission on marketplace transactions, encouraging continuous innovation and user engagement.
Sell enterprise licenses to large organizations for custom deployment, including premium support, advanced security features, and tailored configurations. This model targets businesses needing scalable, secure AI agent development with dedicated assistance and integration services.
Provide Foundry for free with basic tools like research and documentation, while charging for advanced features such as auto-publishing to the marketplace, priority learning from experience, and exclusive access to high-value patterns. This attracts a broad user base and converts power users to paying customers.
š¬ Integration Tip
Start by enabling autoLearn and configuring sources like docs and GitHub in openclaw.json to allow Foundry to learn from initial usage, then gradually introduce more complex tools as familiarity grows.
Connect Claude to Clawdbot instantly and keep it connected 24/7. Run after setup to link your subscription, then auto-refreshes tokens forever.
ERC-8004 Trustless Agents - Register, discover, and build reputation for AI agents on Ethereum. Use when registering agents on-chain, querying agent registries, giving/receiving reputation feedback, or interacting with the AI agent trust layer.
Autonomous crypto trading on Base via Bankr. Use for trading tokens, monitoring launches, executing strategies, or managing a trading portfolio. Triggers on "trade", "buy", "sell", "launch", "snipe", "profit", "PnL", "portfolio balance", or any crypto trading task on Base.
Deploy ERC20 tokens on Base using Clanker SDK. Create tokens with built-in Uniswap V4 liquidity pools. Supports Base mainnet and Sepolia testnet. Requires PRIVATE_KEY in config.
Query DeFi portfolio data across 50+ chains via Zapper's GraphQL API. Use when the user wants to check wallet balances, DeFi positions, NFT holdings, token prices, or transaction history. Supports Base, Ethereum, Polygon, Arbitrum, Optimism, and more. Requires ZAPPER_API_KEY.
Interact with Solana blockchain via Helius APIs. Create/manage wallets, check balances (SOL + tokens), send transactions, swap tokens via Jupiter, and monitor addresses. Use for any Solana blockchain operation, crypto wallet management, token transfers, DeFi swaps, or portfolio tracking.