feat(multiagent): TPCP adapter for cross-device agent communication#1712
Open
Etriti00 wants to merge 1 commit intosipeed:mainfrom
Open
feat(multiagent): TPCP adapter for cross-device agent communication#1712Etriti00 wants to merge 1 commit intosipeed:mainfrom
Etriti00 wants to merge 1 commit intosipeed:mainfrom
Conversation
Adds pkg/multiagent/tpcp — a thin wrapper around the TPCP Go SDK that gives PicoClaw agents network-level messaging without replacing the existing in-process blackboard. Key capabilities: - Ed25519 identity (generated or deterministic from 32-byte seed) - Direct P2P WebSocket listener (ListenAsync) + outbound Connect - Relay support for NAT traversal (wss://relay.agent-telepathy.io) - BROADCAST / TASK_REQUEST / CRITIQUE intent routing to OnMessage handlers - Dead-letter queue: messages to offline peers are delivered on reconnect - Thread-safe handler registration; chainable OnMessage API Closes sipeed#294
Collaborator
|
The target of this PR might need to point to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #294 — Multi-device agent coordination
Problem
PicoClaw's in-process blackboard is excellent for coordinating agents on a single device, but offers no solution once agents are on separate machines (Raspberry Pi → cloud VM → laptop). Issue #294 asked for a network-level transport that fits naturally alongside the existing architecture.
Solution
This PR adds
pkg/multiagent/tpcp— a thin, idiomatic Go adapter around the TPCP (Telepathy Communication Protocol) SDK. TPCP provides:wss://relay.agent-telepathy.iowithout port-forwardingThe adapter deliberately does not replace the blackboard — it is a network transport layer that sits alongside it.
API
Optional config (nil = safe defaults):
Files changed
pkg/multiagent/tpcp/adapter.gopkg/multiagent/tpcp/adapter_test.gogo.modgithub.com/Etriti00/agent-telepathy/tpcp-go v0.4.1Testing
Unit tests cover: empty agentID validation, seed length validation, nil config defaults, key generation, chainable
OnMessage,Stopbefore connect, connect to unreachable address,Sendwithout connection,ListenAsync+Stop, custom framework/capabilities config.After merging, run:
go mod tidy go test ./pkg/multiagent/tpcp/...Dependency
github.com/Etriti00/agent-telepathy/tpcp-go v0.4.1— MIT licensed, published on pkg.go.dev. The TPCP project is the reference implementation of the protocol this PR targets.