agent-topology-optimizer

Optimizes swarm topology and agent placement using genetic algorithms and simulated annealing.

70.1k|8.4k|Updated Jun 2, 2025
One-click install
npx skills add https://github.com/ruvnet/claude-flow --skill agent-topology-optimizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-topology-optimizer
Source: https://github.com/ruvnet/claude-flow/tree/main/.agents/skills/agent-topology-optimizer
Command: npx skills add https://github.com/ruvnet/claude-flow --skill agent-topology-optimizer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Multi-agent swarms often suffer from inefficient communication patterns, high latency, and poor agent placement. This Skill analyzes and reconfigures swarm topology to reduce communication overhead and improve coordination performance.

Core Features & Use Cases

  • Dynamic Topology Reconfiguration: Evaluates hierarchical, mesh, ring, star, and hybrid topologies against workload profiles and migrates to better structures when improvement is measurable.
  • Agent Placement Optimization: Applies genetic algorithms, simulated annealing, particle swarm, and graph partitioning to place agents optimally based on communication patterns.
  • Communication Pattern Optimization: Selects protocols (TCP, UDP, WebSocket, gRPC, MQTT), tunes message batching, compression, and routing per agent pair.
  • Use Case: A swarm of 50 agents shows rising latency under load. Invoke this Skill to analyze the current topology, compare candidate structures, and receive a migration plan with estimated improvement.

Quick Start

Ask the agent to analyze the current swarm topology and recommend an optimized configuration for the given workload profile.

Frequently Asked Questions about agent-topology-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize swarm topology for multi-agent systems?

Analyze the current topology's latency, throughput, and bottleneck metrics, then evaluate candidate structures like hierarchical, mesh, or hybrid against the workload profile. Apply a migration plan only when the projected improvement exceeds the configured threshold.

What algorithms work for agent placement optimization?

The Skill implements genetic algorithms, simulated annealing, particle swarm optimization, graph partitioning, and ML-based placement. It runs multiple algorithms in parallel and combines results through ensemble optimization to select the best placement.

Which communication protocol should agents use for low latency?

Protocol selection depends on the communication pattern between agent pairs. UDP and MQTT offer low latency and overhead, gRPC balances low latency with high reliability, while TCP prioritizes reliability at higher overhead.

When should I not change the swarm topology?

Avoid reconfiguration when the evaluated improvement falls below the minimum threshold (default 0.1) or when migration downtime outweighs benefits. The optimizer returns no recommendation when no significant improvement is found.

Does topology optimization integrate with Claude Flow MCP tools?

Yes, it uses MCP hooks such as swarm_status, performance_report, bottleneck_analyze, topology_optimize, and swarm_scale to gather metrics, apply optimizations, and monitor impact after changes.