a2aproject / a2aproject/A2A

[Question] What's the idea behind ROLE_UNSPECIFIED ? and how should we use it ?

Open
#1,318 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
25.7k
Forks
2.6k
Avg merge
3d 6h
Merged PRs (30d)
16

Description

I’m trying to wrap my head around the roles defined in the current A2A protocol:

ROLE_AGENT
ROLE_USER
ROLE_UNSPECIFIED

From the docs, this is how I understand it so far:

ROLE_AGENT is used when an A2A server sends a response back to an A2A client
ROLE_USER is used when an A2A client sends a message to an A2A server

That leaves ROLE_UNSPECIFIED.

What’s the idea behind it, and how is it supposed to be used? I couldn’t find any explanation for it in the docs.

I’m also trying to map these roles internally when the A2A server delegates work to an OpenAI-compatible agent that processes the request in natural language. In that case, how would you recommend mapping A2A roles to the roles we’re used to in other APIs?

For example:

ROLE_AGENT → assistant
ROLE_USER → user
ROLE_UNSPECIFIED → ?
ROLE_TOOL or ROLE_SKILL (doesn't exists? those are implementation details? how can I represent a skill result in the conversation history?)

I understand that the A2A protocol doesn’t require an LLM to exist on the A2A server at all. That said, from my own testing it feels very practical - and fairly common - to have one there.

How are others approaching this in practice? Curious to hear your thoughts.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.