org.llm4s.agent.delegation.Inheritance
See theInheritance companion object
@Experimental
What a subagent takes from the agent it is bound to, beyond its own definition (design 4.45). Nothing is taken unless granted (rule 15): Inheritance.none, the default, gives the child its own tools and middleware only.
tools: the parent's tools the child also gets, as the parent's instances, run against the child's own thread. A tool over a state backend (StateFileBackend) therefore sees the child's own empty files, while one over a host, workspace or store backend shares the parent's. The task tools are never among them:delegategoverns those.middleware: the ids of the parent's middleware the child also runs, as the parent's instances - memory or a guardrail, say. Granting aSemanticMemoryMiddleware's id shares the parent's memory, under the parent's tenant, which the child always has. The parent'sdelegationmiddleware cannot be granted.budget: the child's limits, each also capped by what its parent has left when the task is called.delegate: whether the child may delegate to its own subagents (TypedAgent.withSubagents), under its parent'sDelegationConfig, to itsmaxDepth. Without it a child never has the task tools.
Identity is never part of a grant (rule 16): tenant, principal, tracing, the runtime and the checkpointer always come from the parent. Nor are permissions: every ancestor's PermissionMiddleware rules always apply to the child, and can only narrow what it may do.
A tool or middleware id the parent does not have is refused when the parent is built.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article