agency-swarm-workflow

agency-swarm-workflow is a cursor rule for Cursor from VRSEN/OpenSwarm. It costs 4,621 tokens per session, scanned A, original, MIT.

A set of instructions for creating collaborative AI agents with Agency Swarm, a framework for connecting agents with different roles.

In plain words
What is it for?
Use it to build Agency Swarm projects with agent templates, tools, instructions, communication flows, and tests.
Why use it?
It provides an ordered workflow for exploring a project, creating agents and tools, assembling the agency, and testing it.

Cursor rule for Cursor

About the project

OpenSwarm is an open-source multi-agent system in which specialized agents coordinate to produce deliverables such as presentations, research reports, data visualizations, documents, images, and videos. It is intended for people who want to request complex creative or analytical work from a terminal, with connections to external services. Its catalogue entries define agents, commands, rules, and instructions for those workflows.

VRSEN/OpenSwarm · 2,858 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/vrsen/openswarm/agency-swarm-workflow
Clone the repo
git clone --depth 1 https://github.com/VRSEN/OpenSwarm

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agency-swarm-workflow

README.md
[![agentmods](https://agentmods.dev/badge/rules/vrsen/openswarm/agency-swarm-workflow.svg)](https://agentmods.dev/rules/vrsen/openswarm/agency-swarm-workflow)
Your own site
<a href="https://agentmods.dev/rules/vrsen/openswarm/agency-swarm-workflow"><img src="https://agentmods.dev/badge/rules/vrsen/openswarm/agency-swarm-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,621 This file is loaded in full into every session.
When invoked 4,621 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.04621 $0.04621
Opus 5 $0.02311 $0.02311
Sonnet 5 $0.00924 $0.00924
Haiku 4.5 $0.00462 $0.00462

Measured 5d ago against content hash 773bb03be1ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agency-swarm-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • workflow — 88% identical, 88 lines differ
.cursor/rules/agency-swarm-workflow.mdc · 450 lines

How it starts

The opening of the file, as written. The whole thing — 450 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Swarm Agent Creator Instructions

Agency Swarm is the framework built on the OpenAI Agents SDK. It 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.

The following steps outline how to build AI agents with Agency Swarm:

  1. Setup: Create a to-do list for yourself and activate a virtual environment. If virtual environment does not exist, create it.
  2. Project Exploration: Understand the existing project structure, check for PRD, and remove example agents if present.
  3. Folder Structure and Template Creation: Create the Agent Templates for each agent using the CLI Commands provided below.
  4. Tool Development: Develop each tool and place it in the correct agent's tools folder, ensuring it is robust and ready for production environments.
  5. Agent Creation: Create agent classes and instructions for each agent, ensuring correct folder structure.
  6. Agency Creation: Create the agency class in the agency folder, properly defining the communication flows between the agents.
  7. Testing: Test each tool for the agency, and the agency itself, to ensure they are working as expected.
  8. 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. Read this entire file first before proceeding.

Step 1: Project Exploration

Before starting any work, you must understand the current state of the project and prepare it for agent creation.

Exploration Checklist

  1. Activate virtual environment: Check if venv exists and activate it. If not, create it and install the requirements.txt file. (Note: venv might be named either venv or .venv. Check both.)
  2. Check root directory structure: List files and folders in the project root
  3. Look for PRD: Check if prd.txt exists in the root directory
  4. Check for example agents: Look for folders like example_agent/ or example_agent2/
  5. Review existing files: Read agency.py, shared_instructions.md, agent_name/instructions.md, agent_name/tools/, etc.

Read the full file on GitHub · 450 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 450 lines · 4,621 tokens per session scan A 773bb03be1ec

Subscribe to this mod's changes

agency-swarm-workflow is a cursor rule published in the GitHub repository VRSEN/OpenSwarm (2,858 stars, last pushed 1mo ago), licensed MIT. It adds 4,621 tokens to every session, about $0.0231 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.