multi-agent-optimize

A framework for improving an application's performance by coordinating several AI agents. It examines bottlenecks, suggests optimizations, and considers performance goals, scope, resource limits, and quality thresholds.

In plain words
What is it for?
Use it to profile a system, identify slow or expensive areas, choose quick or comprehensive optimizations, and track performance targets.
Why use it?
It organizes performance work across different parts of a system instead of relying on one review. It helps connect speed, resource use, cost, and quality constraints.

Command

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 commands/wshobson/agents/multi-agent-optimize
Clone the repo
git clone --depth 1 https://github.com/wshobson/agents
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,081 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.01081
Opus 5 $0.00000 $0.00541
Sonnet 5 $0.00000 $0.00216
Haiku 4.5 $0.00000 $0.00108

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

Security

Grade A, and why

multi-agent-optimize 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 2d 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

3 near-identical copies found in the catalogue:

plugins/agent-orchestration/commands/multi-agent-optimize.md · 210 lines

How it starts

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

Multi-Agent Optimization Toolkit

Role: AI-Powered Multi-Agent Performance Engineering Specialist

Context

The Multi-Agent Optimization Tool is an advanced AI-driven framework designed to holistically improve system performance through intelligent, coordinated agent-based optimization. Leveraging cutting-edge AI orchestration techniques, this tool provides a comprehensive approach to performance engineering across multiple domains.

Core Capabilities

  • Intelligent multi-agent coordination
  • Performance profiling and bottleneck identification
  • Adaptive optimization strategies
  • Cross-domain performance optimization
  • Cost and efficiency tracking

Arguments Handling

The tool processes optimization arguments with flexible input parameters:

  • $TARGET: Primary system/application to optimize
  • $PERFORMANCE_GOALS: Specific performance metrics and objectives
  • $OPTIMIZATION_SCOPE: Depth of optimization (quick-win, comprehensive)
  • $BUDGET_CONSTRAINTS: Cost and resource limitations
  • $QUALITY_METRICS: Performance quality thresholds

1. Multi-Agent Performance Profiling

Profiling Strategy

  • Distributed performance monitoring across system layers
  • Real-time metrics collection and analysis
  • Continuous performance signature tracking
Profiling Agents
  1. Database Performance Agent

    • Query execution time analysis
    • Index utilization tracking
    • Resource consumption monitoring
  2. Application Performance Agent

    • CPU and memory profiling
    • Algorithmic complexity assessment
    • Concurrency and async operation analysis
  3. Frontend Performance Agent

    • Rendering performance metrics
    • Network request optimization
    • Core Web Vitals monitoring

Profiling Code Example

def multi_agent_profiler(target_system):
    agents = [
        DatabasePerformanceAgent(target_system),
        ApplicationPerformanceAgent(target_system),
        FrontendPerformanceAgent(target_system)
    ]

    performance_profile = {}
    for agent in agents:
        performance_profile[agent.__class__.__name__] = agent.profile()

    return aggregate_performance_metrics(performance_profile)

Read the full file on GitHub · 210 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. 2d ago First seen · 210 lines · 0 tokens per session scan A 0defeb3566f9

Subscribe to this mod's changes

multi-agent-optimize is a command published in the GitHub repository wshobson/agents (39,318 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,081 tokens. 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.