supervisor

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Command supervisor demonstrates LoopKit's multi-agent spawn capability.

Overview

A parent agent with a $5 budget spawns two children in parallel:

  • researcher: granted $2 — scripted to exhaust its budget
  • writer: granted $1 — completes successfully

The parent receives SubAgentCompleted events for both children:

  • researcher → BudgetExceeded (exhausted $2)
  • writer → Completed (finished within $1)

The parent then finishes with its reserve intact, and prints a per-node attribution map showing how much each child spent.

Key concepts demonstrated

  • loopkit.Registry: register named child definitions
  • action.Spawn with Budget and Grant: multi-agent orchestration
  • SubAgentCompleted: how parent receives child outcomes (including BudgetExceeded)
  • Per-node spend attribution

Expected output

COMPLETED
  parent total: $0.00
  researcher:   BudgetExceeded (spent $2.00)
  writer:       Completed (spent $0.00)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL