MCPcopy Index your code
hub / github.com/google/adk-python / NodeState

Class NodeState

src/google/adk/workflow/_node_state.py:28–60  ·  view source on GitHub ↗

State of a node in the workflow.

Source from the content-addressed store, hash-verified

26
27
28class NodeState(BaseModel):
29 """State of a node in the workflow."""
30
31 model_config = ConfigDict(extra='ignore', ser_json_bytes='base64')
32
33 status: NodeStatus = NodeStatus.INACTIVE
34 """The run status of the node."""
35
36 input: Any = None
37 """The input provided to the node."""
38
39 attempt_count: int = Field(default=1, exclude_if=lambda v: v == 1)
40 """The attempt count for this node run (1-based)."""
41
42 interrupts: list[str] = Field(default_factory=list)
43 """The interrupt ids that are pending to be resolved."""
44
45 resume_inputs: dict[str, Any] = Field(default_factory=dict)
46 """The responses for resuming the node, keyed by interrupt id."""
47
48 run_counter: int = Field(default=0, exclude_if=lambda v: v == 0)
49 """Sequential counter incremented each time the node gets a fresh run.
50
51 Preserving this count independently of run_id prevents path collisions
52 if a node switches between custom string IDs and auto-generated numeric IDs.
53 """
54
55 run_id: str | None = None
56 """The run ID of this node run."""
57
58 parent_run_id: str | None = None
59 """The run ID of the parent node which dynamically
60 scheduled this node run."""

Calls

no outgoing calls