Draft
Conversation
There was a problem hiding this comment.
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
evolvefallback that pulls candidate “champions” from winners of similar past tasks viamemory.find_similarwhen 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: |
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.
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:
registry.promote_to_champion, and a success message is displayed to the user.Fallback mechanism for agent evolution:
evolvecommand, if there are no champions for a given specialization, the system will now search for similar past tasks using vector search viamemory.find_similar. Agents from sufficiently similar tasks (similarity ≥ 0.5) are considered as fallback champions, increasing robustness when evolving agents in underrepresented specializations.## WhatWhy
How to test
pytest tests/ -vpasses