Build a loan-validation agent with LangGraph's create_react_agent and AzureChatOpenAI, then expose it as an A2A server using manual AgentExecutor wiring. Demonstrates the ReAct loop for automatic multi-step tool calling with Kimi-K2 via Azure AI Foundry.
A2A with LangGraph · 6 minsTranscript9 entries
Instructor:Welcome back to LocalM Tuts. I am Nilay Parikh. This is lesson 10 of 16, A2A with LangGraph. In the last lesson Google ADK showed how simple A2A integration can be with just one function call. If you are watching this as a standalone video, you can find the playlist link in the description below. Also, the links for the example GitHub repository and interactive page are available in the description. Clone the repo, open the lesson folder and follow along alone. Validator validation agent
Instructor:using LangGraph's ReAct pattern. The @langchain_tool decorator wraps the same validation functions. create_react_agent pairs them with AzureChat OpenAI, and the agent is exposed as a standard A2A server. LangGraph's create_react_agent is the key primitive. It wraps @langchain_tool functions in the Think Act Observe loop. The Azure ChatOpenAI integration connects to Kimi K2 thinking and the same model used across all the framework lessons. Let's see this in action. Install the dependencies, set
Instructor:your credentials and start the server on 10003 and watch the LangGraph ReAct agent think, act, and observe in a loop. Pause the video and try it yourself. Welcome to lesson 10, A2A wrapping with a LangGraph Orchestrator Agent. It implements the same loan validator using the same common loan data and validation rules, same approach: server, orchestrator, client. The server implements a simple A2A server because LangGraph does not have A2A server capability built in, so we use an orchestrator with
Instructor:LangGraph, LangGraph, and Lang Chain and implement the same approach that is very common across the LangGraph and then the server wraps the orchestrator and exposes on port 10003 with the Agent Card and JSON-RPC and the client does the same read from the loan data application and process a couple of loans. I have managed to get the server up and running here before I started recording and we have a very good interactive. We have very very interactive page for LangGraph and feel free if you are not
Instructor:having immediate access to Visual Studio Code or this. These modules effectively walk through its some of their very good LangGraph base question and answer for interviews, interview preparation and step by step guide to run this particular code or and also you can read the code here from its very basic code that just explain you. Important areas and what to be highlighted. So let's run the client and let's see how it works. python client.py, and it is on the black screen. So very fast it should show us this
Instructor:kind of report. So if we stay here, this is approved for Alice Chen. This is a profile change from the previous lesson. But really carefully see the compensating factors are same but differently worded. and this is more important because every time it runs it is not hardcoding it. And again and again I am trying to emphasize this. The agentic task does not mean that we should deterministically hard coded. We should code in a way that abstraction is managed by us. But execution is managed by
Instructor:LLM and the reasoning is managed by LLM itself. That's a key point for agentic AI. If we start hardcoding, if we start short-circuiting the agent AI, virtually we will end up with With a distributed architecture and distributed software, we will not have. any criteria, we cannot call that agentic AI. And this is the beauty of it. Like a human, it just types what the compensating factors are. And like two people processing the loan app, we anticipate their wording would be slightly different,
Instructor:but they will come to the same conclusion. So this is the whole idea of it. And I think we are done. Excellent. 6 picked up and finished. OK, all the thirds and let's turn it off. Excellent. You have built a LangGraph ReAct agent that wraps the same loan validation tools using the Lang Chain tool decorators and AzureChat OpenAI. Thanks for watching this lesson on the LocalM Tuts. In the next lesson we will build a CrewAI crew with a role-based agent and
Instructor:wrap the entire crew as a single A2A endpoint. You can find the next video link in the description below. See you there.
Learning Objectives5
Build a ReAct agent using LangGraph's create_react_agent with @langchain_tool decorators
Connect to Azure-hosted Kimi-K2 via AzureChatOpenAI
Wire the LangGraph agent to A2A using manual AgentExecutor + A2AStarletteApplication
Compare the ReAct loop (automatic multi-step) vs linear execution (Lesson 08)
Demonstrate framework interoperability — same A2A client works for all servers
Run the Lesson 10 Example
0/5
Clone the examples repository
git clone https://github.com/nilayparikh/tuts-agentic-ai-examples.git
cd tuts-agentic-ai-examples/a2a/lessons/10-langgraph
Why combine LangGraph with A2A instead of just using LangGraph alone?
LangGraph excels at stateful, multi-step reasoning with checkpointing. Adding A2A lets other agents invoke your LangGraph workflow as a black-box agent with progress updates via streaming.
Q
How does create_react_agent differ from manual tool sequencing in Lesson 08?
In Lesson 08, the system instruction sequences tools in a fixed order. With create_react_agent, the agent autonomously decides which tools to call based on observations — it might skip tools that are not needed.
Q
Why use manual A2A wiring instead of a bridge package?
The manual pattern (AgentExecutor + DefaultRequestHandler + A2AStarletteApplication) works with any Python agent. It gives you full control over how agent output maps to A2A responses.
Q
What is the ReAct pattern?
ReAct (Reasoning + Acting) is an agent loop: think, act (call tool), observe (read result), repeat until the agent has enough information to answer. LangGraph implements this with checkpointing and streaming.