AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified Apache-2.0 Self-run

A2a Go

mcp-yeeaiclub-a2a-go · by yeeaiclub

Go implementation of the Agent-to-Agent (A2A/a2a) protocol

No reviews yet
0 installs
7 views
0.0% view→install

Install

$ agentstack add mcp-yeeaiclub-a2a-go

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-yeeaiclub-a2a-go)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of A2a Go? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

a2a-go: Agent-to-Agent Protocol SDK for Go

[](https://pkg.go.dev/github.com/yeeaiclub/a2a-go) [](LICENSE) [](https://codecov.io/gh/yeeaiclub/a2a-go/branch/main) [](https://github.com/yeeaiclub/a2a-go)

a2a-go is a comprehensive Go SDK implementation of the Agent-to-Agent (A2A) protocol, providing a robust foundation for building AI agent communication systems. This SDK enables seamless integration between AI agents with middleware support, authentication, and full protocol method implementation.

> ⚠️ This project is currently under active development. APIs may change without notice.

Overview

The a2a-go SDK implements the A2A protocol specification in Go, offering:

Core A2A Protocol Methods

  • [x] Authentication - Secure agent authentication
  • [x] Send Task - Submit tasks to other agents
  • [x] Get Task - Retrieve task information and status
  • [x] Cancel Task - Cancel running or pending tasks
  • [x] Stream Task - Real-time task result streaming
  • [x] Set Push Notification - Configure push notifications for tasks
  • [x] Get Push Notification - Retrieve push notification configurations

SDK Features

  • [x] Middleware Support - Extensible middleware architecture for request/response processing
  • [x] Security Schemes - Support for multiple authentication methods (API Key, Bearer, OAuth2, OpenID Connect)
  • [x] Context Management - Flexible context handling with security configuration

Installation

go get github.com/yeeaiclub/a2a-go

Quick Start

client

// Initialize an HTTP client with a custom timeout (you can adjust config.Timeout as needed)
httpClient := &http.Client{ Timeout: config.Timeout }

// Create a new a2a-go client instance using the HTTP client and the API base URL
// Replace "http://localhost:8080/api" with your actual server endpoint
a2aClient := client.NewClient(httpClient, "http://localhost:8080/api")

> The above code demonstrates how to set up the a2a-go client. You need to provide a custom http.Client (for timeout, proxy, etc.) and the API endpoint of your a2a server.

// Example: Sending a message using the a2a-go client
resp, err := client.SendMessage(types.MessageSendParam{
    Message: &types.Message{
        TaskID: taskID,           // The ID of the task this message belongs to
        Role:   types.User,       // The sender's role (e.g., User, Agent)
        Parts: []types.Part{
            // Message content parts; here we use a text message as an example
            &types.TextPart{Kind: "text", Text: message},
        },
    },
})

> The above code shows how to send a message: > - TaskID: Specifies which task the message is associated with. This field can be empty if you are starting a new task; the server will generate a new TaskID automatically if not provided. > - Role: Indicates the sender's role (such as User or Agent). > - Parts: Supports multiple content types (text, image, etc.); here, a text message is used. > > The resp variable contains the server's response, and err is used for error handling.

If you want to receive messages from the server in a streaming fashion, you can use the SendMessageStream method:

// Create a channel to receive events (buffer size 10 as an example)
events := make(chan events, 10)

err := client.SendMessageStream(types.MessageSendParam{
    Message: &types.Message{
        TaskID: taskID,           // The ID of the task this message belongs to
        Role:   types.User,       // The sender's role (e.g., User, Agent)
        Parts: []types.Part{
            // Message content parts; here we use a text message as an example
            &types.TextPart{Kind: "text", Text: message},
        },
    },
}, events)

> The above code demonstrates how to use SendMessageStream to receive server responses as a stream. Events will be sent to the events channel as they arrive. This is useful for real-time or incremental message processing.

Server

An a2a-server essentially consists of four components: taskStore, executor, queueManager, and updater.

  • taskStore: Used to store and update task information and status.
  • queueManager: Manages the creation and destruction of queues related to tasks.
  • executor: (explained below)
  • updater: Assists with task status tracking and updates.

Example of basic server setup:

store := tasks.NewInMemoryTaskStore()
manager := a2a.NewQueueManager()

defaultHandler := handler.NewDefaultHandler(store, a2a.NewExecutor(), handler.WithQueueManger(manager))
server := handler.NewServer("/card", "/api", agentCard, defaultHandler)
server.Start(8080)

The Executor module provides two core functions: Execute and Cancel.

  • The Execute function is responsible for executing the specified task based on the user-provided context.
  • The Cancel function cancels the execution of the corresponding task.

During execution, the function uses a built-in status update mechanism to provide real-time feedback on task progress. The implementation includes:

  1. Status update mechanism: Uses the updater utility to track and update task status.
  2. Message queue interaction: All status changes and progress information are written to the event queue (event.Queue) in real time.
  3. Result return: The final execution result is returned to the caller via the queue.

Typical implementation example:

func (e *Executor) Execute(ctx context.Context, requestContext *execution.RequestContext, queue *event.Queue) error {
    // Initialize the task status tracker
    u := updater.NewTaskUpdater(queue, requestContext.TaskId, requestContext.ContextId)

    // Create the initial status message
    message := u.NewAgentMessage([]types.Part{
        &types.TextPart{Text: "start the work", Kind: types.PartTypeText},
    })

    // Update task status
    u.StartWork(updater.WithMessage(message))
    u.Complete()
    
    return nil
}

Documentation

Contributing

We welcome contributions! Please read our contributing guidelines before submitting pull requests.

> Note: Since this project is under active development, we recommend checking the latest issues and discussions before contributing to understand the current development priorities.

License

This project is licensed under the [Apache 2.0 License](LICENSE).


Keywords: a2a-go, a2a, agent-to-agent, Go SDK, AI agents, protocol implementation, middleware, authentication, streaming, task management

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.