Skip to content

feat: inject available agents into system prompt#352

Open
mrjasonroy wants to merge 1 commit into
keinsaasforever:mainfrom
mrjasonroy:feature/inject-available-agents-clean
Open

feat: inject available agents into system prompt#352
mrjasonroy wants to merge 1 commit into
keinsaasforever:mainfrom
mrjasonroy:feature/inject-available-agents-clean

Conversation

@mrjasonroy

Copy link
Copy Markdown
Contributor

Summary

  • When no agent is selected, the system prompt now includes a list of available agents with their names and descriptions
  • This allows the AI to suggest relevant agents when the user's request would benefit from specialized expertise
  • Users are informed they can select agents via @mention, tools menu, or sidebar

Changes

  • Added rememberAvailableAgentsAction with 5-minute cache in actions.ts
  • Updated buildUserSystemPrompt to accept optional availableAgents parameter
  • Added <available_agents> section to prompt when no agent is selected
  • Added cache key for available agents
  • Added unit tests for the new functionality

Test plan

  • Types check passes
  • Lint passes
  • Unit tests pass (5 new tests for prompt builder)
  • Manual test: Start a new chat without an agent, verify AI can suggest agents
  • Manual test: Start a chat with an agent selected, verify agents section is not included

🤖 Generated with Claude Code

When no agent is selected, the system prompt now includes a list of
available agents with their names and descriptions. This allows the AI
to suggest relevant agents when the user's request would benefit from
specialized expertise.

- Add rememberAvailableAgentsAction with 5-minute cache
- Update buildUserSystemPrompt to accept availableAgents parameter
- Add <available_agents> section to prompt when no agent selected
- Add unit tests for the new functionality

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Dec 20, 2025

Copy link
Copy Markdown

@mrjasonroy is attempting to deploy a commit to the cgoinglove's projects Team on Vercel.

A member of the Team first needs to authorize it.

@theuargb

theuargb commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

i think this could be very useful, possibly guarded with .env feature flag.

i think what we call Agents are really Skills now,
and skill activation should be automated for the ux.

if better-chatbot will evolve agents into skills this idea seems to be solid foundation

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