Skip to content

feat(examples): add collaborative agents demo — Internet of Agents with semantic memory#391

Open
Subhajitdas99 wants to merge 2 commits intoGetBindu:mainfrom
Subhajitdas99:feat/collaborative-agents-example
Open

feat(examples): add collaborative agents demo — Internet of Agents with semantic memory#391
Subhajitdas99 wants to merge 2 commits intoGetBindu:mainfrom
Subhajitdas99:feat/collaborative-agents-example

Conversation

@Subhajitdas99
Copy link

Summary

  • Problem: No working example in Bindu showing multiple agents communicating with each other over the A2A protocol — making it hard for developers to understand the Internet of Agents vision in practice.
  • Why it matters: This is the core of what Bindu is building. Developers need a concrete, runnable example to see agents with DID identities calling each other over A2A, not just a single agent running in isolation.
  • What changed: Added examples/collaborative-agents/ — three bindufied agents that communicate over the A2A protocol, with semantic memory and a coordinator pattern. Verified working end-to-end.
  • What did NOT change: No core Bindu code touched. Pure example addition.

Change Type

  • Feature
  • Documentation

Scope

  • Documentation

Linked Issue/PR

  • Related to NightSky / Internet of Agents vision in README

User-Visible / Behavior Changes

New runnable example at examples/collaborative-agents/.

Agent Port Role
research_agent.py 3773 Searches web via DuckDuckGo + LLM
memory_agent.py 3774 Stores/retrieves via semantic similarity
coordinator_agent.py 3775 Orchestrates the other two over A2A

Each agent has its own Bindu DID identity. Coordinator calls research and memory agents over HTTP using A2A message/send + tasks/get — real agent-to-agent communication.

Security Impact

  • New permissions/capabilities? No
  • Secrets/credentials handling changed? No — API key via .env, excluded via .gitignore
  • New/changed network calls? Yes — agents call each other over localhost HTTP
  • Database schema/migration changes? No
  • Authentication/authorization changes? No

Verification

Steps to Test

  1. cd examples/collaborative-agents
  2. pip install -r requirements.txt
  3. Set OPENROUTER_API_KEY in .env
  4. Run python research_agent.py in Terminal 1
  5. Run python memory_agent.py in Terminal 2
  6. Run python coordinator_agent.py in Terminal 3
  7. Send query to coordinator at http://localhost:3775/ — see README for curl commands

Actual Behavior — Verified

  • All three agents start with unique DID identities
  • First query: cache miss → research agent → web answer → stored in memory
  • Second identical query: cache hit → instant answer from memory
  • Every response includes did.message.signature (cryptographic DID signing)

Evidence

  • Verified working end-to-end locally
  • DID signatures present on all responses
  • Memory retrieval confirmed on repeat queries

Human Verification

  • Verified: First query cache miss → research → store. Second query cache hit → instant memory response.
  • Edge cases: API key not set → research fails gracefully. Empty memory → coordinator falls back correctly.
  • Not verified: Multi-user concurrent queries (in-memory store is single-process)

Compatibility / Migration

  • Backward compatible? Yes — pure addition, nothing modified
  • Config/env changes? No
  • Database migration needed? No

Failure Recovery

  • How to disable: Don't run the example — zero impact on core Bindu
  • Known symptoms: If OpenRouter unreachable, research agent fails gracefully

Risks and Mitigations

  • Risk: In-memory semantic store lost on process restart
    • Mitigation: Scoped as demo only. Production would use Postgres + pgvector. Documented in README.

Checklist

  • Verified working end-to-end locally
  • .env excluded via .gitignore
  • requirements.txt included
  • README with architecture, setup, and curl commands for Linux + Windows
  • Zero core Bindu code changed

Three bindufied agents demonstrating A2A protocol communication:
- research_agent: searches web using DuckDuckGo (port 3773)
- memory_agent: stores/retrieves knowledge via semantic similarity (port 3774)
- coordinator_agent: orchestrates research + memory agents (port 3775)

Each agent has its own DID identity. Coordinator calls research and memory
agents over HTTP using the A2A protocol.

Verified working end-to-end: coordinator retrieves from memory on repeat
queries, falls back to research agent on cache miss, stores new knowledge.

Part of the Internet of Agents vision.
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