ADK.Agent.SequentialAgent (ADK v0.0.1-alpha.1)

Copy Markdown View Source

Runs sub-agents in sequence, passing state through the session.

Summary

Functions

Create a sequential agent with validation.

Clone this agent with optional updates. See ADK.Agent.Clone.

Create a sequential agent.

Types

t()

@type t() :: %ADK.Agent.SequentialAgent{
  description: String.t(),
  name: String.t(),
  parent_agent: term(),
  sub_agents: [ADK.Agent.t()]
}

Functions

build(opts)

@spec build(keyword()) :: {:ok, t()} | {:error, String.t()}

Create a sequential agent with validation.

Returns {:ok, agent} or {:error, reason}.

clone(agent, update \\ nil)

@spec clone(t(), map() | nil) :: t()

Clone this agent with optional updates. See ADK.Agent.Clone.

new(opts)

@spec new(keyword()) :: t()

Create a sequential agent.

Examples

iex> agent = ADK.Agent.SequentialAgent.new(name: "pipeline", sub_agents: [])
iex> agent.name
"pipeline"