Agent Creation
Mega Brain supports creating sophisticated AI agents with personality (SOUL), knowledge (MEMORY), and DNA-based expertise weighting. This guide covers the complete agent creation workflow.Agent Architecture
Agents in Mega Brain follow a structured template system:Agent Types
Mega Brain defines 4 agent categories:- CARGO (Functional)
- MINDS (Expert Clones)
- CONCLAVE (Multi-Agent)
- SYSTEM (Core)
Purpose: Functional roles like Sales, Finance, OperationsLocation:
agents/cargo/Count: 29 agentsExamples:AGENT-CFO- Chief Financial OfficerAGENT-CLOSER- Sales closerAGENT-SDR- Sales Development RepAGENT-CMO- Chief Marketing Officer
TEMPLATE-AGENT-MD-ULTRA-ROBUSTO-V3.mdTotal Active Agents: 37 (29 cargo + 5 minds + 3 conclave + 2 system)
AGENT.md Template
TheAGENT.md file is the primary prompt for the agent. Mega Brain uses TEMPLATE-AGENT-MD-ULTRA-ROBUSTO-V3.md:
Referencing System
Agents use citation references to ensure traceability:Creating a New Agent
Choose Agent Category
Decide which category fits your agent:
- CARGO - Functional role (Sales, Finance, Ops)
- MINDS - Expert mind clone
- CONCLAVE - Council participant
- SYSTEM - Core orchestration
Define Agent Identity
Edit AGENT.md and fill in:
- Agent name -
AGENT-[NAME](uppercase) - Title - Role description
- Category - Sales, Finance, Operations, etc.
- Tagline - One-line description
DNA System
Mega Brain’s DNA system provides 5 layers of knowledge:L1: PHILOSOPHIES
L1: PHILOSOPHIES
Core beliefs and worldviewExamples:
- “Systems before scale” (Sam Ovens)
- “Value arbitrage” (Alex Hormozi)
- “Integrity closes deals” (Cole Gordon)
L2: MENTAL-MODELS
L2: MENTAL-MODELS
Thinking and decision frameworksExamples:
- “Unit economics model” (Alex Hormozi)
- “Value ladder” (Russell Brunson)
- “Flywheel” (Amazon)
L3: HEURISTICS
L3: HEURISTICS
Practical rules and decision shortcutsExamples:
- “LTV/CAC > 3” (SaaS rule)
- “20% max on comp” (Sales compensation)
- “6-month cash runway minimum” (Startups)
L4: FRAMEWORKS
L4: FRAMEWORKS
Structured methodologies and processesExamples:
- “CLOSER Framework” (Cole Gordon)
- “Value Equation” (Alex Hormozi)
- “Consulting Process” (Sam Ovens)
L5: METHODOLOGIES
L5: METHODOLOGIES
Step-by-step implementationsExamples:
- “7-step sales call” (Cole Gordon)
- “Offer creation process” (Alex Hormozi)
- “Client onboarding” (Sam Ovens)
Agent Lifecycle
Automatic Creation
Agents can be auto-created via hooks:Agent Activation
Agents are activated via:- Direct invocation - Mention agent by name
- Skill routing - Auto-activated by keywords
- Hook trigger - Activated by lifecycle events
- Slash commands -
/agent-name
Agent Index
AGENT-INDEX.yaml maintains the registry:
agent_index_updater.py hook automatically updates this file when agents are created/modified.Agent Templates
Mega Brain provides templates inagents/_templates/:
- TEMPLATE-AGENT-MD-ULTRA-ROBUSTO-V3.md
- INDEX.md
Version: 3.1Size: 78KBFeatures:
- Full DNA integration
- Citation system
- Incremental sections
- Dependencies tracking
Best Practices
Agent Design Principles
- Single Responsibility - One agent, one role
- Traceable - All content cited from sources
- DNA-Driven - Base on expert mental models
- Iterative - Start minimal, expand over time
- Validated - Use validation tools before deployment
Quality Checklist
Structure Validation
- AGENT.md exists and follows template
- Agent name follows
AGENT-[NAME]convention - Category is valid (Sales, Finance, etc.)
- Version is set to 3.0.0 or higher
Content Validation
- All sections populated (WHO I AM, FORMATION, etc.)
- All citations reference real files
- Quotes are literal (not paraphrased)
- DNA weights add up correctly
Integration Validation
- AGENT-INDEX.yaml updated
- Keywords defined for skill routing
- Dependencies declared
- Status set to “active”
Troubleshooting
Agent Not Found
Agent Not Found
Problem: Agent exists but isn’t activatedSolutions:
- Check
AGENT-INDEX.yamlincludes the agent - Verify file path is correct
- Ensure status is “active” not “draft”
- Run
agent_index_updater.pyto rebuild index
Citations Broken
Citations Broken
Problem: References like
^[SOUL.md:17] don’t resolveSolutions:- Verify SOUL.md exists at correct path
- Check line number exists in file
- Run
verify_citations.pyto find all broken refs - Update references to correct line numbers
DNA Conflicts
DNA Conflicts
Problem: Multiple experts conflict in decision-makingSolutions:
- Adjust expert weights in DNA-CONFIG.yaml
- Create resolution rules in AGENT.md
- Define priority order for conflicts
- Consider splitting into multiple agents
Related Documentation
DNA System
Deep dive into the 5-layer DNA knowledge system
Skills Routing
Auto-activate agents with keyword routing
Hooks System
Agent lifecycle hooks and automation
Validation
Validate agent structure and content
