Skip to content

feat(agents): Let top-level agents message each other - #2566

Merged
dcramer merged 1 commit into
mainfrom
feat/top-level-agent-messages
Nov 2, 2026
Merged

dcramer merged 1 commit into
mainfrom
feat/top-level-agent-messages

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

messageAgent now takes the conversation id of another top-level agent (a root Conversation, such as a Slack thread), so agents can coordinate without one being a child of the other.

Access is checked on every send and fails closed:

  • Sender and target must be root Conversations in the same provider tenant.
  • They must have the same scope: both public, or both private (DMs count as private).
  • For a private target, the person behind the sender's Actor must be a member of it. A target they cannot see gets the same error as a missing one, so the error does not show that a private Conversation exists.

The target gets the message as an Event (junior / agent.top_level_message) and runs it as the event system Actor. The sender's Actor and credentials do not cross over (attribution is not authority). Delivery goes through admitAutomatedTurn, so two agents that keep messaging each other stop at the automated-turn limit, as watch Events do.

listAgents and stopAgent stay scoped to the agent tree. Stopping another person's conversation is destructive, and there is no safe list of top-level agents to enumerate.

Known limitation, accepted for now: because the target runs as the system Actor, a private target cannot answer a private sender (no person, so no membership). Public pairs can go both ways.

via @dcramer.

--

View Session [Sentry]

messageAgent now accepts the conversation id of another root Conversation.
The sender and target must be in the same tenant and scope (public or
private), and a private target needs the person behind the sender's Actor
to be a member. The target runs the message as an Event Turn with the
event system Actor, so no sender authority or credentials cross over. The
automated-turn limit gates delivery so two agents cannot loop.

Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 2, 2026 9:35pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

8 screenshot changes — 8 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Attachment · Desktop
Conversation Attachment · Desktop
Changed
Conversation Attachment · Mobile
Conversation Attachment · Mobile
Changed
Conversation Attachment Modal · Desktop
Conversation Attachment Modal · Desktop
Changed
Conversation Child Agent Drawer · Desktop
Conversation Child Agent Drawer · Desktop
Changed
Conversation Child Agent Drawer · Mobile
Conversation Child Agent Drawer · Mobile
Changed
Conversation Share Details · Desktop
Conversation Share Details · Desktop
Changed
Show 2 more changed screenshots
Conversation Sidebar Collapsed · Desktop
Conversation Sidebar Collapsed · Desktop
Changed
Settings Mcp · Desktop
Settings Mcp · Desktop
Changed

@dcramer

dcramer commented Nov 2, 2026

Copy link
Copy Markdown
Member

we're likely going to need to be able to delegate-as-us for agent to agent communications

@dcramer

dcramer commented Nov 2, 2026

Copy link
Copy Markdown
Member

we'll follow up later on list/stop - we'll want those available, but list likely is going to need to let you pass in a conversationId or something like a search param

@dcramer
dcramer merged commit 4970122 into main Nov 2, 2026
48 checks passed
@dcramer
dcramer deleted the feat/top-level-agent-messages branch November 2, 2026 21:44

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 193b3188 Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant