Skip to main content

Module proto

Module proto 

Source
Expand description

Canonical A2A protobuf message types (lf.a2a.v1) and conversions.

The message structs in this module are generated by prost from the canonical A2A v1.0 protobuf specification (proto/a2a_v1/a2a.proto, kept byte-identical to the upstream spec file), making them wire-compatible with the official Go, Python, and Java A2A SDKs.

The convert submodule provides conversions between these protobuf types and the serde domain types in the rest of this crate. Both directions are fallible with convert::ConvertError — hence TryFrom, not From, on both sides:

  • TryFrom<Proto> for Domain — protobuf values can carry out-of-range enums, invalid timestamps, or missing required oneof fields.
  • TryFrom<Domain> for Proto — domain values can carry data a protobuf message cannot faithfully hold: non-object metadata, a base64 Raw part that fails to decode, a count exceeding i32::MAX, or a number outside the exact-f64 range of google.protobuf.Value.

This module is pure data, like the rest of the crate: no I/O and no transport. The gRPC transports in the server and client crates generate their tonic service stubs against these message types via extern_path.

Modules§

convert
Conversions between lf.a2a.v1 protobuf types and the serde domain types.
o_auth_flows
Nested message and enum types in OAuthFlows.
part
Nested message and enum types in Part.
security_scheme
Nested message and enum types in SecurityScheme.
send_message_response
Nested message and enum types in SendMessageResponse.
stream_response
Nested message and enum types in StreamResponse.

Structs§

AgentCapabilities
Defines optional capabilities supported by an agent.
AgentCard
A self-describing manifest for an agent. It provides essential metadata including the agent’s identity, capabilities, skills, supported communication methods, and security requirements. Next ID: 20
AgentCardSignature
AgentCardSignature represents a JWS signature of an AgentCard. This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).
AgentExtension
A declaration of a protocol extension supported by an Agent.
AgentInterface
Declares a combination of a target URL, transport and protocol version for interacting with the agent. This allows agents to expose the same functionality over multiple protocol binding mechanisms.
AgentProvider
Represents the service provider of an agent.
AgentSkill
Represents a distinct capability or function that an agent can perform.
ApiKeySecurityScheme
Defines a security scheme using an API key.
Artifact
Artifacts represent task outputs.
AuthenticationInfo
Defines authentication details, used for push notifications.
AuthorizationCodeOAuthFlow
Defines configuration details for the OAuth 2.0 Authorization Code flow.
CancelTaskRequest
Represents a request for the CancelTask method.
ClientCredentialsOAuthFlow
Defines configuration details for the OAuth 2.0 Client Credentials flow.
DeleteTaskPushNotificationConfigRequest
Represents a request for the DeleteTaskPushNotificationConfig method.
DeviceCodeOAuthFlow
Defines configuration details for the OAuth 2.0 Device Code flow (RFC 8628). This flow is designed for input-constrained devices such as IoT devices, and CLI tools where the user authenticates on a separate device.
GetExtendedAgentCardRequest
Represents a request for the GetExtendedAgentCard method.
GetTaskPushNotificationConfigRequest
Represents a request for the GetTaskPushNotificationConfig method.
GetTaskRequest
Represents a request for the GetTask method.
HttpAuthSecurityScheme
Defines a security scheme using HTTP authentication.
ImplicitOAuthFlow
Deprecated: Use Authorization Code + PKCE instead.
ListTaskPushNotificationConfigsRequest
Represents a request for the ListTaskPushNotificationConfigs method.
ListTaskPushNotificationConfigsResponse
Represents a successful response for the ListTaskPushNotificationConfigs method.
ListTasksRequest
Parameters for listing tasks with optional filtering criteria.
ListTasksResponse
Result object for ListTasks method containing an array of tasks and pagination information.
Message
Message is one unit of communication between client and server. It can be associated with a context and/or a task. For server messages, context_id must be provided, and task_id only if a task was created. For client messages, both fields are optional, with the caveat that if both are provided, they have to match (the context_id has to be the one that is set on the task). If only task_id is provided, the server will infer context_id from it.
MutualTlsSecurityScheme
Defines a security scheme using mTLS authentication.
OAuth2SecurityScheme
Defines a security scheme using OAuth 2.0.
OAuthFlows
Defines the configuration for the supported OAuth 2.0 flows.
OpenIdConnectSecurityScheme
Defines a security scheme using OpenID Connect.
Part
Part represents a container for a section of communication content. Parts can be purely textual, some sort of file (image, video, etc) or a structured data blob (i.e. JSON).
PasswordOAuthFlow
Deprecated: Use Authorization Code + PKCE or Device Code.
SecurityRequirement
Defines the security requirements for an agent.
SecurityScheme
Defines a security scheme that can be used to secure an agent’s endpoints. This is a discriminated union type based on the OpenAPI 3.2 Security Scheme Object. See: https://spec.openapis.org/oas/v3.2.0.html#security-scheme-object
SendMessageConfiguration
Configuration of a send message request.
SendMessageRequest
Represents a request for the SendMessage method.
SendMessageResponse
Represents the response for the SendMessage method.
StreamResponse
A wrapper object used in streaming operations to encapsulate different types of response data.
StringList
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED A list of strings.
SubscribeToTaskRequest
Represents a request for the SubscribeToTask method.
Task
Task is the core unit of action for A2A. It has a current status and when results are created for the task they are stored in the artifact. If there are multiple turns for a task, these are stored in history.
TaskArtifactUpdateEvent
A task delta where an artifact has been generated.
TaskPushNotificationConfig
A container associating a push notification configuration with a specific task.
TaskStatus
A container for the status of a task
TaskStatusUpdateEvent
An event sent by the agent to notify the client of a change in a task’s status.

Enums§

Role
Defines the sender of a message in A2A protocol communication.
TaskState
Defines the possible lifecycle states of a Task.