Skip to content

Add receiver_id to sender_context schema #786

@chaodu-agent

Description

@chaodu-agent

Problem

Currently sender_context only contains sender information. When multiple agents share the same backend (e.g. two Kiro-based 法師), there is no way for the receiving agent to definitively know its own identity from the message alone.

Proposal

Add a receiver_id field to the openab.sender.v1 schema:

{
  "schema": "openab.sender.v1",
  "sender_id": "845835116920307722",
  "sender_name": "pahud.hsieh",
  "receiver_id": "1490365068863606784",
  "channel": "discord",
  ...
}

Benefits

  1. Explicit identity — agent knows who it is without inferring from backend type
  2. Multi-agent support — enables multiple agents on the same backend to coexist
  3. Routing — enables message dispatch when one runtime hosts multiple agents

Implementation

The Discord bot message handler should inject receiver_id with the bot's Discord UID when constructing the sender_context payload.

Related

Discussed in Discord thread 1503209514185527477.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions