Skip to content

fix/missing-message-id-in-a2a-send #19

Description

@chethansiddagiri

Without setting MessageID, the Go ADK agent server rejects the message with "message ID is required" and returns an error with data: {object} format. The kagent controller's A2A relay (using a2a-go/v2) then fails to parse this error response since it expects data: [array] format, causing a -32603 internal error to be returned. Setting MessageID: uuid.New().String() resolves the entire chain. Tested with kagent v0.10.1 on EKS.

File to change: internal/client/kagent_client.go line ~191

Change:
// BEFORE
res, err := a2a.SendMessage(sendCtx, protocol.SendMessageParams{
Message: protocol.Message{
Role: protocol.MessageRoleUser,
ContextID: &sessionID,
Parts: []protocol.Part{protocol.NewTextPart(text)},
},
})

// AFTER
res, err := a2a.SendMessage(sendCtx, protocol.SendMessageParams{
Message: protocol.Message{
MessageID: uuid.New().String(),
Role: protocol.MessageRoleUser,
ContextID: &sessionID,
Parts: []protocol.Part{protocol.NewTextPart(text)},
},
})

Also add the import (already a dependency in go.mod):
"github.com/google/uuid"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions