A sophisticated multi-agent AI system powered by Claude Sonnet 4.5 that accelerates business growth through intelligent task orchestration. This system coordinates 5 specialized AI agents to handle market research, growth strategies, sales copy, process automation, and content creation.
- π― Manager-Pattern Architecture: Central orchestrator coordinates 5 specialized agents
- π Autonomous Operation: Agents use tools and collaborate without human intervention
- π Production-Ready: FastAPI backend, Docker deployment, comprehensive logging
- π° Cost-Efficient: ~$300-500/month operational costs
- β‘ Fast: Claude Sonnet 4.5 with optimized prompts and tool use
- π Safe: Built-in guardrails, human approval workflows for high-stakes decisions
- Routes tasks to appropriate specialists
- Coordinates multi-agent workflows
- Validates outputs for quality
- Manages human approval workflows
- Market research and sizing
- Competitive analysis
- Opportunity identification
- Data-driven insights
- Customer acquisition strategies
- Growth experiment design
- Viral loop mechanics
- Rapid scaling tactics
- High-converting sales copy
- Landing page optimization
- Email sequences
- Objection handling scripts
- Process documentation (SOPs)
- Automation workflow design
- Scaling playbooks
- Operational systems
- Content strategy and creation
- SEO optimization
- Social media content
- Thought leadership
User Request
β
Manager Agent (Claude Sonnet 4.5)
β
ββββββββββ¬βββββββββββ¬βββββββββββ¬βββββββββββ
βAnalyst βGrowth βSales βSystem βBrand
β βHacker βMachine βBuilder βBuilder
ββββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββββ
β
Tools Layer (Web Search, Data Extraction, etc.)
β
Results Aggregation & Validation
β
User Response
- Python 3.11+
- Docker & Docker Compose (optional, for containerized deployment)
- Anthropic API Key (Claude)
- Optional: Brave Search API or SerpAPI key for web search
-
Clone the repository
git clone <repository-url> cd autonomous-ai-team
-
Set up environment
cp .env.example .env # Edit .env and add your API keys -
Install dependencies
pip install -r requirements.txt
-
Run the application
Option A: Direct Python
python main.py
Option B: Uvicorn
uvicorn main:app --reload --host 0.0.0.0 --port 8000
Option C: Docker
cd docker docker-compose up --build -
Access the API
- API: http://localhost:8000
- Interactive Docs: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
curl -X POST "http://localhost:8000/api/v1/tasks" \
-H "Content-Type: application/json" \
-d '{
"task": "Analyze the SaaS project management market and identify top 3 opportunities for design teams",
"context": {
"product": "AI-powered task management for designers",
"budget": "$10,000"
}
}'import asyncio
from src.agents.manager import ManagerAgent
async def main():
manager = ManagerAgent()
result = await manager.run(
task="Create a growth strategy to acquire 1,000 customers in 60 days",
context={
"product": "AI code review tool",
"current_customers": 100,
"budget": "$15,000"
}
)
print(result["result"])
asyncio.run(main())from src.agents.analyst import AnalystAgent
async def analyze_market():
analyst = AnalystAgent()
result = await analyst.run(
task="Analyze the AI-powered productivity tools market"
)
print(result["result"])python scripts/example_usage.pyEdit .env file to configure:
# Required
ANTHROPIC_API_KEY=your_claude_api_key
# Optional
BRAVE_API_KEY=your_brave_search_key # For web search
SERPAPI_KEY=your_serpapi_key # Alternative web search
# Model Settings
DEFAULT_MODEL=claude-sonnet-4-5
MAX_TOKENS=4096
TEMPERATURE=0.7
# Rate Limiting
MAX_COST_PER_DAY=50.0
RATE_LIMIT_PER_MINUTE=60
# Human Approval
FINANCIAL_APPROVAL_THRESHOLD=1000.0
AUTO_APPROVE_CONTENT=true
AUTO_APPROVE_ANALYSIS=trueCreate and execute a task
Request:
{
"task": "Your task description",
"context": {
"key": "value"
},
"agent": "manager", // or specific agent: analyst, growth_hacker, etc.
"max_iterations": 10
}Response:
{
"task_id": "task_abc123",
"success": true,
"agent_id": "manager",
"result": "Detailed result...",
"iterations": 3,
"elapsed_seconds": 12.5,
"usage": {
"input_tokens": 1500,
"output_tokens": 2000
}
}List all available agents and their capabilities
Get current system configuration
Health check endpoint
autonomous-ai-team/
βββ src/
β βββ agents/ # Agent implementations
β β βββ manager.py # Manager agent (orchestrator)
β β βββ analyst.py # Market research agent
β β βββ growth_hacker.py # Growth strategy agent
β β βββ sales_machine.py # Sales copy agent
β β βββ system_builder.py # Process automation agent
β β βββ brand_builder.py # Content creation agent
β βββ core/ # Core system components
β β βββ agent_base.py # Base agent class
β β βββ tools.py # Tool implementations
β β βββ prompts.py # System prompts for all agents
β β βββ config.py # Configuration management
β β βββ logger.py # Logging setup
β βββ api/ # FastAPI application
β βββ routes.py # API endpoints
β βββ models.py # Pydantic models
βββ docker/ # Docker configuration
β βββ Dockerfile
β βββ docker-compose.yml
βββ scripts/ # Utility scripts
β βββ example_usage.py # Usage examples
βββ requirements.txt # Python dependencies
βββ .env.example # Environment template
βββ main.py # Application entry point
- Cost Control: Max daily spending limits
- Rate Limiting: Request throttling
- Human Approval: High-stakes decisions require approval
- Input Validation: Sanitized inputs
- Error Handling: Graceful degradation
The system automatically requests human approval for:
- Financial commitments >$1,000
- Major strategic pivots
- Legal/compliance matters
- Brand-impacting public communications
Configure thresholds in .env:
FINANCIAL_APPROVAL_THRESHOLD=1000.0
AUTO_APPROVE_CONTENT=true
AUTO_APPROVE_ANALYSIS=trueThe system uses structured logging (structlog) with the following levels:
INFO: Normal operations, agent executionsWARNING: Human approval requests, retriesERROR: Failures, exceptions
View logs:
# Docker
docker-compose logs -f app
# Direct
# Logs are output to console# Run example scripts
python scripts/example_usage.py
# Test API endpoints
curl http://localhost:8000/health
curl http://localhost:8000/api/v1/agents
# Test a simple task
curl -X POST "http://localhost:8000/api/v1/tasks" \
-H "Content-Type: application/json" \
-d '{"task": "List the capabilities of your team"}'uvicorn main:app --reloadcd docker
docker-compose up -d-
Build and push Docker image
docker build -f docker/Dockerfile -t autonomous-ai-team:latest . docker tag autonomous-ai-team:latest your-registry/autonomous-ai-team:latest docker push your-registry/autonomous-ai-team:latest -
Deploy to cloud
- AWS: Use ECS/Fargate or EC2
- GCP: Use Cloud Run or Compute Engine
- Azure: Use Container Instances or App Service
-
Set up monitoring
- CloudWatch (AWS) / Cloud Logging (GCP)
- Set up alerts for errors and high costs
-
Configure auto-scaling
- Scale based on API request volume
- Monitor token usage and costs
- Claude API: ~$200-300/month (3-5M tokens)
- Infrastructure: ~$50-100/month (small instance)
- Web Search API: ~$50/month
- Total: $300-450/month
- Claude API: ~$1,000-1,500/month (10-15M tokens)
- Infrastructure: ~$200-300/month (scaled instances)
- Web Search API: ~$100-200/month
- Total: $1,300-2,000/month
- Use aggressive caching for repeated queries
- Batch similar requests
- Monitor and set daily spending limits
- Use Haiku model for simple tasks (future enhancement)
-
Create agent class in
src/agents/:from src.core.agent_base import SpecialistAgent from src.core.prompts import PROMPTS class MyCustomAgent(SpecialistAgent): def __init__(self, model: str = None): super().__init__( agent_id="my_custom_agent", specialty="my_specialty", model=model ) @property def system_prompt(self) -> str: return PROMPTS["my_custom_agent"]
-
Add prompt to
src/core/prompts.py:MY_CUSTOM_AGENT_PROMPT = """ # IDENTITY You are... # MISSION ... """ PROMPTS["my_custom_agent"] = MY_CUSTOM_AGENT_PROMPT
-
Register in Manager (
src/agents/manager.py):from .my_custom_agent import MyCustomAgent self.specialist_agents["my_custom"] = MyCustomAgent(model=model)
-
Create tool class in
src/core/tools.py:class MyCustomTool(Tool): @property def name(self) -> str: return "my_tool" @property def description(self) -> str: return "Description of what my tool does" @property def input_schema(self) -> Dict[str, Any]: return {...} async def execute(self, **kwargs) -> Dict[str, Any]: # Tool implementation return {"success": True, "data": ...}
-
Register tool:
tool_registry.register(MyCustomTool())
- API Documentation: http://localhost:8000/docs
- Architecture: See PRD in project root (if included)
- Claude Documentation: https://docs.anthropic.com/
- Prompt Engineering: https://docs.anthropic.com/claude/docs/prompt-engineering
1. API Key Not Working
# Verify your .env file
cat .env | grep ANTHROPIC_API_KEY
# Test the key
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01"2. Web Search Not Working
- Ensure you have either
BRAVE_API_KEYorSERPAPI_KEYset - Check API key validity
- Agents will work without web search but with limited research capabilities
3. Docker Container Won't Start
# Check logs
docker-compose logs app
# Rebuild
docker-compose down
docker-compose up --build4. High Token Usage / Costs
- Reduce
MAX_TOKENSin .env - Decrease
max_iterationsin API requests - Implement caching for repeated queries
- Use more specific, focused prompts
Contributions are welcome! Areas for improvement:
- Additional specialist agents (e.g., Data Analyst, Customer Success)
- More sophisticated tools (database queries, API integrations)
- Advanced evaluation metrics
- Dashboard UI for monitoring
- Celery integration for async task processing
- PostgreSQL integration for persistent storage
[Your License Here]
- Built with Claude Sonnet 4.5 by Anthropic
- Inspired by modern agentic AI patterns
- Designed for real-world business impact
For issues, questions, or feature requests:
- Open an issue on GitHub
- [Your contact information]
Built with β€οΈ and π€ by [Your Name/Company]