使用说明
Agency Swarm GitHub Template
A production-ready template for deploying Agency Swarm agencies with Docker containerization and automated deployment to the Agencii cloud platform.
🌐 Agencii - The official cloud platform for Agency Swarm deployments
🔗 GitHub App - Automated deployment integration
🚀 Quick Start
1. Use This Template
Click "Use this template" to create your own repository, or:
git clone https://github.com/your-username/agency-github-template.git
cd agency-github-template
🌐 For Production: Sign up at agencii.ai and use this template for automated cloud deployment
2. Install Dependencies
pip install -r requirements.txt
3. Set Up Environment Variables
Create a .env file in the root directory:
# Required
OPENAI_API_KEY=your_openai_api_key_here
# Optional - Add any additional API keys your agents need
# EXAMPLE_API_KEY=your_api_key_here
4. Test the Example Agency
python agency.py
This runs the example agency in terminal mode for testing.
💡 Pro Tip: For creating your own agency, open this template in Cursor IDE and use the AI assistant with the
.cursor/rules/workflow.mdcfile for automated agency creation!
🏗️ Project Structure
agency-github-template/
├── agency.py # Main entry point
├── requirements.txt # Python dependencies
├── Dockerfile # Container configuration
├── .env # Environment variables (create this)
├── example_agent/ # Your agency folder
├── __init__.py
├── example_agent.py
├── instructions.md
├── files/ # Local files accessible to the agent (via files_folder)
└── tools/
└── ExampleTool.py
├── example_agent2/
├── agency_manifesto.md # Shared instructions
├── requirements.txt
├── .env
└──...
🔧 Creating Your Own Agency
🤖 AI-Assisted Agency Creation with Cursor
This template includes AI-powered agency creation using Cursor IDE:
-
Open this project in Cursor IDE
-
Use the AI Assistant to create your agency by referencing:
📁 .cursor/rules/workflow.mdc -
Simply ask the AI:
"Create a new agency using the .cursor workflow"
The AI will guide you through the complete 7-step process:
- ✅ PRD Creation
- ✅ Folder Structure Setup
- ✅ Tool Development
- ✅ Agent Creation
- ✅ Agency Configuration
- ✅ Testing & Validation
- ✅ Iteration & Refinement
📋 What the AI Will Do For You
The AI assistant will automatically:
- Create proper folder structures
- Generate agent classes and instructions
- Build custom tools with full functionality
- Set up communication flows
- Create the main agency file
- Test everything to ensure it works
🚀 Manual Alternative (Advanced Users)
If you prefer manual setup, replace the ExampleAgency/ folder with your own agency structure following the Agency Swarm conventions.
Agency Structure Requirements
Your agency must follow this structure:
- Agency Folder: Contains all agents and manifesto
- Agent Folders: Each agent has its own folder with:
AgentName.py- Agent class definitioninstructions.md- Agent-specific instructionstools/- Folder containing agent tools
- agency_manifesto.md - Shared instructions for all agents
🚀 Production Deployment with Agencii
🌐 Deploy to Agencii Cloud Platform
For production deployment, use the Agencii platform:
Step 1: Create Account & Use Template
- Sign up at agencii.ai
- Use this template to create your repository
- Develop your agency using Cursor IDE with
.cursorworkflow
Step 2: Install GitHub App
- Install the Agencii GitHub App
- Grant permissions to your repository
- Configure environment variables in Agencii dashboard
Step 3: Deploy
- Push to main branch - Agencii automatically detects and deploys
- Monitor deployment in your Agencii dashboard
- Access your live agency via provided endpoints
🔄 Automatic Deployments
- Auto-deploy on every push to
mainbranch - Zero-downtime deployments with rollback capability
- Environment management through Agencii dashboard
🔨 Development Workflow
🎯 Recommended: AI-Assisted Development
- Open Cursor IDE with this template
- Ask the AI: "Create a new agency using the .cursor workflow"
- Follow the guided process - the AI handles everything automatically
- Test your agency:
python agency.py - Deploy to production: Install Agencii GitHub App and push to main
⚙️ Manual Development (Advanced)
If you prefer hands-on development:
- Create Tools: Build agent tools in
tools/folders - Configure Agents: Write
instructions.mdand agent classes - Test Locally: Run
python agency.py - Deploy: Push to your preferred platform
The .cursor/rules/workflow.mdc file contains the complete development specifications for manual implementation.
📚 Key Features
- 🌐 Agencii Cloud Deploy: One-click deployment to Agencii platform
- 🤖 AI-Assisted Creation: Built-in Cursor IDE workflow for automated agency development
- 🔄 Auto-Deploy: Automatic deployment on push to main branch
- 🚀 Ready-to-Deploy: Dockerfile and requirements included
- 🔧 Modular Structure: Easy to customize and extend
- 🛠️ Example Implementation: Complete working example
- 📦 Container Ready: Docker configuration for any platform
- 🔒 Environment Management: Secure API key handling via Agencii dashboard
- 🧪 Local Testing: Terminal demo for development
- 📋 Guided Workflow: 7-step process with AI assistance
📖 Learn More
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
⚡ Quick Tips
- Start Small: Begin with 1-2 agents and expand
- Test Tools: Each tool should work independently
- Clear Instructions: Write detailed agent instructions
- Environment Setup: Always use
.envfor API keys - Documentation: Update instructions as you develop
Ready to build your AI agency? 🤖✨
🌐 Production Route (Recommended)
- Sign up at agencii.ai
- Use this template to create your repository
- Install Agencii GitHub App
- Push to main → Automatic deployment!
🛠️ Development Route
Open this template in Cursor IDE and ask the AI to create your agency using the .cursor workflow. The AI will handle everything from setup to testing automatically!
For manual development, replace the ExampleAgency with your own implementation and start deploying intelligent agent systems!