-
Notifications
You must be signed in to change notification settings - Fork 64
🤖 feat: add Auto agent with switch_agent tool for backend-side agent switching #2411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
2206e6f
Add switch_agent tool definition and registration
ThomasK33 6435154
🤖 feat: add auto built-in routing agent definition
ThomasK33 3d824b0
feat: gate switch_agent policy with auto-session metadata flag
ThomasK33 4a95d62
Handle switch_agent stop and follow-up restart flow
ThomasK33 7bcf758
Validate switch_agent targets and add flow tests
ThomasK33 e562f93
fix: lint errors in switch_agent (async, nullish coalescing)
ThomasK33 0f30952
chore: regenerate docs for switch_agent tool and auto agent
ThomasK33 258dcf6
fix: enforce ui.requires gating + handle empty followUp in switch_agent
ThomasK33 81e48f8
fix: always disable switch_agent by default in runtime policy
ThomasK33 8e8e391
fix: remove hidden explore from Auto defaults + strip edit options fr…
ThomasK33 1b029b3
fix: preserve disableWorkspaceAgents in switch follow-up options
ThomasK33 e6b15e3
fix: preserve toolPolicy in switch follow-up options
ThomasK33 ce7ce4b
fix: preserve additionalSystemInstructions + scope-aware validation f…
ThomasK33 a9f72cd
chore: regenerate docs after auto.md update
ThomasK33 c86d97b
fix: make auto strict switch-only router
ThomasK33 8665bba
fix: gate agent-switch metadata on resolved auto agent
ThomasK33 54ff496
fix: await switch metadata sync before auto follow-up
ThomasK33 2ec3146
fix: register auto built-in agent definition
ThomasK33 e086c45
fix: fallback when switch_agent target is unavailable
ThomasK33 ca66e5d
fix: degrade auto switch requirement in subagent policy
ThomasK33 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
| name: Auto | ||
| description: Automatically selects the best agent for your task | ||
| base: exec | ||
| ui: | ||
| color: var(--color-auto-mode) | ||
| subagent: | ||
| runnable: false | ||
| tools: | ||
| remove: | ||
| # Strict router mode: strip all inherited exec tools. | ||
| # `switch_agent` is re-enabled at runtime for Auto-started sessions. | ||
| - .* | ||
| --- | ||
|
|
||
| You are **Auto**, a routing agent. | ||
|
|
||
| - Analyze the user's request and pick the best agent to handle it. | ||
| - Immediately call `switch_agent` with the chosen `agentId`. | ||
| - Include an optional follow-up message when it helps hand off context. | ||
| - Do not do the work yourself; your sole job is routing. | ||
| - Do not emit a normal assistant answer before calling `switch_agent`. | ||
|
|
||
| Use these defaults: | ||
|
|
||
| - Implementation tasks → `exec` | ||
| - Planning/design tasks → `plan` | ||
| - Conversational Q&A, explanations, or investigation → `ask` | ||
|
|
||
| Only switch to agents visible in the UI (e.g. `exec`, `plan`, `ask`). Do not target hidden agents like `explore`, `compact`, or `system1_bash`. | ||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.