BuizSwarm is a Polsia-style autonomous company-building platform that enables AI agents to create, manage, and grow businesses with minimal human intervention.
Canonical platform domain: agentbroker.app. The operator dashboard lives at app.agentbroker.app, and tenant businesses are intended to live under *.agentbroker.app with optional custom domains later.
The backend API is intended to live at api.agentbroker.app. In production, the Angular dashboard should be deployed to Vercel and the Python API to a backend host such as Railway.
OpenClaw integration: the backend can register an openclaw MCP server preset that talks to an HTTP bridge, and the bridge uses the OpenClaw gateway WebSocket with shared-secret auth from OPENCLAW_GATEWAY_TOKEN or the mounted ~/.openclaw/openclaw.json.
ProfitMax profile: the vendored ProfitMax workspace now exposes a workflow library on top of the imported role packs. The first revenue workflows are lead_qualification, outbound_personalization, and offer_pricing_review, and each workflow carries a curated operator-skill stack for research, pricing, handoff, and execution.
- Features
- Architecture
- Project Structure
- Quick Start
- API Documentation
- GitHub Copilot
- Development
- Deployment
- Contributing
- License
- Daily AI Cycles: CEO agents automatically evaluate business state and make strategic decisions
- Multi-Agent Swarm: Coordinated teams of specialized agents (CEO, Engineering, Marketing, Support)
- Infrastructure Provisioning: Automatic setup of servers, databases, email, and payment processing
- Revenue Sharing: 20% platform fee model with automatic payout distribution
| Agent | Capabilities |
|---|---|
| CEO | Strategic planning, decision making, task prioritization, business analysis |
| Engineering | Code generation, deployment, bug fixes, infrastructure management |
| Marketing | Ad campaigns, content creation, cold email outreach, social media |
| Support | Customer service, ticket management, knowledge base maintenance |
- Multi-Tenant Architecture: Support for 1000+ concurrent companies
- Real-Time Dashboard: Monitor all agent activities and company metrics
- MCP Integration: Connect to external tools via Model Context Protocol
- AWS Bedrock: Powered by Claude for intelligent agent responses
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BuizSwarm Platform β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββββββ β
β β CEO Agent β β Engineering β β Marketing Agent β β
β β β β Agent β β β β
β ββββββββ¬βββββββ ββββββββ¬βββββββ ββββββββββββ¬βββββββββββ β
β β β β β
β ββββββββββββββββββΌβββββββββββββββββββββ β
β β β
β βββββββββββββ΄ββββββββββββ β
β β Swarm Orchestrator β β
β β (Task Queue & Coord) β β
β βββββββββββββ¬ββββββββββββ β
β β β
β βββββββββββββββββββββββββΌββββββββββββββββββββββββ β
β β β β β
β βΌ βΌ βΌ β
β ββββββββββββββ ββββββββββββββ ββββββββββββββββββββββ β
β β Agent β β Bedrock β β MCP Client β β
β β Core β β Client β β (Tools/Resources)β β
β ββββββββββββββ ββββββββββββββ ββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββΌββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββ ββββββββββββ ββββββββββββ
β AWS β β Stripe β β GitHub β
βBedrock β β Connect β β API β
βββββββββββ ββββββββββββ ββββββββββββ
buiz-swarm/
βββ backend/
β βββ app/
β β βββ core/ # Core platform modules
β β β βββ agent_core.py # Agent lifecycle management
β β β βββ swarm_orchestrator.py # Multi-agent coordination
β β β βββ bedrock_client.py # AWS Bedrock integration
β β β βββ mcp_client.py # MCP protocol implementation
β β βββ agents/ # Agent implementations
β β β βββ base_agent.py # Base agent class
β β β βββ ceo_agent.py # Strategic decision maker
β β β βββ engineering_agent.py # Code/build/deploy
β β β βββ marketing_agent.py # Ads, content, outreach
β β β βββ support_agent.py # Customer service
β β βββ models/ # Data models
β β βββ services/ # Business services
β β βββ api/ # API routes
β β βββ config.py # Configuration
β β βββ main.py # FastAPI entry point
β βββ requirements.txt
β βββ Dockerfile
β βββ docker-compose.yml
βββ frontend/ # Angular dashboard
βββ infrastructure/ # Terraform AWS infrastructure
βββ README.md
This repository is configured for GitHub Copilot with custom instructions and reusable prompts for common development tasks.
Copilot configuration is in .github/copilot-instructions.md which includes:
- Repository overview and architecture
- Coding standards (Python & TypeScript)
- Agent development guidelines
- MCP tool integration patterns
- API development best practices
- Database model conventions
- Testing requirements
Pre-built prompts in .github/prompts/ for common tasks:
| Prompt | Use Case |
|---|---|
create-agent.md |
Create a new agent type |
add-api-endpoint.md |
Add REST API endpoint |
add-mcp-tool.md |
Add MCP tool for agents |
fix-bug.md |
Fix bugs with regression tests |
- Install GitHub Copilot extension in your IDE
- Review
.github/copilot-instructions.mdfor project context - Use prompts from
.github/prompts/for guided development - Follow coding standards outlined in instructions
@copilot Using .github/prompts/create-agent.md, create a new DataAnalysisAgent that can analyze company metrics and generate reports.- Python 3.11+
- Docker & Docker Compose
- AWS Account with Bedrock access
- Stripe Account (for payments)
git clone https://github.com/yourusername/buiz-swarm.git
cd buiz-swarm/backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtCreate .env file:
# Application
DEBUG=true
ENVIRONMENT=development
SECRET_KEY=your-secret-key-here
# Database
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/buizswarm
REDIS_URL=redis://localhost:6379/0
# AWS Bedrock
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
BEDROCK_MODEL_ID=anthropic.claude-3-sonnet-20240229-v1:0
# Stripe
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_PLATFORM_FEE_PERCENT=20.0
# External APIs
GITHUB_TOKEN=ghp_...
SENDGRID_API_KEY=SG.xxxdocker compose -f backend/docker-compose.yml -f backend/docker-compose.openclaw.yml up -dThis starts:
- FastAPI application on http://localhost:8010
- OpenClaw bridge on http://localhost:3016
- PostgreSQL database
- Redis cache
- Celery worker (background tasks)
- API Documentation: http://localhost:8010/docs
- Health Check: http://localhost:8010/health
- OpenClaw Bridge Health: http://localhost:3016/health
- Dashboard: http://localhost:4200 (after starting frontend)
The first real platform domain is agentbroker.app.
- Operator dashboard:
app.agentbroker.app - Tenant businesses:
*.agentbroker.app - Optional customer-owned domains: supported later via the stored
custom_domainfield
Recommended Vercel setup:
- Put the dashboard/frontend on the operator domain
app.agentbroker.app - Route tenant businesses on a wildcard under
*.agentbroker.app - Keep the backend/API on its own service and proxy
/api/*from the dashboard domain in production - Use Vercel-managed nameservers when you want wildcard SSL and domain management in one place
The business-creation flow now defaults to this domain model automatically.
BuizSwarm should stay in /Users/garvey/Dev/buiz-swarm. Do not move the source into ~/.openclaw.
Use the Docker override at backend/docker-compose.openclaw.yml to mount the host OpenClaw runtime into the api and worker containers and point them at the host gateway:
cd backend
docker compose -f docker-compose.yml -f docker-compose.openclaw.yml up -d
# includes api, worker, db, redis, flower, and openclaw-bridgeThe override expects these defaults:
OPENCLAW_HOST_DIR=/Users/garvey/.openclawOPENCLAW_HOME=/openclawinside the containersOPENCLAW_GATEWAY_URL=http://host.docker.internal:18789OPENCLAW_BRIDGE_URL=http://openclaw-bridge:3006
This keeps OpenClaw as the host-level runtime and lets BuizSwarm consume it without mixing source code into the runtime directory.
# Inspect the active ProfitMax profile and curated operator skills
GET /api/v1/profiles/current
GET /api/v1/profiles/current/skills
# List the revenue workflows available to a company
GET /api/v1/companies/{company_id}/workflows
# Run a workflow
POST /api/v1/companies/{company_id}/workflows/lead_qualification/run
{
"inputs": {
"company_name": "Example Co",
"contact_name": "Jane Doe",
"lead_source": "telegram",
"pain_points": ["needs pipeline growth", "no follow-up system"],
"budget_signal": "$2k-$5k/mo",
"timeline": "this month",
"notes": "Warm inbound lead"
}
}# Create a company
POST /api/v1/companies
{
"name": "My AI Company",
"description": "An autonomous AI business",
"industry": "Technology"
}
# Get company status
GET /api/v1/companies/{company_id}/status
# Trigger daily cycle
POST /api/v1/companies/{company_id}/daily-cycle
# Pause/Resume company
POST /api/v1/companies/{company_id}/pause
POST /api/v1/companies/{company_id}/resume# Create a task
POST /api/v1/companies/{company_id}/tasks
{
"task_type": "content_creation",
"title": "Write blog post",
"description": "Create a blog post about AI",
"priority": "high"
}
# List tasks
GET /api/v1/companies/{company_id}/tasks# Record revenue
POST /api/v1/companies/{company_id}/revenue
{
"amount": 1000.00,
"source": "stripe_payment",
"description": "Monthly subscription"
}
# Get billing summary
GET /api/v1/companies/{company_id}/billingcd infrastructure/terraform
# Initialize Terraform
terraform init
# Plan deployment
terraform plan -var="db_password=your-password" -var="secret_key=your-secret"
# Apply deployment
terraform apply -var="db_password=your-password" -var="secret_key=your-secret"- ECS Fargate: Container orchestration with auto-scaling
- RDS Aurora: Serverless PostgreSQL database
- ElastiCache Redis: Caching and message queue
- Application Load Balancer: Traffic distribution
- CloudWatch: Logging and monitoring
- Secrets Manager: Secure credential storage
| Variable | Description | Default |
|---|---|---|
DEBUG |
Enable debug mode | false |
ENVIRONMENT |
Deployment environment | production |
DATABASE_URL |
PostgreSQL connection string | - |
REDIS_URL |
Redis connection string | - |
AWS_REGION |
AWS region for Bedrock | us-east-1 |
BEDROCK_MODEL_ID |
Claude model ID | anthropic.claude-3-sonnet-20240229-v1:0 |
STRIPE_SECRET_KEY |
Stripe API key | - |
AGENT_DAILY_CYCLE_HOUR |
Hour to run daily cycles (UTC) | 9 |
Each agent can be configured via the AgentConfig class:
from app.agents.base_agent import AgentConfig
config = AgentConfig(
agent_type="ceo",
capabilities=[AgentCapability.STRATEGIC],
system_prompt="Custom system prompt...",
max_tokens=4096,
temperature=0.7,
enable_mcp_tools=True
)# Run tests
pytest
# Run with coverage
pytest --cov=app --cov-report=html
# Run specific test file
pytest tests/test_agents.pyGET /api/v1/system/healthGET /api/v1/system/mcp-statusGET /api/v1/system/statsWe welcome contributions! Please see CONTRIBUTING.md for detailed guidelines.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This repo is Copilot-enabled. Use .github/prompts/ for guided development:
- Creating new agents
- Adding API endpoints
- Adding MCP tools
- Fixing bugs
This project is licensed under the MIT License - see the LICENSE file for details.
- Polsia.com - Inspiration for autonomous company building
- AWS Bedrock - LLM inference platform
- Model Context Protocol - Tool integration standard
- Claude - AI model powering agent intelligence
- Documentation: https://docs.buizswarm.com
- Issues: https://github.com/yourusername/buiz-swarm/issues
- Email: support@buizswarm.com
Built with β€οΈ by the BuizSwarm Team