Feat/agent collaboration#2937
Open
afjcjsbx wants to merge 10 commits into
Open
Conversation
# Conflicts: # pkg/agent/pipeline_llm.go # pkg/agent/pipeline_setup.go # pkg/agent/turn_state.go
Merge upstream/main into main
This was referenced May 25, 2026
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.
📝 Description
This PR introduces a first-class internal Agent Collaboration Bus for PicoClaw.
It adds durable inter-agent communication with:
agent_request,agent_reply, andagent_inboxIt also routes synchronous
delegatecalls through the new collaboration runtime when available, while keeping existing multi-agent primitives backward-compatible.🗣️ Type of Change
🤖 AI Code Generation
🔗 Related Issue
Issue: #2929
📚 Technical Context (Skip for Docs)
delegate/spawn/subagentflow worked well for one-shot delegation, but it did not provide a durable peer-to-peer communication layer between agents. This PR adds a collaboration bus scoped bytarget_agent_id + thread_id, persists mailbox/thread state, isolates collaboration history from user-facing sessions, enforces communication permissions, and emits runtime events for observability.🧪 Test Environment
📸 Evidence (Optional)
Click to view Logs/Screenshots
Validated with targeted tests and linting, including:
go test ./pkg/collab ./pkg/config ./pkg/tools ./pkg/agent -run 'TestStore_PersistsThreadsMessagesAndMailboxes|TestCollaborationBus_|TestCollaborationSessionAliases_|TestDelegateTool_Execute_UsesCollaborationRuntimeWhenConfigured|TestAgentConfig_FullParse|TestAgentRegistry_CanCollaborate_RequiresSendAndReceive|TestAgentRegistry_CommunicationDefaults' -count=1golangci-lint run -E govet -E unused ./... --build-tags=goolm,stdjsonKey coverage includes:
allow_send_to/allow_receive_from)delegatemigration to the collaboration bus☑️ Checklist