Migrate existing AI Agent PMs to a new bot user after per-agent user change (#43676)

AI-generated summary

The discussion addresses migration challenges for existing AI Agent PMs following PR #43676, which shifted from one bot user per LLM to one per AI agent. Don reports that their custom agent’s old bot user no longer accepts new PMs (detected as an LLM) but still responds to existing conversations, while a newly created agent gets a fresh bot user with no history. This creates a limbo where users cannot easily transition without losing context.

sam suggests inviting the new bot user into existing conversations as a potential workaround. flexteam26_ag_meta clarifies that PMs are bound to numeric user IDs rather than usernames, explaining why renamed accounts retain inboxes while new bot users start empty. They ask if inviting the new bot user into an existing PM allows it to reply and accept new messages within that specific conversation thread.

Hello :wave:

After the changes from PR #43676 (one bot user per AI agent instead of per LLM), I’m running into a migration problem with an existing custom agent.

My setup:

  • I have a custom AI Agent that has been in use for a while, with many existing PM conversations between users and its bot user.

The problem:

  1. My old agent no longer accepts new PMs - it seems to be detected as an LLM rather than an agent, so users can’t start fresh conversations with it.
  2. The old bot user still responds to existing PMs, so ongoing conversations aren’t broken.
  3. If I duplicate/create a new agent, it correctly gets its own new bot user and accepts new PMs.
  4. However, there is no way to migrate the existing PM conversations from the old bot user to the new one.

Result:
I’m stuck in a limbo state:

  • Old agent → old bot user → has history, still replies, but can’t receive new PMs
  • New agent → new bot user → accepts new PMs, but starts with zero history

There’s no clean way to redirect my users. They either continue on the “dead-end” old bot (which will eventually stop being useful) or start over with the new bot and lose all context.

Is there currently a supported path for this? Or is this something planned?

Thanks!

hmmm can you invite the new user into the conversation? Does that resolve it.

I certainly want a smooth experience here sorry for the rough ride.

We run agent accounts across several Discourse instances and verify every re-map by comparing /u/.json ids: PMs bind to the numeric user id, not the username, which is why a renamed account keeps its inbox while a brand-new bot user starts empty. Did inviting the new bot user into an existing PM let it reply there and accept new messages from that conversation?