Skip to content

feat: add first-class system handle semantics#682

Open
noodleonthecape wants to merge 3 commits intomainfrom
feat/system-handle
Open

feat: add first-class system handle semantics#682
noodleonthecape wants to merge 3 commits intomainfrom
feat/system-handle

Conversation

@noodleonthecape
Copy link
Copy Markdown
Contributor

@noodleonthecape noodleonthecape commented Apr 1, 2026

Summary

  • add first-class system-handle semantics across the Relay SDK and broker types
  • model agent, human, and system participants separately instead of treating system as a special human
  • update protocol/message mapping and tests to preserve sender kind semantics across the stack

Notes

This removes the old conflation where system() was effectively a human handle. System-origin messages remain ergonomic to send, but are now modeled as a distinct participant kind.


Open with Devin

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 6 additional findings in Devin Review.

Open in Devin Review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Python SDK Agent.send_message does not pass from_kind to the broker client

In the Python SDK, Agent.send_message (packages/sdk-py/src/agent_relay/relay.py:204-212) does not pass from_kind to client.send_message(), even though the local Message object is constructed with from_kind="agent" on line 219. This is inconsistent with: (1) the TypeScript SDK's Agent.sendMessage which correctly passes fromKind: 'agent' at packages/sdk/src/relay.ts:1543, (2) the Python SDK's own _ParticipantHandle.send_message which correctly passes from_kind=self._kind at packages/sdk-py/src/agent_relay/relay.py:280. As a result, agent-originated messages from the Python SDK will not carry senderKind in the HTTP payload to the broker, meaning the broker cannot distinguish agent senders from unknown senders. The test at packages/sdk-py/tests/test_send_message_mode.py:89-93 expects from_kind="agent" to be passed and would fail.

(Refers to lines 204-213)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant