Add semantic agent search via agent_vec and find_agents.py#9
Add semantic agent search via agent_vec and find_agents.py#9AaronGoldsmith merged 4 commits intomainfrom
Conversation
…e ranking Introduces a new agent creation method that spawns N parallel Opus calls, each seeded with a different cognitive stance (minimalist, lateral, systems, naive, adversarial), then optionally ranks them via the judge panel before registration. This produces genuinely diverse agents from a single task. - Add `stance` field to AgentRecord (models.py) + DB migration (db.py) - Add `AgentBuilder.diverge()` with parallel async generation + judge ranking - Add `mobius diverge "<task>" --n 5 --no-judge` CLI command - Add `--strategy diverge --task "<task>"` flag to `mobius bootstrap` https://claude.ai/code/session_012PH76ua8FpCuomTWXS1B9W
There was a problem hiding this comment.
Pull request overview
Adds a new “diverge” agent-generation strategy that spawns multiple agents in parallel using different cognitive stances, persists the stance in the DB/model, optionally judge-ranks candidates, and exposes the workflow via CLI.
Changes:
- Add
stancetoAgentRecordand persist it in SQLite (including a migration for existing DBs). - Implement
AgentBuilder.diverge()to generate N agents concurrently across predefined cognitive stances and optionally rank them viaJudgePanel. - Extend CLI:
mobius bootstrap --strategy diverge ...and add a newmobius diverge ...command.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/mobius/models.py |
Adds stance field to the agent record model. |
src/mobius/db.py |
Adds stance column to schema and a migration for existing DBs. |
src/mobius/cli.py |
Adds bootstrap diverge strategy options and introduces mobius diverge command. |
src/mobius/agent_builder.py |
Implements parallel stance-based generation and optional judge ranking. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1aecc4bacc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ith judge ranking" This reverts commit 1aecc4b.
Enables skills (like /mobius-seed) to search the agent registry semantically before creating new agents, avoiding duplicates at scale (50-10k+ agents). Embeds agent descriptions at creation time using sentence-transformers + sqlite-vec. - Add agent_vec virtual table to db.py schema - Embed agent descriptions on create in registry.py - Add find_agents.py script for vec-based agent search - Update /mobius-seed skill to use semantic search - Pass vec_available through to Registry constructors Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…Bash in tools
- Add `diverge` CLI command and `AgentBuilder.diverge()` method for generating
N diverse agent variants per specialization
- Validate `n >= 1` in both `bootstrap` and `diverge` commands
- Validate `strategy` parameter in `bootstrap` against ("default", "diverge")
- Ensure "Bash" is always present and first in tools list in diverge's _generate_one
- Fix champion assignment in bootstrap diverge flow: track first actually inserted
agent rather than using index-based assignment that breaks when slugs are skipped
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 918abde0be
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
agent_vecvirtual table for embedding agent descriptions via sqlite-vecRegistry.create_agent()find_agents.pyscript for semantic similarity search across the agent registryvec_availableflag through toRegistryconstructor/mobius-seedskill to use semantic search before creating agents (avoid duplicates)Why
At scale (50-10k+ agents), exact-match dedup isn't enough. Agents with different names but similar descriptions waste competition slots. Semantic search lets skills check "does something like this already exist?" before creating new agents.
Files changed
src/mobius/registry.py—vec_availableparam,_embed_agent()on createsrc/mobius/db.py—AGENT_VEC_TABLE_SQL, create ininit_dbsrc/mobius/cli.py— Passvec_availableto Registry.claude/skills/mobius-seed/scripts/find_agents.py— New semantic search script.claude/skills/mobius-seed/scripts/create_agent.py— Use 3-arg Registry.claude/skills/mobius-seed/SKILL.md— Updated instructionsTest plan
pytest tests/ -vpython .claude/skills/mobius-seed/scripts/find_agents.py "write python code" --top 5returns ranked agentsagent_vec🤖 Generated with Claude Code