Annotation Interface A2AContextId


@Retention(RUNTIME) @Target(PARAMETER) public @interface A2AContextId
Marks a parameter that will be set as the contextId on the outgoing A2A Message envelope, rather than being included as a TextPart in the message content.

The conversation context identifier groups related tasks in an A2A multi-turn conversation. When null, the A2A server will generate a new context.

Example:


public interface MyA2AAgent {

    @A2AClientAgent(a2aServerUrl = "http://localhost:8080", outputKey = "response")
    String chat(@V("question") String question,
                @A2AContextId String contextId,
                @A2ATaskId String taskId);
}