Class: A2A::Task

Inherits:
ProtocolStruct
  • Object
show all
Defined in:
lib/a2a/types/task.rb

Overview

Represents a single, stateful operation or conversation between a client and an agent.

Instance Method Summary collapse

Methods included from Extensions::CaseTransformation

#camelize, included, #to_json

Instance Method Details

#artifactsArray<Artifact>?

Returns A collection of artifacts generated by the agent during the execution of the task.

Returns:

  • (Array<Artifact>, nil)

    A collection of artifacts generated by the agent during the execution of the task.



21
# File 'lib/a2a/types/task.rb', line 21

attribute? :artifacts, Types::Array.of(Types::Constructor(Artifact)).optional

#context_idString

Returns A server-generated unique identifier (e.g. UUID) for maintaining context across multiple related tasks or interactions.

Returns:

  • (String)

    A server-generated unique identifier (e.g. UUID) for maintaining context across multiple related tasks or interactions.



11
# File 'lib/a2a/types/task.rb', line 11

attribute :context_id, Types::String

#historyArray<Message>?

Returns An array of messages exchanged during the task, representing the conversation history.

Returns:

  • (Array<Message>, nil)

    An array of messages exchanged during the task, representing the conversation history.



18
# File 'lib/a2a/types/task.rb', line 18

attribute? :history, Types::Array.of(Types::Constructor(Message)).optional

#idString

Returns A unique identifier (e.g. UUID) for the task, generated by the server for a new task.

Returns:

  • (String)

    A unique identifier (e.g. UUID) for the task, generated by the server for a new task.



7
# File 'lib/a2a/types/task.rb', line 7

attribute :id, Types::String

#kindString

Returns The type of this object, used as a discriminator. Always ‘task’ for a Task.

Returns:

  • (String)

    The type of this object, used as a discriminator. Always ‘task’ for a Task.



27
# File 'lib/a2a/types/task.rb', line 27

attribute :kind, Types::String.constant('task')

#metadataHash?

Returns Optional metadata for extensions. The key is an extension-specific identifier.

Returns:

  • (Hash, nil)

    Optional metadata for extensions. The key is an extension-specific identifier.



24
# File 'lib/a2a/types/task.rb', line 24

attribute? :metadata, Types::Hash.optional

#statusTaskStatus

Returns The current status of the task, including its state and a descriptive message.

Returns:

  • (TaskStatus)

    The current status of the task, including its state and a descriptive message.



14
# File 'lib/a2a/types/task.rb', line 14

attribute :status, Types::Constructor(TaskStatus)