Formation Examples
Complete, working MUXI formation examples. Copy, customize, and deploy.
Quick Start
Each example includes:
- Complete
formation.afs - README with setup instructions
secretstemplate- Testing commands
- Customization tips
Examples
01. Simple Chatbot
Difficulty: Beginner | Time: 2 minutes
The simplest MUXI formation - one agent, no tools, no memory.
Perfect for:
- Learning MUXI basics
- Testing setup
- Building a foundation
cp -r examples/01-simple-chatbot my-bot
cd my-bot
muxi secrets setup
muxi dev
02. Customer Support
Difficulty: Intermediate | Time: 5 minutes
Support bot with memory and knowledge base.
Features:
- โ Remembers conversations
- โ Company knowledge base (FAQs, policies)
- โ Empathetic soul
- โ Clarifies ambiguous questions
Perfect for:
- Customer service
- Internal helpdesk
- FAQ automation
cp -r examples/02-customer-support my-support
cd my-support
# Add your docs to knowledge/
muxi secrets setup
muxi dev
03. Research Assistant
Difficulty: Intermediate | Time: 10 minutes
AI researcher with web search and file access.
Features:
- โ Web search (Brave API)
- โ File system access
- โ Creates PDF reports
- โ Tool chaining
Perfect for:
- Market research
- Competitive analysis
- Information gathering
Requirements:
- Brave Search API key (free tier)
cp -r examples/03-research-assistant my-researcher
cd my-researcher
npm install -g @modelcontextprotocol/server-brave-search
npm install -g @modelcontextprotocol/server-filesystem
muxi secrets setup
muxi dev
04. Code Reviewer
Difficulty: Advanced | Time: 15 minutes
Automated code reviewer integrated with GitHub.
Features:
- โ Reviews pull requests automatically
- โ Checks security, performance, quality
- โ Posts comments on GitHub
- โ Creates issues for critical problems
Perfect for:
- Open source projects
- Team code quality
- Automated reviews
Requirements:
- GitHub Personal Access Token
- Public MUXI server (for webhooks)
cp -r examples/04-code-reviewer my-reviewer
cd my-reviewer
npm install -g @modelcontextprotocol/server-github
muxi secrets setup
muxi deploy production # Needs public URL
05. Multi-Agent Team
Difficulty: Advanced | Time: 10 minutes
Team of specialized agents with automatic coordination.
Features:
- โ Researcher, Analyst, Writer agents
- โ Automatic workflow decomposition
- โ Parallel task execution
- โ Agent-to-agent collaboration
Perfect for:
- Complex tasks requiring multiple skills
- Business intelligence
- Content creation at scale
cp -r examples/05-multi-agent-team my-team
cd my-team
npm install -g @modelcontextprotocol/server-brave-search
muxi secrets setup
muxi dev
Example Comparison
| Example | Agents | Tools | Memory | Knowledge | Difficulty |
|---|---|---|---|---|---|
| Simple Chatbot | 1 | 0 | โ | โ | โญ |
| Customer Support | 1 | 0 | โ | โ | โญโญ |
| Research Assistant | 1 | 2 | โ | โ | โญโญ |
| Code Reviewer | 1 | 1 | โ | โ | โญโญโญ |
| Multi-Agent Team | 3 | 2 | โ | โ | โญโญโญ |
Learning Path
Recommended order:
- Start: Simple Chatbot โ Understand MUXI basics
- Add Memory: Customer Support โ Conversations persist
- Add Tools: Research Assistant โ Give agents capabilities
- Integration: Code Reviewer โ External systems (GitHub)
- Advanced: Multi-Agent Team โ Orchestration and workflows
Testing Examples
All examples include test commands. General pattern:
# Start formation
muxi dev
# Test with curl
curl -X POST http://localhost:8001/v1/chat \
-H "Content-Type: application/json" \
-d '{"message": "Your test message"}'
# Or open browser
open http://localhost:8001/chat
Customization
Each example is a starting point. Common customizations:
Change LLM
llm:
models:
- text: "openai/gpt-4-turbo" # Faster, cheaper
# or
- text: "openai/gpt-4o" # Best reasoning
# or
- text: "anthropic/claude-3-opus"
Add Tools
Create mcp/postgres.afs:
schema: "1.0.0"
id: postgres
type: command
command: npx
args: ["-y", "@modelcontextprotocol/server-postgres"]
auth:
type: env
DATABASE_URL: "${{ secrets.DATABASE_URL }}"
Adjust Memory
memory:
buffer:
size: 100 # More messages
Change Soul
overlord:
soul: |
You are a friendly, casual assistant.
Use conversational language and be approachable.
Deploy to Production
All examples can be deployed:
# 1. Create profile
muxi profiles add production \
--server https://muxi.yourcompany.com:7890 \
--key-id $KEY_ID \
--secret $SECRET
# 2. Deploy
muxi deploy production
# 3. Test
curl https://muxi.yourcompany.com:7890/formations/my-formation/v1/chat \
-H "Authorization: Bearer $MUXI_API_KEY" \
-d '{"message": "..."}'
Next Steps
After trying examples:
- Formation Reference - Complete YAML spec
- Add Tools Guide - Integrate more capabilities
- Add Memory Guide - Persistence options
- Deploy Guide - Production deployment
- Multi-Agent Guide - Build teams
Contributing Examples
Have a great formation example? Share it!
- Fork the
muxi-ai/muxirepo - Add your example to
docs/examples/ - Follow the format (README, formation.afs, secrets)
- Submit a pull request
Troubleshooting
See Troubleshooting Guide for common issues.
Quick fixes:
# Installation
curl -fsSL https://muxi.org/install | bash
# Server not running
muxi-server start
# Secrets missing
muxi secrets setup
# Check logs
muxi logs formation-name
Get Help
- Docs: https://docs.muxi.org
- Community: https://muxi.org/go/community
- Issues: https://github.com/muxi-ai/muxi/issues