Get Mega
Clone the repo and open it in your AI tool to start building.
What can Mega do?
- Write Based flows from business requirements, documents, or spreadsheets
- Deploy agents across voice, chat, SMS, WhatsApp, and other channels
- Manage deployments — inspect logs, update flows, debug issues
- Scale — take one working flow and deploy it across dozens of instances with different parameters
Quick start
mega/ directory in your AI tool. It auto-configures:
| Tool | Config file | What loads |
|---|---|---|
| Claude Code | CLAUDE.md | Full platform context, Based reference, workflow patterns |
| Cursor | .cursorrules | Based syntax, platform conventions |
| Codex | AGENTS.md | Agent instructions for autonomous operation |
What’s inside
| Path | Description |
|---|---|
docs/based.md | Complete Based language reference — syntax, built-ins, patterns, limitations |
docs/platform.md | Platform data model — workers, flows, deployments, resources |
docs/deployments.md | Deployment types and their configuration |
examples/ | 5 production-quality Based flows (inbound routing, appointment booking, order taking, lead qualification, outbound campaigns) |
scripts/bb.sh | CLI wrapper for the Brainbase API — create workers, manage flows, deploy |
How it works
Mega doesn’t introduce new tools or SDKs. It provides context files that AI coding tools already know how to read. When you open themega/ directory:
- Your AI tool loads the context file (
CLAUDE.md,.cursorrules, orAGENTS.md) - The context points it to
docs/based.md— the complete Based language reference - It references
examples/for production-quality patterns - It uses
scripts/bb.shto interact with the Brainbase API
Relationship to these docs
The Based reference in Mega’sdocs/based.md is the most up-to-date and complete guide to the Based language, covering v2 syntax, deployment-specific functions, limitations, and production patterns. The Language Fundamentals section on this site covers the same topics but may lag behind.
If you’re building with an AI tool, use Mega. If you prefer reading docs directly, both sources cover the core language.