Skip to content

Instantly share code, notes, and snippets.

@kaaquist
Last active June 5, 2025 21:23
Show Gist options
  • Save kaaquist/8eb7f59c42e10de39b2c9fd76ec14b53 to your computer and use it in GitHub Desktop.
Save kaaquist/8eb7f59c42e10de39b2c9fd76ec14b53 to your computer and use it in GitHub Desktop.
Langgraph Supervisor with A2A Agent

Langgraph Supervisor with A2A Agent

A2A seems to be a great new way to connect agents. But how do I get an A2A Agent to be part of my already existing Langgraph supervisor setup?

(WIP)
Ever since Google announced the new A2A protocol to communicate between Agents across business or internally between business compartments. I have been trying to find a great way to integrate the A2A into my existing setup of Langgraph supervisor.

In a nutshell, if we take the classic example of a math agent and a research agent that gets “controlled” by a supervisor agent.

image
Figure 1 - Langgraph example 1

How would that look if the research agent - in my case weather agent - needs to get accessed via A2A.

image
Figure 2 - Protocol A2A to research agent 1

So in my case it is a weather agent that gets accessed via A2A protocol, because let's be honest it could be exposed to the public by weather.com or its like.

How do we get that working?

I did a lot of Googling and reading on Reddit - and I did find some people that had created repositories that should be able to handle this. But every time I tried to get them working I ended up having to “hack” my way through a lot of code that seemed to be out of date with the versions of A2A and Langgraph.

So in the end I have created the following approach

image
Figure 1 - Langgraph supervisor with A2A agent example

And you can find the code here for that: github

What do you think of that approach? And how would you approach this here “problem”? Feel free to leave a comment.

Footnotes

  1. https://langchain-ai.github.io/langgraph/tutorials/multi_agent/agent_supervisor/#2-create-supervisor-with-langgraph-supervisor 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment