teff.node.node¶
teff.node.node
¶
Abstract base for all graph nodes.
Classes:
| Name | Description |
|---|---|
Node |
Abstract base class for all graph nodes. |
Node
¶
Bases: ABC
Abstract base class for all graph nodes.
Subclasses must set type and implement execute.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Unique node type identifier used for registry lookups. |
config |
Configuration dict (merged from constructor kwargs). |
Methods:
| Name | Description |
|---|---|
execute |
Execute the node's logic. |
Source code in teff/node/node.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
execute
abstractmethod
async
¶
execute(ctx, state)
Execute the node's logic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ctx
|
Any
|
Execution context providing tool/LLM access. |
required |
state
|
dict
|
Current workflow state dict (shallow-merge in/out). |
required |
Returns:
| Type | Description |
|---|---|
dict | Command
|
State updates to shallow-merge into the workflow state, or a |
dict | Command
|
class: |
dict | Command
|
to a specific next node. |
Source code in teff/node/node.py
24 25 26 27 28 29 30 31 32 33 34 35 36 | |