Referencing Agents and Flows in the UI MVP Proposal

Product requirements:

  1. Users need to be able distinguish when they're interacting with humans vs AI entities.
  2. Users need to be able distinguish when they're interacting with Agents vs Flows
  3. Users need to understand how to initiate an interaction with a Flow, an External Agent, or other Agents.

Stretch goals:

  1. Users need to be able distinguish when they're interacting with External Agents vs Other Agents.

Constraints

  1. All agents and flows are capable of taking actions and having those actions recorded in work items. Any agent can add a comment to an issue, for example.
  2. Only Flows and External Agents may have work items assigned to them.
  3. Only Flows and External Agents may be referenced in a comment of a work item.
  4. Flows and External Agents cannot be selected for chat interactions in the side panel.
  5. Obviously, change as little as possible in order to hit GA release targets.

Proposal

Distinguishing Entities

These two changes would minimally, but adequately, satisfy requirements 1, 2, and 4.

  1. Account Name Prefixes. Reserve the prefixes of ai- and duo- exclusively for AI entity service account names. No other users or service accounts may begin with that prefix. Any accounts currently starting with those strings are migrated. Without preventing new accounts from using the prefix, or migrating any existing accounts, users would not be able to have absolute trust in the prefix as a signal of an entity's non-human status. A new user could create an account name to impersonate an agent.
  2. Account Name Suffixes. Add a type suffix to each AI entity's service account name that denotes entity type. -agent , -flow, and -external-agent. This would be before the suffix that denotes which namespace the entity has been enable within.

Example account names for a top level group named "Acme":

Foundational:
duo-developer-agent-acme
duo-issue-to-mr-flow-acme

Custom:
ai-onboarding-buddy-agent-acme
ai-generate-release-notes-flow-acme

External:
ai-claude-code-external-agent-acme

Invoking Entities

These would minimally satisfy requirement 3, as users would have ways to initiate actions with all entity types.

  1. At-mention Flows or Ext. Agents. By using service accounts, we already will have this capability, lets use it rather than build a new system. Ensure that entity descriptions appear as well as names. Non-external agents would not appear as an option.
  2. Assign to Flows or Ext. Agents. By using service accounts, we already will have this capability, lets use it rather than build a new system. Ensure that entity descriptions appear as well as names. Non-external agents would not appear as an option.
  3. Flows and Ext. Agents do not appear as options in chat. No change from current behavior, users can only select Foundational or Custom agents to chat with.

Alternative

Alternatively, we could satisfy requirement 3 through these changes.

  1. Build Flow slash commands. Allow users to enter /flow {entity-name} in a comment fields to trigger a flow. Example flow command: /flow duo-issue-to-mr-flow-acme
  2. Remove Comment and Assign trigger support from flows. Flows can no longer be triggered by any assign action, or any comment. They can only be triggered by /flow commands, or discrete UI buttons. Would remove potentially mismatched interactions where users attempto to assign the "Fix Pipline" flow to an issue, for example. Or attempt to assign the "Issue to MR" flow to an MR.
  3. External Agents can retain comment and assign trigger support. Users can still assign issues/mrs to external agents, or ask them questions in comments.

This approach would require more effort, but could remove any potential confusion around wether or not it is possible to chat with flows, or if flows should be interacted with like people.

Enhancements

  1. Display Name Badges. Add an 'AI:Agent' or 'AI:Flow' badge after any place the display name is shown, so users don't have to view the account name to discern entity type.
  2. Redirection. If someone tries to at-mention a chat agent, push them to chat. If someone tries to chat an exteneral agent, push them to comments.
  3. Duo Suggestions. Duo can suggest specific agents or flows to use.
  4. **Trigger Compatibility for Flows and Ext. Agents. ** Allow owners of flows and external agents to flag which triggers their entities support, and in which contexts. For example, Issue to MR would support assignment, but only to Issues. This would prevent mismatched attempts at invoking entities that cannot or should not attempt to be triggered from certain contexts.
  5. Avatar templates or patterns attempting to communicate Agent/Ext.Agent/Flow and distinguishing between Human/AI.

Likely Questions

  1. What about using @@ to comment to external agents? Not necessary if we take the approach of the proposal point 10. Would be necessary if we do not reserve prefixes. In which case, the account name should not have any prefixes, remove point 10 entirely, and anywhere the AI entity's account name is referenced always show the @@.
  2. What if we want to support comment triggers and assignments for foundational and custom agents in the future? This is why I'm proposing that we allow at-mentioning flows instead of training users into a different interaction pattern.
Edited by Andrew Bacon