TypedAgent

org.llm4s.agent.orchestration.TypedAgent
See theTypedAgent companion trait
object TypedAgent

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
TypedAgent.type

Members list

Value members

Concrete methods

def constant[I, O](agentName: String, value: O): TypedAgent[I, O]

Create an agent that always succeeds with a constant value

Create an agent that always succeeds with a constant value

Attributes

def failure[I, O](agentName: String, error: OrchestrationError): TypedAgent[I, O]

Create an agent that always fails with a specific error

Create an agent that always fails with a specific error

Attributes

def fromFunction[I, O](agentName: String)(f: I => Result[O]): TypedAgent[I, O]

Create a simple functional agent from a function using Result.safely

Create a simple functional agent from a function using Result.safely

Attributes

def fromFuture[I, O](agentName: String)(f: I => Future[Result[O]]): TypedAgent[I, O]

Create an effectful agent from a Future-returning function

Create an effectful agent from a Future-returning function

Attributes

def fromUnsafeFunction[I, O](agentName: String)(f: I => O): TypedAgent[I, O]

Create a functional agent from an unsafe function (auto-wrapped with Result.safely)

Create a functional agent from an unsafe function (auto-wrapped with Result.safely)

Attributes

def fromUnsafeFuture[I, O](agentName: String)(f: I => Future[O]): TypedAgent[I, O]

Create an agent from an unsafe Future operation (auto-wrapped with error handling)

Create an agent from an unsafe Future operation (auto-wrapped with error handling)

Attributes

def simpleFailure[I, O](agentName: String, errorMessage: String): TypedAgent[I, O]

Create an agent that always fails with a simple error message

Create an agent that always fails with a simple error message

Attributes