definitions
TaskGraph
Bases: Graph
Source code in src/lmflux/graphs/task/definitions.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |
run(with_context=None)
Execute every node of the graph respecting the directed edges.
Cycles raise a RuntimeError.
Source code in src/lmflux/graphs/task/definitions.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |
agentic_task(agent)
Decorator for creating an AgenticTask with a specific agent.
Usage
@agentic_task(my_agent) def my_task(agent: Agent, session: Session): ...
Source code in src/lmflux/graphs/task/definitions.py
124 125 126 127 128 129 130 131 132 133 134 135 136 | |
transformer_task(func)
Decorator for creating an TransformerTask.
Usage
@transformer_task def my_task(session: Session): ...
Source code in src/lmflux/graphs/task/definitions.py
112 113 114 115 116 117 118 119 120 121 122 | |