An Agent-to-Agent (A2A) Registry Service implementation in Go, designed to facilitate the discovery and management of autonomous agents. This project follows Clean Architecture principles to ensure modularity, testability, and maintainability.
The system facilitates communication between agents and sidecars. Below is the dataflow diagram illustrating the A2A sidecar communication:
- Agent Registry: Full CRUD operations for registering, retrieving, listing, and deleting agent details.
- Dual Transport: Supports both HTTP (REST) and gRPC interfaces simultaneously.
- Clean Architecture: Separation of concerns with Domain, Ports, Services, and Adapters layers.
- Protocol Compliance: Adheres to the A2A Protocol JSON Schema for
AgentCard. - In-Memory Storage: Currently uses a thread-safe in-memory repository (Phase 1).
- Go: Version 1.21 or higher
- Make (Optional, for running utility commands)
-
Clone the repository:
git clone https://github.com/ThisaraWeerakoon/Agent-Mesh.git cd Agent-Mesh -
Install dependencies:
go mod download
Start the application using:
go run cmd/server/main.goThe server will start on:
- HTTP: Port
3000 - gRPC: Port
50051
Easily integrate google/adk-go agents with the AgentMesh network.
import mesh_adk "github.com/ThisaraWeerakoon/Agent-Mesh/pkg/adk"
// Create a tool that proxies requests to the remote 'summary_agent'
// No schema definition needed - it defaults to handling a "request" string.
summaryTool, _ := mesh_adk.RemoteTool("summary_agent", "A tool that summarizes text.", "summary_agent")
// Use it in your agent
rootAgent, _ := llmagent.New(llmagent.Config{
Tools: []tool.Tool{summaryTool},
})import mesh_adk "github.com/ThisaraWeerakoon/Agent-Mesh/pkg/adk"
// Start a server that listens for mesh tasks and forwards to your agent
// It uses the standard ADK Runner to execute the agent.
mesh_adk.ServeAgent(50054, myAdkAgent)Launch the complete flow with:
- Sidecar:
go run cmd/sidecar/main.go - Agent Server:
go run cmd/adk_example/server/main.go - Client:
go run cmd/adk_example/client/main.go "Summarize this..."
For more detailed information, please refer to the following guides:
- Developer Guide: In-depth look at architecture, design decisions, and codebase structure.
- Usage Guide: Step-by-step instructions on how to use the API (HTTP & gRPC) and run tests.
Run the integration tests to verify the system:
go test -v ./tests/...