Skip to content

Proposal: inter-agent collaboration & Cotal evaluation#623

Closed
bborn wants to merge 1 commit into
mainfrom
task/4521-cotal-integration
Closed

Proposal: inter-agent collaboration & Cotal evaluation#623
bborn wants to merge 1 commit into
mainfrom
task/4521-cotal-integration

Conversation

@bborn

@bborn bborn commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

Answers the question: can we leverage Cotal in a smart way to enable better inter-agent collaboration?

This PR adds a proposal document only — no runtime behavior changes. It's seeking a direction decision before any implementation.

Recommendation in one line

Adopt Cotal's model, not its runtime. Build native MCP-first agent messaging + presence on the infra taskyou already has (SQLite + the MCP server + the events bus), keep a Cotal bridge as an optional config-gated adapter, and avoid a hard dependency on Cotal's TypeScript + nats-server stack — which would contradict the single-binary, CGO-free, local-first value prop.

What's in the doc

  • What Cotal actually is — multicast/unicast/anycast addressing + presence + A2A AgentCards; and an honest table of what its Node/NATS runtime costs us.
  • The substrate is already here — SQLite = durable delivery, the MCP server = the tool surface agents already trust, task status = presence for free, the events bus = nudges. The build is additive, not a new architecture.
  • Lessons from the closed PR feat(relay): add agent-to-agent messaging system #357 (relay) — keeps its messaging idea but replaces the two things that made it inorganic/unmergeable: fragile idle-detection injection (→ pull-based MCP taskyou_inbox) and a manual agent registry that leaked (→ presence derived from task status). Addresses by task id/channel/role instead of task-title-derived names.
  • Concrete design — one agent_messages table, four MCP tools (taskyou_send_message, taskyou_inbox, taskyou_roster, taskyou_claim), and how messaging makes the existing dependency primitive feel organic by driving auto-unblock.
  • Optional Cotal bridge — A2A-shaped message structs + a config-gated NATS adapter for users already running a mesh; zero cost for the 99% who just want one binary.
  • Phasing + open questions for the direction call.

📄 docs/superpowers/specs/2026-06-25-inter-agent-collaboration-cotal.md

Decision needed

See §8 (Open questions). The key one: approve building Phase 1 (native unicast messaging + roster via MCP) as the next step, keeping Cotal as an optional Phase 3 bridge?

🤖 Generated with Claude Code

Evaluates whether to adopt Cotal (github.com/Cotal-AI/Cotal) for live
inter-agent collaboration. Recommendation: adopt Cotal's *model* (multicast/
unicast/anycast + presence + A2A AgentCards) on taskyou's existing substrate
(SQLite + MCP server + events bus) rather than taking a hard dependency on
its TypeScript/NATS runtime, which contradicts the single-binary, CGO-free,
local-first value prop.

Grounds the design in the lessons from the closed PR #357 (relay): replaces
its fragile idle-detection delivery with pull-based MCP tools, derives presence
from task status (no manual register/unregister memory leak), and addresses by
task id/channel/role instead of task-title-derived names. Keeps a Cotal bridge
as an optional, config-gated Phase 3 adapter for interop.

No runtime behavior change — adds the proposal doc only; seeking a direction
decision before implementation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bborn bborn closed this Jun 27, 2026
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