Skip to content

Add peer-agent context to agents/chat client_context #178

@chubes4

Description

@chubes4

Problem

The canonical agents/chat ability is the right primitive for agent-to-agent chat, but its client_context.source enum currently covers channel/bridge/rest/block and does not have a first-class peer-agent source.

Data Machine can route peer turns through agents/chat today, but it has to describe the request as source=bridge to stay compatible with the current schema. That works, but it blurs the distinction between a user-facing bridge and an agent-to-agent turn.

Desired behavior

  • agents/chat should support a first-class peer-agent context, e.g. client_context.source = agent or peer_agent.
  • The schema should document peer-agent metadata such as caller agent, call depth, root request/correlation IDs, and whether the turn is a delegated sub-question.
  • Consumers can use that context for observability, loop prevention, transcript labeling, and policy.

Suggested implementation shape

  • Extend the client_context.source enum with an agent/peer value.
  • Add optional schema fields for peer calls, such as caller_agent, peer_agent_call, agent_chat_depth, and caller_session_id.
  • Keep the canonical agents/chat contract as the only chat primitive; do not add a parallel ask-agent ability.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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