crewmaster
¤
| MODULE | DESCRIPTION |
|---|---|
agents |
Agent models for CrewMaster v2.0.0. |
api |
Public API for CrewMaster v2.0.0. |
api_integration_test |
Integration tests for CrewMaster v2.0.0 — full tracer bullet verification. |
api_test |
Tests for the public API: crewmaster.execute() and execute_stream(). |
cli |
CrewMaster CLI — top-level command group. |
collaboration |
Collaboration protocol models for CrewMaster v2.0.0. |
conversation |
Conversation module for CrewMaster v2.0.0. |
core |
|
evaluation |
|
execution |
Execution runtime models for CrewMaster v2.0.0. |
init_test |
|
operations |
Operations models for CrewMaster v2.0.0. |
sandbox |
CrewMaster v2.0.0 Sandbox — FastAPI demo application. |
tools |
Tool registry models for CrewMaster v2.0.0. |
| CLASS | DESCRIPTION |
|---|---|
ExecutionError |
Raised when execution of an ExecutionPlan fails. |
| FUNCTION | DESCRIPTION |
|---|---|
execute |
Execute an Operation (single-node or multi-node) and return the final output. |
execute_stream |
Execute an Operation with streaming output. |
ExecutionError
¤
Raised when execution of an ExecutionPlan fails.
execute
async
¤
execute(operation: Operation, context_store: ContextStore, default_runtime: RuntimeDriver, block_store: BlockStore | None = None, tool_registry: ToolRegistry | None = None, plan: ExecutionPlan | None = None, prompt_engine: PromptEngine | None = None, observer: ExecutionObserver | None = None, context_overrides: dict[str, Any] | None = None) -> Any
Execute an Operation (single-node or multi-node) and return the final output.
If no plan is provided, one is built from operation via
:func:resolve_plan. The plan is then executed node by node in
topological order. Each node is dispatched to its assigned runtime
driver with :func:secure_retry_execution wrapping the call. The
output of each node is passed as deps context to downstream nodes.
When a node has max_retrieval_rounds > 0, the request_capability
system tool is injected into the toolset. If the agent invokes it,
execution is paused, the ToolRegistry is queried via
:meth:ToolRegistry.retrieve_by_description, matching capabilities
are added to the toolset, and the agent is re-dispatched with the
expanded toolset.
| PARAMETER | DESCRIPTION |
|---|---|
|
The root Operation to execute.
TYPE:
|
|
ContextStore with domain instances for resolution.
TYPE:
|
|
Fallback RuntimeDriver when an AgentConfig does not specify its own.
TYPE:
|
|
BlockStore for resolving block URIs. Required if plan is not pre-built.
TYPE:
|
|
Optional ToolRegistry for tool retrieval.
TYPE:
|
|
An optional pre-built ExecutionPlan. If omitted, one is built from operation.
TYPE:
|
|
Optional PromptEngine for rendering prompts at
execution time. When provided, each node's prompt is rendered
via
TYPE:
|
|
Optional ExecutionObserver for hooking into the execution lifecycle (on_plan_start, on_node_start, etc.).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Any
|
The structured output of the final node in the plan (matches |
Any
|
|
| RAISES | DESCRIPTION |
|---|---|
PlanBuildError
|
If the plan cannot be built due to unresolved dependencies. |
ExecutionError
|
If a node fails after exhausting retry attempts. |
execute_stream
async
¤
execute_stream(operation: Operation, context_store: ContextStore, default_runtime: RuntimeDriver, block_store: BlockStore | None = None, tool_registry: ToolRegistry | None = None, plan: ExecutionPlan | None = None, prompt_engine: PromptEngine | None = None, observer: ExecutionObserver | None = None, context_overrides: dict[str, Any] | None = None) -> AsyncIterator[RuntimeStreamChunk]
Execute an Operation with streaming output.
Like :func:execute, but yields :class:RuntimeStreamChunk events
as the plan progresses. Each node yields text_delta, tool_call,
and tool_result events during its execution, followed by a
node_complete chunk carrying the node's artifact. The final
final chunk carries the last node's output.
When a node has max_retrieval_rounds > 0, the request_capability
system tool is injected. If a tool_call chunk targets
request_capability, it is intercepted and handled exactly as in
:func:execute.
| PARAMETER | DESCRIPTION |
|---|---|
|
The root Operation to execute.
TYPE:
|
|
ContextStore with domain instances for resolution.
TYPE:
|
|
Fallback RuntimeDriver.
TYPE:
|
|
BlockStore for resolving block URIs.
TYPE:
|
|
Optional ToolRegistry for tool retrieval.
TYPE:
|
|
Optional pre-built ExecutionPlan.
TYPE:
|
|
Optional PromptEngine for rendering prompts at
execution time. Falls back to
TYPE:
|
|
Optional ExecutionObserver for hooking into the execution lifecycle.
TYPE:
|
| YIELDS | DESCRIPTION |
|---|---|
AsyncIterator[RuntimeStreamChunk]
|
RuntimeStreamChunk events during plan execution. |