Learn to
- Discover available agents via a shared registry
- Delegate tasks between agents seamlessly over JSON-RPC (A2A protocol)
- Send queries from our cmd.py CLI (“What time is it?” / “Greet me”) and watch the agents collaborate
---------------------------------------
Code
Please Subscribe, allow pop-ups, then log in to The AI Language site to access our GitHub repos. This link works only for subscribers. Thanks!
https://theailanguage.com/onlySubscribers?id=a2a_samples&site=github
This video uses the version3_multi_agent folder of our sample repo.
---------------------------------------
🎓 Udemy Course
Want a complete guided experience with quizzes, Q&A, and a completion certificate?
https://www.udemy.com/course/modelcontextprotocol/?referralCode=6FADE0F85C5DB97203C6
---------------------------------------
▶️ Watch the Previous Video -
Learn the fundamentals—task managers, agent cards, JSON-RPC client/server, and more—in our first walkthrough:
https://www.youtube.com/watch?v=DDaDV1wXNgg&list=PL6tW9BrhiPTCKTXXJAwigi7QDNpA7t4Ip
---------------------------------------
CHAPTERS
00:00 Introduction
00:17 Quick Preview of What We’ll Build
04:31 A2A Architecture Recap
06:12 Code - Agent Discovery, Registry
10:31 Code - Orchestrator or Host Agent
15:20 Code - Agent Connector
17:33 Code - Orchestrator or Host Agent Continued
23:08 Code - Orchestrator Task Manager
24:58 Code - entry.py script
27:56 Code - Greeting Agent, Task Manager, main.py script
35:57 Code - other files, folders
37:01 Setup, Get free Gemini API Key
40:43 Running the Code
---------------------------------------
Demo Walkthrough
Start the TellTimeAgent
python3 -m agents.tell_time_agent --host localhost --port 10000
Start the GreetingAgent
python3 -m agents.greeting_agent --host localhost --port 10001
Start the Orchestrator (Host) Agent
python3 -m agents.host_agent.entry --host localhost --port 10002
Launch the CLI (cmd.py)
python3 -m app.cmd.cmd --agent http://localhost:10002
Try it out!
What time is it?
Agent says: The current time is: 2025-05-05
14:23:10
Greet me
Agent says: Good afternoon, friend! The golden sun dips low...
---------------------------------------
👍 If you found this tutorial helpful, please Like, Subscribe, and hit the 🔔 to get notified about future A2A deep-dives!
#A2A, #AgentOrchestration, #GoogleADK, #GeminiAPI, #MultiAgent, #CodeWalkthrough, #PythonTutorial, #AsyncIO, #CLIApp, #Discovery, #AgentProtocol, #JSONRPC