TypedAgent

org.llm4s.agent.orchestration.TypedAgent
See theTypedAgent companion object
trait TypedAgent[I, O]

Typed agent abstraction for multi-agent orchestration.

A TypedAgent represents a computation that takes input of type I and produces output of type O. Agents are composable and can be wired together in DAGs with compile-time type safety.

Follows LLM4S patterns:

  • Uses AsyncResult[_] (Future[Result[_]]) for async operations
  • Uses Result[_] for error handling
  • Structured logging with context
  • Proper error types from OrchestrationError
  • Safe execution with Result.safely

Type parameters

I

Input type

O

Output type

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def execute(input: I)(implicit ec: ExecutionContext): AsyncResult[O]

Execute the agent with the given input

Execute the agent with the given input

Value parameters

ec

Execution context for async operations

input

The input to process

Attributes

Returns

AsyncResult (Future[Result[O]]) with either an error or the output

def id: AgentId

Agent identifier for debugging and tracing

Agent identifier for debugging and tracing

Attributes

def name: String

Human-readable agent name

Human-readable agent name

Attributes

Concrete methods

def description: Option[String]

Optional description of what this agent does

Optional description of what this agent does

Attributes