Skip to content

feat: deepresearch a2a-go agent#590

Open
yarolegovich wants to merge 8 commits into
mainfrom
yarolegovich/deepresearch
Open

feat: deepresearch a2a-go agent#590
yarolegovich wants to merge 8 commits into
mainfrom
yarolegovich/deepresearch

Conversation

@yarolegovich
Copy link
Copy Markdown
Member

@yarolegovich yarolegovich commented Jun 7, 2026

Overview

A multi-agent system that performs deep research on a given topic. The project showcases way of implementing the standard SDK interfaces for integrating with various popular infra components like MySQL and NATS.

Built using a2a-go and adk.

  • Horizontally scalable cluster of different agent types: orchestrator, researcher, analyzer, and synthesizer.
  • MySQL for task indexing and Jetstream for event persistence.
  • Push notification sender for signaling subtask completion to the orchestrator.
  • NATS for work distribution, event and push notification delivery.
  • Retryable execution with state checkpointing.
deepresearch

Details

Orchestrator agents handle client requests:

  1. Uses LLM planner to decompose a question into subtasks.
  2. Dispatches them to a cluster of researcher agents with returnImmediately: true.
  3. Waits for results using NATS-based push notifications.
  4. Invokes an analyzer to find contradictory topics for a follow-up research.
  5. Initiates the follow-up research.
  6. Invokes a synthesizer to generate a final report.

If an orchestrator crashes, the state machine replays its event stream from the NATS STATES stream to recover which stages were dispatched and which completed, then resumes from where it left off.

Orchestrator never loads large task contents into memory and instead uses task references when communicating with synthesizer and analyzer. The final report is returned to a user a reference.

Push notifications allow orchestrator to limit the number of open long-lived connections and avoid subtask status polling.

sample_output

Also moved the old non-a2a-go code under samples/go to "archived" directory and separated go-linting because superlint errors did not make sense.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a multi-agent deep research system utilizing the A2A protocol, featuring orchestrator, researcher, analyzer, and synthesizer agents, with NATS JetStream for event sourcing and MySQL for task persistence. Key feedback highlights several critical issues: a compilation error in the cluster client due to an invalid sync.WaitGroup.Go call, a database query error in indexing.go using status instead of state, and a missing agent column in the test database schema. Additionally, the review points out a race condition in eventqueue.go, a non-deterministic task ordering bug in taskstore.go, a DOM-based XSS vulnerability in the report page, and potential nil pointer panics in the planner. Defensive checks for empty subtasks in the orchestrator and minor documentation/typo fixes are also recommended.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread samples/go/agents/deepresearch/internal/store/indexing.go Outdated
Comment thread samples/go/agents/deepresearch/internal/cluster/client.go
Comment thread samples/go/agents/deepresearch/internal/testutil/infra.go
Comment thread samples/go/agents/deepresearch/internal/msgstream/eventqueue.go
Comment thread samples/go/agents/deepresearch/internal/store/taskstore.go
Comment thread samples/go/agents/deepresearch/internal/agents/planner.go
Comment thread samples/go/agents/deepresearch/internal/agents/orchestrator.go
Comment thread samples/go/agents/deepresearch/AGENTS.md
Comment thread samples/go/agents/deepresearch/README.md Outdated
Comment thread samples/go/agents/deepresearch/README.md Outdated
@yarolegovich yarolegovich force-pushed the yarolegovich/deepresearch branch from c9fee60 to 11b2b8b Compare June 7, 2026 13:38
@yarolegovich yarolegovich force-pushed the yarolegovich/deepresearch branch 2 times, most recently from ae58757 to 525db3b Compare June 8, 2026 08:01
@yarolegovich yarolegovich force-pushed the yarolegovich/deepresearch branch from 525db3b to 888cc80 Compare June 8, 2026 08:11
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