LoopAgent

org.llm4s.agent.graph.toolloop.LoopAgent
See theLoopAgent companion object
final case class LoopAgent

One agent of a ToolLoop family: its model, tools, middleware, system prompt, step limit and handoffs. Its nodes are prefixed with its id.

Value parameters

maxSteps

the limit this agent's model node applies to the turn's step count, which every agent of the turn shares: at it the turn ends with TurnOutcome.StepLimitReached instead of a further call, so an agent handed a turn that has already used its limit makes no call

systemPrompt

sent first on every model call of this agent, never stored in the history

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def withHandoffs(handoffs: Vector[LoopHandoff]): LoopAgent
def withMaxSteps(steps: Int): LoopAgent
def withMiddleware(middleware: Seq[AgentMiddleware]): LoopAgent
def withSystemPrompt(prompt: Option[String]): LoopAgent

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product