org.llm4s.agent.delegation.TaskBudget
See theTaskBudget companion object
@Experimental
A subagent's limits (design 4.45), each None unless set. When a task is called, each is capped by what its parent has left, from the parent's snapshot:
maxSteps: model calls in the child's turn; unset, the parent agent'smaxSteps. Either way at most the parent turn's remaining steps (RunContext.remainingSteps).timeout: the child's time, from its start; at most until the parent's deadline.maxTokens: the child's input and output tokens; at most the parent'sRunBudgets.maxTokensless what the parent's run has used.maxConcurrency: the child's run'sRunBudgets.maxConcurrency; at most the parent's.
Each limit is the child's whole life: a child recovered after a crash or a failed parent has its grant less what its earlier attempts used, and its time runs from its first start. Parallel children each get the same remainder, so together they can overshoot the parent's tokens; the parent's next model call then ends its turn TokenLimitReached. Every value set must be positive, which the parent's build() checks.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article