DelegationConfig

org.llm4s.agent.delegation.DelegationConfig
See theDelegationConfig companion object
@Experimental
final case class DelegationConfig

The bounds on an agent's delegated tasks (design 4.44), each enforced on its own:

  • maxConcurrentChildren: child runs one parent run has live at once. A task call over it waits for a slot; it is not refused.
  • maxTasksPerTurn: task calls one parent turn may make, counted in the order of the turn's assistant messages, across handoffs (every agent of the family's calls in the turn count), so a call is refused (a tool error) exactly when the calls before it, its own included, are over the bound, whichever order the calls run in and however often they are replayed.
  • maxDepth: how deep delegation nests; 1, the default, lets the agent delegate and its children not.
  • maxReportBytes: the most any task tool message may be, in UTF-8: a child's report, as the JSON the parent model reads (a larger one is a tool error), and every tool error, its reason cut to fit, so the parent's checkpoint never holds more. At least DelegationConfig.MinReportBytes, so a cut error still fits.
  • childRetention: settled child threads each parent thread keeps. A run's RunConfig.childRetention bounds it too: the smaller of the two applies.

Every bound must be positive, and maxReportBytes at least MinReportBytes: AgentBuilder.build() refuses one that is not.

Attributes

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

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product