Skip to content

use semantic search for evolve#7

Draft
AaronGoldsmith wants to merge 1 commit intomainfrom
fix/evolve-champion-promotion
Draft

use semantic search for evolve#7
AaronGoldsmith wants to merge 1 commit intomainfrom
fix/evolve-champion-promotion

Conversation

@AaronGoldsmith
Copy link
Owner

This pull request introduces improvements to the agent selection and promotion process in the CLI, focusing on ensuring that the best-performing agents are recognized and that the system can fall back to similar agents when no champions are available.

Agent promotion and export:

  • After a competition, the winning agent is now automatically promoted to champion status using registry.promote_to_champion, and a success message is displayed to the user.

Fallback mechanism for agent evolution:

  • In the evolve command, if there are no champions for a given specialization, the system will now search for similar past tasks using vector search via memory.find_similar. Agents from sufficiently similar tasks (similarity ≥ 0.5) are considered as fallback champions, increasing robustness when evolving agents in underrepresented specializations.## What

Why

How to test

  • pytest tests/ -v passes

Copilot AI review requested due to automatic review settings March 15, 2026 23:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the Mobius CLI’s agent lifecycle by automatically promoting competition winners and making evolve more robust when no champions exist for a specialization by leveraging semantic (vector) memory lookups.

Changes:

  • Auto-promote the competition winner to champion after a successful run.
  • Add an evolve fallback that pulls candidate “champions” from winners of similar past tasks via memory.find_similar when no champions exist for the specialization.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

champions = registry.get_champions(specialization=specialization)
if not champions:
# Fall back: find winning agents from similar past tasks via vector search
matches = memory.find_similar(specialization, top_k=5)
Comment on lines +307 to +310
matches = memory.find_similar(specialization, top_k=5)
seen = set()
for m in matches:
if m.similarity >= 0.5 and m.entry.winning_agent_id not in seen:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants