Deploy Agents with A2A on LangSmith Deployment

LangChain · Beginner ·🤖 AI Agents & Automation ·3mo ago

Key Takeaways

This video teaches how to deploy agents with A2A on LangSmith Deployment, covering automatic A2A-compatible endpoint configuration for multi-agent systems.

Full Transcript

A2A is a protocol released by Google in 2024 that enables agents across frameworks to communicate. It's become the standard for agent-to-agent communication. And with LangSmith deployment, you get A2A support right out of the box. Hi. I'm Harry from LangChain. In this video, we'll cover key A2A concepts, deploy simple agent with LangSmith deployment, and then show how to use its A2A capabilities. So, before jumping into the demo, I actually want to go over a couple core concepts in A2A. So, first is this agent card, which is a piece of JSON that basically describes the agent's capabilities. So, this will contain things like whether the agent supports streaming, the agent's URL, and a bunch of other meta metadata. I'll show this off later, and it'll become more clear what exactly this does. Then, there's a concept of a task. So, a task basically represents a request-response within a certain context. And this actually maps very similarly to the concept of runs in LangSmith. And last, there is this concept of a context. And a context groups a bunch of task objects together, and it becomes important in like a multi-turn conversation where I might have a bunch of tasks, but a single context for the entire conversation. And this is very similar to the concept of threads that we have. So, for the demo, I'm going to be using this test repo here, which actually comes with the basic agent with some tools, and also comes with the helper Python script that uses the official A2A Python SDK. Cool. So, I've cloned this locally, um and I've opened up the project up in WinSurf. Um I copied the env.example and set up uh .env, and I specified API key, and I'm going to be using a Anthropic for this example. And I've run a UV sync dev here also. So, if you go look at the actual agent code, I'll quickly show you what's actually happening here. So, we are setting up a basic create agent, and we have four tools, uh one that tells the time, one that just does some calculations, and then a read and send email tool, uh to mock uh an actual email tool, and we'll actually demo how uh human in the loop works with A2A with this tool as well. So, I'm going to do a quick UV run LangGraph deploy to deploy this. Nice. Okay. So, our deployment's done. I'm going to go hop over to LangSmith, go to the deployments page, and here's my deployment. So, I'm going to press this connect. You can see the exact shape of our graph here. And I'm actually going to go to the A2A tab here. So, like I mentioned before, here's the actual agent card, just a simple JSON object, and you can see um we have the URL right here for our actual agent, and you can see things like, yeah, we support streaming here. And there's a quick uh usage snippet here where we actually just show off sending a quick message. But, I'm actually going to show you how this works with Google's official A2A inspector. So, I'm going to copy this URL here. New tab. Going to go to A2A inspect.com. Going to paste in the URL here. And I'm actually going to do I'm going to have to set up API key auth here. So, I would put an API key in here. [clears throat] Once you've set that up, we can try to connect. Says our agent card is agent card is valid. This is the same thing I showed off in LangSmith's UI. And then we can actually just send a chat. So, I'm going to trigger the calculator tool here. So, I'm just going to say, "What is 3 * 2 * 2?" Send this. And this is all going through the official, you know, A2A interface. We get our answer here. And yeah, if you click on one of these, you can actually see what's being sent. So, here we can see a context was generated. A task was generated here, and you can see our actual text, and then can actually see the agent's response here as well. So, I'm going to show you how human in the loop works with the official A2A client. So, if you remember, we set up this human in the loop middleware here, and we wanted to block on this mock send email tool. And we're going to basically going to prompt the user to make some sort of approve, edit, or rejection statement. So, in the sample code, there's this test A2A HITL human in the loop um file here, and and here we are actually going to use the official A2A client. Um I've pasted in my agent URL here that I got from uh the LangSmith UI. And we set up a client here. So, we're going to send uh a message first asking to actually send an email. And then, after that, you can see what we do here is in order to approve the interrupt, we actually have to send this data part back. And in this data part, we actually send this resume payload. And we're going to say type approve, and [snorts] this will actually approve the task. Remember, this is all going through the A2A client. So, I'm going to quickly run this script. Cool. We can quickly s- scan the output here. So, first we say that we wanted to send the email, and you can see that in our response, we actually got this tool execution requires approval. And we need to either approve, edit, or reject this. And you can see the task is actually in this input required state, which is part of the official A2A spec for for task task states. And then, when we actually resume the interrupt, we get this done. Your email has successfully been sent. Cool. So, yeah, that's the A2A integration with uh LangSmith deployment.

Original Description

Every LangSmith Deployment comes with built-in A2A (Agent-to-Agent) support, no extra configuration needed! In this video, we walk through how your deployed agents automatically get A2A-compatible endpoints, making it easy to plug into any multi-agent system. 🔗 Resources Docs: https://docs.langchain.com/langsmith/server-a2a#a2a-endpoint-in-agent-server A2A Protocol: https://a2a-protocol.org/latest/
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from LangChain · LangChain · 0 of 60

← Previous Next →
1 Chat With Your Documents Using LangChain + JavaScript
Chat With Your Documents Using LangChain + JavaScript
LangChain
2 LangChain SQL Webinar
LangChain SQL Webinar
LangChain
3 LangChain "OpenAI functions" Webinar
LangChain "OpenAI functions" Webinar
LangChain
4 LangSmith Launch
LangSmith Launch
LangChain
5 LangChain x Pinecone: Supercharging Llama-2 with RAG
LangChain x Pinecone: Supercharging Llama-2 with RAG
LangChain
6 LangChain Expression Language
LangChain Expression Language
LangChain
7 Building LLM applications with LangChain with Lance
Building LLM applications with LangChain with Lance
LangChain
8 Benchmarking Question/Answering Over CSV Data
Benchmarking Question/Answering Over CSV Data
LangChain
9 LangChain "RAG Evaluation" Webinar
LangChain "RAG Evaluation" Webinar
LangChain
10 Fine-tuning in Your Voice Webinar
Fine-tuning in Your Voice Webinar
LangChain
11 Tabular Data Retrieval
Tabular Data Retrieval
LangChain
12 Building an LLM Application with Audio by AssemblyAI
Building an LLM Application with Audio by AssemblyAI
LangChain
13 Superagent Deepdive Webinar
Superagent Deepdive Webinar
LangChain
14 Lessons from Deploying LLMs with LangSmith
Lessons from Deploying LLMs with LangSmith
LangChain
15 Shortwave Assistant Deepdive Webinar
Shortwave Assistant Deepdive Webinar
LangChain
16 Cognitive Architectures for Language Agents
Cognitive Architectures for Language Agents
LangChain
17 Effectively Building with LLMs in the Browser with Jacob
Effectively Building with LLMs in the Browser with Jacob
LangChain
18 Data Privacy for LLMs
Data Privacy for LLMs
LangChain
19 "Theory of Mind" Webinar with Plastic Labs
"Theory of Mind" Webinar with Plastic Labs
LangChain
20 LangChain Templates
LangChain Templates
LangChain
21 Using Natural Language to Query Postgres with Jacob
Using Natural Language to Query Postgres with Jacob
LangChain
22 Building a Research Assistant from Scratch
Building a Research Assistant from Scratch
LangChain
23 Benchmarking RAG over LangChain Docs
Benchmarking RAG over LangChain Docs
LangChain
24 Skeleton-of-Thought: Building a New Template from Scratch
Skeleton-of-Thought: Building a New Template from Scratch
LangChain
25 Benchmarking Methods for Semi-Structured RAG
Benchmarking Methods for Semi-Structured RAG
LangChain
26 LangSmith Highlights: Getting Started
LangSmith Highlights: Getting Started
LangChain
27 LangSmith Highlights: Debugging
LangSmith Highlights: Debugging
LangChain
28 LangSmith Highlights: Datasets
LangSmith Highlights: Datasets
LangChain
29 LangSmith Highlights: Evaluation
LangSmith Highlights: Evaluation
LangChain
30 LangSmith Highlights: Human Annotation
LangSmith Highlights: Human Annotation
LangChain
31 LangSmith Highlights: Monitoring
LangSmith Highlights: Monitoring
LangChain
32 LangSmith Highlights: Hub
LangSmith Highlights: Hub
LangChain
33 SQL Research Assistant
SQL Research Assistant
LangChain
34 Getting Started with Multi-Modal LLMs
Getting Started with Multi-Modal LLMs
LangChain
35 Build a Full Stack RAG App With TypeScript
Build a Full Stack RAG App With TypeScript
LangChain
36 Auto-Prompt Builder (with Hosted LangServe)
Auto-Prompt Builder (with Hosted LangServe)
LangChain
37 LangChain v0.1.0 Launch: Introduction
LangChain v0.1.0 Launch: Introduction
LangChain
38 LangChain v0.1.0 Launch: Observability
LangChain v0.1.0 Launch: Observability
LangChain
39 LangChain v0.1.0 Launch: Integrations
LangChain v0.1.0 Launch: Integrations
LangChain
40 LangChain v0.1.0 Launch: Composability
LangChain v0.1.0 Launch: Composability
LangChain
41 LangChain v0.1.0 Launch: Streaming
LangChain v0.1.0 Launch: Streaming
LangChain
42 LangChain v0.1.0 Launch: Output Parsing
LangChain v0.1.0 Launch: Output Parsing
LangChain
43 LangChain v0.1.0 Launch: Retrieval
LangChain v0.1.0 Launch: Retrieval
LangChain
44 LangChain v0.1.0 Launch: Agents
LangChain v0.1.0 Launch: Agents
LangChain
45 Build and Deploy a RAG app with Pinecone Serverless
Build and Deploy a RAG app with Pinecone Serverless
LangChain
46 Hosted LangServe + LangChain Templates
Hosted LangServe + LangChain Templates
LangChain
47 LangGraph: Intro
LangGraph: Intro
LangChain
48 LangGraph: Agent Executor
LangGraph: Agent Executor
LangChain
49 LangGraph: Chat Agent Executor
LangGraph: Chat Agent Executor
LangChain
50 LangGraph: Human-in-the-Loop
LangGraph: Human-in-the-Loop
LangChain
51 LangGraph: Dynamically Returning a Tool Output Directly
LangGraph: Dynamically Returning a Tool Output Directly
LangChain
52 LangGraph: Respond in a Specific Format
LangGraph: Respond in a Specific Format
LangChain
53 LangGraph: Managing Agent Steps
LangGraph: Managing Agent Steps
LangChain
54 LangGraph: Force-Calling a Tool
LangGraph: Force-Calling a Tool
LangChain
55 LangGraph: Multi-Agent Workflows
LangGraph: Multi-Agent Workflows
LangChain
56 Streaming Events: Introducing a new `stream_events` method
Streaming Events: Introducing a new `stream_events` method
LangChain
57 Building a web RAG chatbot: using LangChain, Exa (prev. Metaphor), LangSmith, and Hosted Langserve
Building a web RAG chatbot: using LangChain, Exa (prev. Metaphor), LangSmith, and Hosted Langserve
LangChain
58 OpenGPTs
OpenGPTs
LangChain
59 Open Source RAG with Nomic's New Embedding Model (and ChromaDB and Ollama)
Open Source RAG with Nomic's New Embedding Model (and ChromaDB and Ollama)
LangChain
60 LangGraph: Persistence
LangGraph: Persistence
LangChain

Related Reads

📰
Building HawkShift: An AI Shopping OS (Not Another Affiliate Blog)
Learn how to build an AI-powered shopping OS like HawkShift, which aims to revolutionize online shopping by providing a more personalized and efficient experience.
Medium · Startup
📰
Building Production-Ready AI Agents in 2026: Engineering Best Practices Every Developer Should Follow
Learn best practices for building production-ready AI agents that interact with APIs, automate workflows, and integrate with enterprise systems
Dev.to AI
📰
I filed a critical bug against my own tool. Then I read the code — and my own root cause was wrong.
Learn how to identify and fix critical bugs in your own code by reading a developer's experience with filing a bug against their own tool, safari-mcp
Dev.to AI
📰
How Our AI Agents Built the Visual SEO Sitemap Architect in Record Time
Learn how AI agents can accelerate software development with the Visual SEO Sitemap Architect project
Dev.to AI
Up next
Headroom: Revolutionizing AI with Smart Token Compression #shorts
Income stream surfers
Watch →