delegate#

scikitplot.agent.delegate(name, child, *, description='', max_steps=8, max_tool_calls=None, max_cost=None, max_tokens=None, max_seconds=None)[source]#

Return a tool that runs child toward the goal it is called with.

Parameters:
namestr

The tool’s name.

childAgent

The agent to run. Its tools, planner and policy are used as they are; its limits are replaced by these, capped by the parent’s remaining budget at each call; its audit sink and state store become the parent’s.

descriptionstr, default=””

For the parent’s planner.

max_stepsint, default=8

Decisions the child may make. Steps are not shared: each run counts its own decisions.

max_tool_calls, max_cost, max_tokens, max_secondsnumber or None

The child’s own caps; None leaves only the parent’s remaining budget.

Returns:
DelegateTool
Raises:
TypeError

If child is not an Agent.

ValueError

For a limit outside its domain, or a child with no tools.

Parameters:
  • name (str)

  • child (Any)

  • description (str)

  • max_steps (int)

  • max_tool_calls (int | None)

  • max_cost (float | None)

  • max_tokens (int | None)

  • max_seconds (float | None)

Return type:

DelegateTool