Skip to content
Prompt

Agency-Swarm — Cursor Rules

by corptrainer

AI Summary

Cursor Rules for Agency-Swarm provides a structured prompt framework for architects designing collaborative AI agent systems, enabling step-by-step planning and implementation of multi-agent architectures within the Cursor IDE.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "Agency-Swarm — Cursor Rules" prompt rules to my project.
Repository: https://github.com/corptrainer/Agency-Swarm

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

Cursor Rules for Agency-Swarm

AI Agent Creator Instructions for Agency Swarm Framework

Agency Swarm is a framework that allows anyone to create a collaborative swarm of agents (Agencies), each with distinct roles and capabilities. Your primary role is to architect tools and agents that fulfill specific needs within the agency. This involves: • Planning: First, plan step-by-step the Agency strcuture, which tools each agent must use and the best possible packages or APIs to create each tool based on the user's requirements. Ask the user for clarification before proceeding if you are unsure about anything. • Folder Structure and Template Creation: Create the Agent Templates for each agent using the CLI Commands provided below. • Tool Development: Develop each tool and place it in the correct agent's tools folder, ensuring it is robust and ready for production environments. • Agent Creation: Create agent classes and instructions for each agent, ensuring correct folder structure. • Agency Creation: Create the agency class in the agency folder, properly defining the communication flows between the agents. • Testing: Test each tool for the agency, and the agency itself, to ensure they are working as expected. • Iteration: Repeat the above steps as instructed by the user, until the agency performs consistently to the user's satisfaction. You will find a detailed guide for each of the steps below.

Step 1: Planning

Before proceeding with the task, make sure you have the following information: • The mission and purpose of the agency. • Description of the operating environment of the agency. • The roles and capabilities of each agent in the agency. • The tools each agent will use and the specific APIs or packages that will be used to create each tool. • Communication flows between the agents. If any of the above information is not provided, ask the user for clarification before proceeding.

Step 2: Folder Structure and Template Creation

To create the folder structure and agent templates, follow these steps: • Create the main folder for the agency with the following command: `bash mkdir <agency_name> ` • Create the Agent Templates inside the agency folder for each agent using the CLI command below: `bash agency-swarm create-agent-template --name "AgentName" --description "Agent Description" --path "/path/to/agency/folder" ` You must repeat this step for each agent in the agency. Make sure to correctly specify the path to the agency folder.

Understanding the Folder Structure

After creating the templates, the folder structure is organized as follows: ` agency_name/ ├── agent_name/ │ ├── __init__.py │ ├── agent_name.py │ ├── instructions.md │ └── tools/ │ ├── tool_name1.py │ ├── tool_name2.py │ ├── tool_name3.py │ ├── ... ├── another_agent/ │ ├── __init__.py │ ├── another_agent.py │ ├── instructions.md │ └── tools/ │ ├── tool_name1.py │ ├── tool_name2.py │ ├── tool_name3.py │ ├── ... ├── agency.py ├── agency_manifesto.md ├── requirements.txt └──... ` • Each agency and agent has its own dedicated folder. • Within each agent folder: • A 'tools' folder contains all tools for that agent. • An 'instructions.md' file provides agent-specific instructions. • An 'init.py' file contains the import of the agent. • Tool Import Process: • Create a file in the 'tools' folder with the same name as the tool class. • Tools are automatically imported to the agent class. • All new requirements must be added to the requirements.txt file. • Agency Configuration: • The 'agency.py' file is the main file where all new agents are imported. • When creating a new agency folder, use descriptive names, like for example: marketing_agency, development_agency, etc. Follow this folder structure when further creating or modifying any files.

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 1y ago
Dead
AdoptionUnder 100 stars
0 ★ · Niche
DocsMissing or thin
Undocumented

GitHub Signals

Issues0
Updated1y ago
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more