Skip to content

Add Moltbook: agent-to-agent collaboration framework on Webex - #1

Open
jpanat wants to merge 1 commit into
mainfrom
claude/agents-humans-webex-moltbook-redhkx
Open

Add Moltbook: agent-to-agent collaboration framework on Webex#1
jpanat wants to merge 1 commit into
mainfrom
claude/agents-humans-webex-moltbook-redhkx

Conversation

@jpanat

@jpanat jpanat commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

This PR introduces Moltbook, a lightweight collaborative notebook that enables AI agents and humans to work together inside a Webex Space. Agents communicate over the real A2A (Agent2Agent) protocol, delegate tasks to one another, and all contributions—human or agent—are mirrored back into Webex under each participant's own identity.

Key Changes

  • A2A Protocol Implementation (moltbook/a2a/)

    • schema.py: Faithful subset of A2A data model (AgentCard, Message, Task, JSON-RPC)
    • client.py: A2AClient for agent-to-agent HTTP calls
    • server.py: FastAPI gateway mounting one A2A endpoint pair per agent
  • Agent Framework (moltbook/agents/)

    • base.py: Agent ABC and AgentContext for routing, delegation, and notifications
    • personas.py: Three concrete agents (Researcher, Coder, Reviewer) with skill-based routing
    • registry.py: Agent roster builder
  • Orchestration (moltbook/core.py)

    • Moltbook class: entry/comment management, skill-based agent routing, A2A delegation
    • Mirrors all contributions (human entries and agent comments) into Webex
  • Webex Integration (moltbook/webex/)

    • base.py: WebexClient interface (spaces, members, messages, transcript)
    • mock.py: In-memory MockWebexClient for zero-setup testing
    • real.py: RealWebexClient using actual Webex Messaging API with per-agent bot tokens
    • factory.py: Auto-selects Real vs Mock based on environment variables
    • webhook.py: Production webhook handler for inbound human messages
  • Demo & Tests

    • cli_demo.py: Runnable end-to-end demo with mocked Webex
    • tests/test_a2a_schema.py: Schema validation tests
    • tests/test_orchestrator.py: Integration tests verifying agent delegation and routing
  • Documentation

    • Comprehensive README with architecture diagram, flow explanation, and setup instructions

Notable Implementation Details

  • Genuine A2A Wire Traffic: Agents call each other over real HTTP JSON-RPC, not in-process function calls, even in the local demo
  • Skill-Based Routing: Agents are selected by matching entry text against their skill tags; Researcher → Coder → Reviewer delegation is triggered by code-related keywords
  • Per-Agent Bot Identity: Each agent has its own Webex bot token, so it appears as a distinct participant in the space
  • Pluggable Transport: Tests use an ASGI-transported httpx client to exercise the real FastAPI app without opening sockets; production uses real HTTP
  • Extensible Personas: Agent logic is currently canned (keyword extraction, template responses); ready to swap in LLM calls (e.g., Anthropic API) per persona

Next Steps (Documented)

  • Replace canned agent logic with real LLM calls
  • Populate bot personIds to filter agents' own messages in live spaces
  • Add more agent skills and personas as collaboration patterns grow

https://claude.ai/code/session_01SMbHqeosN9ymAqG2DNQiWK

Introduces a collaborative notebook (Moltbook) layered on a Webex Space,
where humans post entries and a roster of AI agents (Researcher, Coder,
Reviewer) picks them up and delegates between each other over a real A2A
(Agent2Agent) HTTP/JSON-RPC protocol implementation. Each agent gets its
own bot identity so contributions are attributable in the space.

Webex integration is mocked in-memory by default (zero setup) with a
pluggable RealWebexClient + webhook stub for wiring up the live API later.
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.

2 participants