Skip to content

fix: include conversation_starters in agent list projection#12304

Open
inodb wants to merge 1 commit intodanny-avila:mainfrom
cBioPortal:fix/agent-conversation-starters
Open

fix: include conversation_starters in agent list projection#12304
inodb wants to merge 1 commit intodanny-avila:mainfrom
cBioPortal:fix/agent-conversation-starters

Conversation

@inodb
Copy link

@inodb inodb commented Mar 19, 2026

Summary

  • The getListAgentsByAccess query in api/models/Agent.js uses an explicit field projection that was missing conversation_starters
  • This meant the field was never returned to the client, so agent conversation starters could never render in the ConversationStarters component — even when correctly set in the database
  • Adds conversation_starters: 1 to the projection

Context

The original conversation starters feature (PR #3699) was built for assistants, which use a separate documents endpoint. When agents were added later, the agent list projection was written with a hardcoded field list that never included conversation_starters.

Test plan

  • Set conversation_starters on an agent in MongoDB
  • Verify the field is returned by GET /api/agents
  • Confirm starters render on the landing page when selecting that agent
The getListAgentsByAccess query uses an explicit field projection that was missing conversation_starters, so the field was never returned to the client even when set in the database. This meant agent conversation starters could never render in the UI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 19, 2026 05:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the agents list API response to include conversation_starters, enabling the client’s ConversationStarters UI to render starters for agents when configured in MongoDB.

Changes:

  • Add conversation_starters: 1 to the getListAgentsByAccess Mongo projection so GET /api/agents returns the field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 717 to 721
category: 1,
support_contact: 1,
is_promoted: 1,
conversation_starters: 1,
}).sort({ updatedAt: -1, _id: 1 });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants