github a2aproject/a2a-go v1.0.0-alpha

latest releases: nightly-metrics, v2.3.1, v2.3.0...
5 months ago

Release notes

Implements A2A spec 1.0-rc revision with JSONRPC and gRPC protocol bindings.

Non-breaking changes

  • a2aclient.Factory implements protocol version negotiation.
  • New errors added: ExtensionSupportRequiredError and VersionNotSupportedError.
  • Client sends A2A-Version header.
  • ListTasks RPC implementation.
  • a2a package provides Part constructor functions.

Spec-specific breaking changes

In addition to breaking core type changes updates:

  • Agent output validations: task must be the first event emitted by AgentExecutor, artifact parts must be non-empty.
  • Final field removed from TaskStatusUpdateEvent, state is used to determine whether event is final.
  • RPCs renamed: TaskSubscription -> SubscribeToTask, GetAgentCard -> GetExtendedAgentCard.
  • JSONRPC uses the same method naming as gRPC.

SDK breaking changes:

For motivation behind some of the changes refer to the change announcement.

  • a2asrv.AgentExecutor changes: Execute and Cancel now return iter.Seq2[a2a.Event, error] instead of writing events to a queue.
  • a2asrv/taskstore package gets introduced with TaskStore interface and the the default in-memory implementation.
  • a2a.TaskVersion gets moved to a2asrv/taskstore.
  • TaskStore.Save method gets replaced with separate Create and Update methods.
  • TaskStore.Update is called with a2a.Event set to user a2a.Message on task history update.
  • TaskStore.Get return types is taskstore.StoredTask which is (task, version) pair.
  • eventqueue.Queue gets replaced with separate eventqueue.Reader and eventqueue.Writer. eventqueue.Manager methods updated appropriately.
  • eventqueue.Message gets introduced for grouping a2a.Task, taskstore.TaskVersion and a2a.ProtocolVersion.
  • a2aclient.CallInterceptor and a2asrv.CallInterceptor can now return a value from Before to return a result without performing the actual call.
  • a2aclient.WithInterceptors gets renamed to a2aclient.WithCallInterceptors and a2asrv.WithCallInterceptor gets renamed to a2asrv.WithCallInterceptors and takes vararg so that methods are consistent with each other.
  • a2asrv.User get changed from an interface to a struct with an Attributes map[string]any field.
  • a2asrv.RequestContext gets renamed into a2asrv.ExecutorContext. User and ServiceParams are added to the struct, these should be used intead of CallContext.
  • a2asrv.ReqMeta and a2aclient.CallMeta are renamed to ServiceParams.
  • a2asrv.PushSender and a2asrv.PushConfigStore are moved to a2asrv/push.
  • a2aclient.ServiceParams are now passed explicitly to a2aclient.Transport.
  • Methods which attach something to context.Context start with Attach prefix, methods used to create constructor-function options start with With.
  • a2aclient.NewStaticServiceParamsInjector replaced with a2aclient.AttachServiceParams for sending request headers.
  • gRPC transport for a2aclient was moved to a2agrpc package. This removes gRPC as the mandatory dependency from the client.

v0.3 compatibility:

Backward compatibility implementation as discussed in A2A spec repo is provided by github.com/a2aproject/a2a-go/a2acompat/a2av0 package.

a2agrpc and a2apb are versioned, where v0 contains mappers from v0.3.6 types to core types, and v1 implements the latest protocol version.

For an example backward-compatibility setup refer to e2e/compat.

Don't miss a new a2a-go release

NewReleases is sending notifications on new releases.