Inheritance

org.llm4s.agent.delegation.Inheritance
See theInheritance companion object
@Experimental
final case class Inheritance

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: delegate governs those.
  • middleware: the ids of the parent's middleware the child also runs, as the parent's instances - memory or a guardrail, say. Granting a SemanticMemoryMiddleware's id shares the parent's memory, under the parent's tenant, which the child always has. The parent's delegation middleware 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's DelegationConfig, to its maxDepth. 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 Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def withDelegate(may: Boolean): Inheritance

The parent's middleware the child also runs, by id, replacing any granted before.

The parent's middleware the child also runs, by id, replacing any granted before.

Attributes

withMiddleware with the ids listed.

withMiddleware with the ids listed.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product