ARBuilder
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
AI-powered development assistant for the Arbitrum ecosystem. ARBuilder transforms natural language prompts into:
- **Stylus smart contracts** (Rust)
- **Cross-chain SDK implementations** (asset bridging and messaging)
- **Full-stack dApps** (contracts + backend + indexer + oracle + frontend + wallet integration)
- **Orbit chain deployment assistance**
Demo
Quick Start
**Hosted (no setup):**
Or add to ~/.cursor/mcp.json (Cursor / VS Code):
Get your API key at arbuilder.app
**Self-hosted** — see Setup below.
Table of Contents
- Architecture
- Project Structure
- Setup
- Quick Start (IDE Integration)
- Usage
- API Access
- MCP Capabilities
- User Guide
- Milestones
- Development
- Troubleshooting
- Contributing
- License
Architecture
ARBuilder uses a **Retrieval-Augmented Generation (RAG)** pipeline with hybrid search (vector + BM25 + cross-encoder reranking) to provide context-aware code generation. Available as a hosted service at arbuilder.app or self-hosted via MCP server.
Project Structure
Setup
1. Create Conda Environment
> **Note:** If you plan to refresh the knowledge base by scraping (optional), also install playwright:
>
2. Configure Environment Variables
Copy the example environment file and configure your API keys:
Edit .env with your credentials:
3. Setup Data
The repository includes all data needed:
- **Raw data** (data/raw/): Documentation pages + curated GitHub repos
- **Processed chunks** (data/processed/): Chunks ready for embedding
**Important:** The ChromaDB vector database must be generated locally (it's not included in the repo due to binary compatibility issues across systems).
4. Verify MCP Server
Test that the MCP server starts correctly:
You should see:
Optional: Refresh Data
If you want to re-scrape the latest documentation and code:
**Data Quality Filters:** The pipeline applies a 3-layer filtering system to remove junk data (vendored crates, auto-generated TypeChain files, hex bytecode, lock files, and cross-repo duplicates). See docs/DATA_CURATION_POLICY.md for details.
Data Maintenance
Audit and clean up data sources:
Fork & Migrate (SDK 0.10.0)
Fork community Stylus repos and migrate them to SDK 0.10.0:
Reports are saved to reports/fork_migration_*.json.
Quick Start (IDE Integration)
Option A: Self-Hosted (Full Control)
Run ARBuilder locally with your own API keys. No rate limits.
**Step 1: Configure your IDE**
Add the following to your MCP configuration file:
**Cursor** (~/.cursor/mcp.json):
**Claude Desktop** (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
**Step 2: Restart your IDE**
After saving the configuration, restart Cursor or Claude Desktop. The ARBuilder tools will be available to the AI assistant.
**Step 3: Start building!**
Ask your AI assistant:
- "Generate an ERC20 token contract in Stylus"
- "How do I deploy a contract to Arbitrum Sepolia?"
- "Write tests for my counter contract"
Option B: Hosted Service (Zero Setup)
Use our hosted API - no local setup required. Available at arbuilder.app.
1. Sign up at https://arbuilder.app and get your API key
2. Add to your MCP configuration:
The hosted service includes:
- 100 API calls/day (free tier)
- No local setup or Python environment required
- Always up-to-date with latest Stylus SDK patterns
Usage
Data Ingestion
**Hosted (Worker-native)**: The hosted service at arbuilder.app has a built-in ingestion pipeline that runs automatically via cron (every 6 hours). Sources can also be manually ingested via the admin UI at /admin.
The pipeline uses two paths based on source size:
- **Sync path** (docs and repos ≤30 files): scrape → chunk → embed → upsert in a single Worker invocation (~40 subrequests)
- **Async path** (repos >30 files): scrape → chunk → save to KV → enqueue to CF Queue. The queue consumer processes embed/upsert in batches of 10 chunks (~4 subrequests each), with continue messages for additional file batches and a finalize message to update source status. This stays within the 50 subrequest/invocation limit on the Free plan.