This content originally appeared on DEV Community and was authored by Harbeahorlar Berry
🔧 Building TaskBuddy — My Mastra A2A Agent for Task Management
By Harbeahorlar Berry • nov 2025 •
Introduction
In today’s world of workflow automation and intelligent assistants, agents that can communicate and work together — AKA Agent-to-Agent (A2A) — are the next frontier. I built TaskBuddy, a task-management agent using Mastra, and deployed it with a public A2A endpoint. This post shows how I integrated Mastra’s A2A protocol, created tools for tasks, and exposed a JSON-RPC endpoint ready for Telex-style workflows.
What Is Mastra A2A?
Mastra’s A2A implementation standardizes how agents interact:
Uses JSON-RPC 2.0 format
Agents expose endpoints (e.g., /a2a/agent/:agentId)
Supports messages, tool results, artifacts and history
Architecture Overview
[ External Agent or App ] → POST /a2a/agent/taskBuddy
↑
Mastra Agent
↑
Tools: create-task | list-tasks
Key components:
Mastra agent: TaskBuddy
Tools: Create Task & List Tasks
Endpoint: https://abundant-rhythmic-fall-f46cbeb7-10e3-48d6-a489-c34c7301e91b.mastra.cloud/a2a/agent/taskBuddy
Core Tools
✅ create-task
Creates a new task:
Input: { title: string, due?: string }
Output: { message: string, taskId: string }
✅ list-tasks
Lists all tasks:
Output: { tasks: [...], message: string }
Demo — Try It Now
1️⃣ Create a task
POST to /a2a/agent/taskBuddy
{
"jsonrpc": "2.0",
"id": "req-1",
"method": "generate",
"params": {
"message": {
"role": "user",
"parts": [
{ "kind": "text", "text": "Add task: Write blog post due Monday" }
]
}
}
}
2️⃣ List tasks
Same endpoint with message: “Show my tasks” → returns tasks array and message.
Implementation Notes
Built with Node.js + Mastra
Uses Google Gemini (“gemini-2.0-flash”) as backend
Schema validation via Zod
Stores tasks in memory (easily extended to DB)
Follows clean JSON-RPC A2A spec
GitHub & Endpoint
➡ GitHub repo: https://github.com/HarbeahorlarBerry/Abiola_Olatunji_stage3
➡ A2A Agent URL: https://abundant-rhythmic-fall-f46cbeb7-10e3-48d6-a489-c34c7301e91b.mastra.cloud/a2a/agent/taskBuddy
What’s Next
Persist tasks to database
Add delete/update tools
Chain multiple agents together for workflows
Build UI for agent monitoring
Conclusion
TaskBuddy is a simple but powerful demonstration of multi-agent workflows: tools, A2A endpoint, cloud-deployed, ready to integrate. If you’re building intelligent workflows or agent orchestration, this pattern is a strong foundation. Let’s build the future of interoperable AI together.
This content originally appeared on DEV Community and was authored by Harbeahorlar Berry
Harbeahorlar Berry | Sciencx (2025-11-05T10:59:48+00:00) 🔧 Building TaskBuddy — My Mastra A2A Agent for Task Management. Retrieved from https://www.scien.cx/2025/11/05/%f0%9f%94%a7-building-taskbuddy-my-mastra-a2a-agent-for-task-management-3/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.