Skip to content

Add scFM execution workflow and route to single_cell_team#97

Open
HendricksJudy wants to merge 3 commits intoaristoteleo:mainfrom
HendricksJudy:main
Open

Add scFM execution workflow and route to single_cell_team#97
HendricksJudy wants to merge 3 commits intoaristoteleo:mainfrom
HendricksJudy:main

Conversation

@HendricksJudy
Copy link
Copy Markdown
Collaborator

This PR integrates single-cell foundation model (scFM) task execution into the analysis expert agent and establishes proper routing for scFM requests. It adds comprehensive execution guidance for the scfm toolset, deprecates the old scfm_router tool in favor of a template-based router, and updates the default team to redirect scFM requests to the dedicated single_cell_team.

Key Changes

analysis_expert.md: Added scfm to the toolsets list and documented a complete scFM execution workflow section that:

Explains how to execute routing decisions from fm_router as typed tool calls
Specifies the typical execution order (preprocess → run → interpret)
Describes handling of validation results and auto-fixes
Clarifies when to fall back to raw Python for custom work
default.md:

Bumped team version from 1.4.0 to 1.5.0
Added "Single-Cell Foundation Model (scFM) tasks" section that instructs the leader agent to redirect scFM requests to single_cell_team instead of attempting them locally
Provides clear guidance on recognising scFM signals (by model name or capability)
toolset.py:

Marked scfm_router tool with exclude=True to hide it from LLM agents
Updated docstring to clarify deprecation and redirect users to the template-based fm_router sub-agent
Removed the in-band deprecation warning from the result dictionary (now only in docstring)
Implementation Details

The changes establish a clear separation of concerns: the default team recognises scFM requests and routes them to single_cell_team, which uses fm_router for model selection and analysis_expert for execution. The old scfm_router tool remains available for internal/test use but is hidden from LLM agents to prevent confusion.

claude and others added 3 commits April 27, 2026 16:51
Three GUI usability issues traced earlier are still present and addressed
together so a "run scFM on my data" request can actually complete:

1. Two overlapping routers — hide the deprecated `scfm_router` tool from
   LLMs via `@tool(exclude=True)` and stop appending a literal
   "DEPRECATED: ..." string to its `warnings[]`, which the chatroom was
   rendering back to users. The method stays callable from Python for
   tests and internal helpers; `route_query` is unchanged.

2. The router plan had no executor — add `scfm` to `analysis_expert`'s
   toolsets and document a short scFM execution workflow telling the
   agent to dispatch each step from `fm_router`'s plan as a typed
   `scfm_*` tool call instead of re-implementing it in raw Python.

3. The default General Team had no path to scFM work — add a short
   "scFM tasks" section to the default leader prompt that, on a clear
   scFM signal (model name or capability), tells the user once to
   switch the chat to `single_cell_team` rather than attempting the
   work without the right tools. Bump default template to 1.5.0.
…cess

Address Codex review on PR #3: the scFM execution workflow conflated all
non-"ready" outcomes from scfm_preprocess_validate. Split into branches
so the agent stops cleanly on "incompatible" (where scfm_run can only
echo the same error) and only proceeds through scfm_interpret_results
after scfm_run actually succeeds.
…ability-SZfkS

Add scFM execution workflow and route to single_cell_team
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