Repository navigation
test(agents): AgentSwarm market-routing acceptance gate (#734) - #873
Merged
Merged
Conversation
Adds the benchmark + CI gate that the #734 acceptance criteria had no code against, and closes out the remaining items (the replayable receipt + grounding half shipped in #822; determinism and the PrometheusMetrics hooks already existed). - benchmarks/agent_swarm_bench.py: deterministic 100-task scenario with 5 per-category specialists + 1 premium generalist. Compares market AgentSwarm vs. a hardcoded round-robin AgentFederation (quality) and vs. always-route-to- best-model (cost). Measured: swarm ~+41% quality over hardcoded federation, ~74% cost reduction vs always-best. - benchmarks/test_agent_swarm_bench.py + agent-swarm-market-gate CI job: hard- enforce >=15% quality improvement and >=25% cost reduction, plus determinism under a fixed seed. - tests/agents/test_agent_swarm_metrics.py: behavioral test (hand-written collector, no mocks) proving AgentSwarm.execute() emits the three dashboard signals — bids/sec, win rate per agent, avg reward. Closes #734
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes out #734 by adding the two quantitative acceptance criteria that had no code against them, and wiring them into CI. The other criteria were already met — the replayable receipt + grounding shipped in #822, and determinism (
seed=42) + thePrometheusMetricsswarm hooks already existed.What lands
benchmarks/agent_swarm_bench.py— a deterministic 100-task scenario of emergent specialization: 5 agents each expert in one task category (high quality, low cost) + 1 premium generalist (good everywhere, expensive). Compares three routing strategies on mean outcome quality and cost:AgentSwarm— routes each task to the in-category specialist,AgentFederation— real round-robin (category-agnostic),benchmarks/test_agent_swarm_bench.py+agent-swarm-market-gateCI job — hard-enforce the targets:tests/agents/test_agent_swarm_metrics.py— behavioral test (hand-written collector, no mocks) provingAgentSwarm.execute()emits the three live-dashboard signals: bids/sec, win rate per agent, avg reward.Verification
Local: benchmark gate 4/4 pass, metrics test passes, full suite 4854 passed,
ruff check src/ tests/+ mypy + async-gate clean. The gate mirrors the existingworld-model-retrieval-gatepattern.Closes #734