How heywhyayo/a2a_multi_agent works
This repository implements a NestJS crypto-research multi-agent service: clients submit A2A JSON-RPC tasks to an orchestrator, which delegates research and report formatting to specialist agents and returns task results or streamed updates. The researcher and formatter also expose task and agent-card endpoints. Shared A2A types and utilities define the protocol and task-building helpers. The README is a generic NestJS starter and does not document these product capabilities; some delegation and LLM interactions are only partially sampled, so those links are marked unverified.
Main entry points: a2a.types.ts A2A contracts · a2a.utils.ts Task utilities · tasks.controller.ts Orchestrator tasks · orchestrator.service.ts Orchestrator
Components 16
Task coordination
- Orchestrator tasks
src/orchestrator/tasks.controller.ts - Orchestrator
src/orchestrator/orchestrator.service.ts - A2A HTTP client
src/orchestrator/a2a-client.service.ts - Orchestrator card
src/orchestrator/agent-card.controller.ts
Specialist agents
- Research tasks
src/researcher/tasks.controller.ts - Crypto researcher
src/researcher/researcher.service.ts - Researcher card
src/researcher/agent-card.controller.ts - Formatter tasks
src/formatter/tasks.controller.ts - Report formatter
src/formatter/formatter.service.ts - Formatter card
src/formatter/agent-card.controller.ts
A2A protocol
- A2A contracts
src/shared/a2a.types.ts - Task utilities
src/shared/a2a.utils.ts
Application runtime
- Status endpoint
src/app.controller.ts - Status service
src/app.service.ts
Other components
- API client
- Anthropic API
Connections 26
- API client → Orchestrator tasks: submits tasks
src/orchestrator/tasks.controller.ts - API client → Orchestrator card: queries capabilities
src/orchestrator/agent-card.controller.ts - Orchestrator tasks → Orchestrator: dispatches methods
src/orchestrator/tasks.controller.ts - Orchestrator → A2A HTTP client: delegates requests
src/orchestrator/orchestrator.service.ts - A2A HTTP client → Research tasks: sends A2A tasks
- A2A HTTP client → Formatter tasks: sends A2A tasks
- Research tasks → Crypto researcher: dispatches methods
src/researcher/tasks.controller.ts - Formatter tasks → Report formatter: dispatches methods
src/formatter/tasks.controller.ts - Crypto researcher → Anthropic API: requests research
- Report formatter → Anthropic API: generates report
- Orchestrator → A2A contracts: uses task contracts
src/orchestrator/orchestrator.service.ts - Crypto researcher → A2A contracts: uses task contracts
src/researcher/researcher.service.ts - Report formatter → A2A contracts: uses task contracts
src/formatter/formatter.service.ts - A2A HTTP client → A2A contracts: uses task contracts
src/orchestrator/a2a-client.service.ts - Orchestrator tasks → A2A contracts: accepts task shapes
src/orchestrator/tasks.controller.ts - Research tasks → A2A contracts: accepts task shapes
src/researcher/tasks.controller.ts - Formatter tasks → A2A contracts: accepts task shapes
src/formatter/tasks.controller.ts - Orchestrator tasks → Task utilities: builds RPC replies
src/orchestrator/tasks.controller.ts - Research tasks → Task utilities: builds RPC replies
src/researcher/tasks.controller.ts - Formatter tasks → Task utilities: builds RPC replies
src/formatter/tasks.controller.ts - Orchestrator → Task utilities: builds task messages
src/orchestrator/orchestrator.service.ts - Crypto researcher → Task utilities: builds task artifacts
src/researcher/researcher.service.ts - Report formatter → Task utilities: builds task artifacts
src/formatter/formatter.service.ts - Task utilities → A2A contracts: constructs protocol data
src/shared/a2a.utils.ts - API client → Status endpoint: checks availability
src/app.controller.ts - Status endpoint → Status service: gets status
src/app.controller.ts