runner
strands_teams.runner ¶
Generic run loop for a strands_teams coordinator (Wave C).
:func:run_teams orchestrates a use-case run: it validates and builds the coordinator via :func:strands_teams.coordinator.create_coordinator, wires optional hook-driven display, invokes the coordinator with the per-run invocation_state (AC-8-1, AC-8-4), persists the structured output, and cleans up. Adapted from the pre-split code_context_agent.agent.runner skeleton (limits, Live wiring, structured-output persistence, _cleanup, StreamResult) but domain-agnostic — all domain vocabulary comes from the UseCase.
The hooks (:mod:strands_teams.hooks) and display (:mod:strands_teams.display) modules are owned by concurrent Wave C tasks; this module imports them lazily and tolerates their absence so it can be developed and tested independently. The expected names are create_all_hooks(use_case, *, full_mode, state, quiet) and the display types AgentDisplayState / RichEventConsumer / QuietConsumer.
StreamResult ¶
Bases: BaseModel
Result of a coordinator run.
run_teams async ¶
run_teams(
use_case,
*,
repo_path,
focus=None,
extra_context=None,
bundles_only=False,
full_mode=False,
quiet=False,
)
Run a use-case coordinator end to end.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
use_case | UseCase | The domain use case to run. | required |
repo_path | str | Path | The target root the run operates on (passed to | required |
focus | str | None | Optional focus area. | None |
extra_context | str | None | Optional free-form context for the kickoff prompt. | None |
bundles_only | bool | Skip dispatch and regenerate artifacts from existing findings. | False |
full_mode | bool | Use full-mode reasoning effort and timeouts. | False |
quiet | bool | Suppress the Rich display. | False |
Returns:
| Type | Description |
|---|---|
dict[str, Any] | Dict with run status, duration, output paths, and the structured output. |
Source code in packages/strands-teams/src/strands_teams/runner.py
run_teams_sync ¶
run_teams_sync(
use_case,
*,
repo_path,
focus=None,
extra_context=None,
bundles_only=False,
full_mode=False,
quiet=False,
)
Synchronous wrapper around :func:run_teams.