Skip to content

The task tool — model-facing delegation

Elixir · package toolnexus · SPEC §7D

The opt-in tool that lets the model itself spawn a teammate. Default OFF.

There is no constructible task tool symbol to import in this port — the task tool is a runtime builtin, assembled automatically by Toolnexus.Agents.Runtime for any handle whose AgentDef declares a :team. Declaring team: [explore] on Toolnexus.Agents.agent/2 is the whole opt-in — the parent gets a task tool scoped to exactly that team (sorted by name, description composed from each teammate’s does); a child gets no task tool unless its own definition also declares a team (recursion is opt-in, never inherited). There is nothing to construct or toggle beyond that :team field — see the delegation example on Toolnexus.Agents.Runtime.

  • Toolnexus.Agents — Define a sub-agent with its own toolkit, prompt and budget, callable as a tool by its parent.
  • Toolnexus.Agents.Runtime — The six host verbs that drive sub-agents, plus the read-only list and inspect views.
  • Toolnexus.Agents.Handle — The state machine for one spawned agent: pending, running, suspended, done.
  • Toolnexus.Agents budget — Cap tool calls and wall-clock per agent and per team, enforced while the run is in flight.