Skip to content

feat(agent): start new AI Agent chats on the active brand #913

Closed

Description

@gkhngyk

Description

The AI Agent doesn't know which brand the user is looking at. On the Brand B dashboard, "how is visibility this week?" gets a clarifying question or a list of brands, because:

Proposed behavior

  • A new chat is created with the active brand's id.
  • The chat route loads the conversation's brand_id and passes the brand's name and id into the system prompt as the default brand. The user can still ask about another brand by name.
  • Optionally, the conversation list shows a small brand badge.

Suggested approach

Send { brandId: activeBrandId } from both create calls, read brand_id in the chat route when building the prompt, and adjust rule 2 to "use the conversation's brand unless the user names another one". No migration is needed.

Run yarn lint and yarn build from web/ before opening the PR — see CONTRIBUTING.md.

Activity

  1. added
    enhancement
    good first issue
    help wanted
    on Oct 4, 2026
  2. knockknock10 commented on Oct 7, 2026

    @knockknock10
    Contributor

    Thanks @gkhngyk — I’d like to take #913.

    I traced the current agent flow and noticed the conversations API already supports brandId and persists it on agent_conversations, while new chats from the agent page currently create the conversation without the active brand. The chat route also has the conversation available before the system prompt is built.

    I’d like to connect those pieces so a new chat starts with the active brand as its default context, while still allowing the user to explicitly switch to another brand in the conversation. I’ll also cover the behavior with tests rather than only changing the frontend.

    Please assign it to me if that works.

  3. gkhngyk commented on Oct 7, 2026

    @gkhngyk
    ContributorAuthor

    Assigned, thanks @knockknock10. The plan sounds right. Please keep the brand switch explicit, and reference #913 in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementgood first issuehelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions