A2aEngine.Types.Task (a2a_engine v0.1.0)

Copy Markdown View Source

An A2A Task: the unit of inter-agent work.

Wire shape requires kind: "task", id, contextId, status. Optional: artifacts, history, metadata.

Note: per spec, contextId is REQUIRED on Task (though not on Message).

Summary

Types

t()

@type t() :: %A2aEngine.Types.Task{
  artifacts: [A2aEngine.Types.Artifact.t()] | nil,
  context_id: String.t(),
  history: [A2aEngine.Types.Message.t()] | nil,
  id: String.t(),
  metadata: map() | nil,
  status: A2aEngine.Types.TaskStatus.t()
}

Functions

from_map(m)

@spec from_map(map()) :: {:ok, t()} | {:error, term()}

to_map(t)

@spec to_map(t()) :: map()