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

Copy Markdown View Source

A simple agent that wraps a function. Useful for testing and ad-hoc agents.

Examples

agent = ADK.Agent.Custom.new(
  name: "greeter",
  run_fn: fn _agent, _ctx -> [ADK.Event.new(%{author: "greeter", content: "hi"})] end
)

Summary

Functions

Create a custom agent.

Types

t()

@type t() :: %ADK.Agent.Custom{
  description: String.t(),
  name: String.t(),
  run_fn: (t(), ADK.Context.t() -> [ADK.Event.t()]),
  sub_agents: [ADK.Agent.t()],
  tools: [map()]
}

Functions

new(opts)

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

Create a custom agent.