Skip to content

Channel bridge: prefix outbound messages with agent name #980

@aris-relay

Description

@aris-relay

Feature Request

When multiple agents are active and routable via channels (Discord, Telegram, etc.), there's no way for the user to know which agent is responding. The agent name should be visible in the message without requiring system prompt hacks.

Proposed Behavior

The channel bridge should automatically prefix or tag outbound messages with the responding agent's name. For example in Discord:

[platform-architect] Here's my assessment of the current setup...

Or better yet, use platform-native features:

  • Discord: embed with agent name in the author field, or bold prefix
  • Telegram: bold prefix
  • Slack: bot username override per message (Slack API supports this)

Why

  • Multi-agent setups need identity visibility at the gateway level, not the prompt level
  • Putting it in the system prompt wastes tokens and is fragile (agents may forget)
  • Users switching agents via !agent need confirmation of who they're now talking to
  • Debugging and auditing are easier when agent identity is visible in the message history

Suggested Implementation

In bridge.rs where outbound messages are sent to the adapter, prepend the agent name:

let tagged_message = format!("[{}] {}", agent_name, response_text);
adapter.send(channel_id, &tagged_message).await;

Ideally this would be configurable per-channel in ChannelOverrides:

[channels.discord.overrides]
show_agent_name = true  # default: false

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions