Nodes¶
octomate.reflex.nodes.awake ¶
The graph's entry node: reads the signal that woke it and picks the first transition.
Awake
dataclass
¶
Bases: BaseNode[ReflexState, ReflexDeps, ReflexGraphResult]
The entry node: explicit commands dispatch, batch replies resume, native
handoffs land, and user messages resolve their thread and go to Route.
Source code in octomate/reflex/nodes/awake.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |
run
async
¶
run(
ctx: GraphRunContext[ReflexState, ReflexDeps],
) -> (
Command
| Route
| ResumeDeferred
| Summon
| Teleport
| Scheme
| End[ReflexGraphResult]
)
Source code in octomate/reflex/nodes/awake.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
thread_operation
async
¶
thread_operation(
ctx: GraphRunContext[ReflexState, ReflexDeps],
thread_ref: UUID | ThreadKey,
decision: SummonDecision | TeleportDecision,
*,
agent_id: str,
sender: UserProfile,
source: ChannelAddress,
requested_from: str,
) -> Summon | Teleport
Enter an existing thread its owner acts on: the console's operation on any thread, or a native session's teleport of its own.
Source code in octomate/reflex/nodes/awake.py
octomate.reflex.nodes.command ¶
Execute explicit command intent on its selected conversation, without routing text.
Command
dataclass
¶
Bases: BaseNode[ReflexState, ReflexDeps, ReflexGraphResult]
Own one command invocation through direct feedback or an ordinary agent stream.
Source code in octomate/reflex/nodes/command.py
run
async
¶
run(
ctx: GraphRunContext[ReflexState, ReflexDeps],
) -> Summon | Scheme | Teleport | End[ReflexGraphResult]
Source code in octomate/reflex/nodes/command.py
octomate.reflex.nodes.route ¶
The node that decides which agent takes an inbound message: the thread's owner, the flat-thread agent, or the channel's entry agent.
Route
dataclass
¶
Bases: BaseNode[ReflexState, ReflexDeps, ReflexGraphResult]
Picks the agent for an inbound message — the chat's pinned owner, the
flat-thread agent, or the channel's entry agent — and enters React.
Source code in octomate/reflex/nodes/route.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
run
async
¶
Source code in octomate/reflex/nodes/route.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
octomate.reflex.nodes.react ¶
The node that runs the agent: records the handoff, drives the run onto the channel's timeline, and acts on whatever decision or deferral the run left.
React
dataclass
¶
Bases: BaseNode[ReflexState, ReflexDeps, ReflexGraphResult]
Runs the summoned agent on the target channel and acts on how the run ends: a reply, a spell to perform, or a deferral to park.
Source code in octomate/reflex/nodes/react.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
resume_results
class-attribute
instance-attribute
¶
run
async
¶
run(
ctx: GraphRunContext[ReflexState, ReflexDeps],
) -> (
React
| Summon
| Scheme
| Teleport
| End[ReflexGraphResult]
)
React, and leave the turn's workspace in the mirror however it ends.
In a finally because a turn that raised still did whatever it did on
disk. The files an agent wrote before its provider dropped the connection
are work, and until this runs the workspace is the only copy of them —
which also means the sweep can never reclaim that workspace, since it
refuses anything the mirror has not seen. A failed turn on a thread nobody
resumes would otherwise hold its disk for good.
A cancelled turn is the one case this does not cover: the save's first await raises straight back out, so its work stays in the workspace and the sweep keeps it, which is the safe direction.
Source code in octomate/reflex/nodes/react.py
react
async
¶
react(
ctx: GraphRunContext[ReflexState, ReflexDeps],
) -> (
React
| Summon
| Scheme
| Teleport
| End[ReflexGraphResult]
)
Source code in octomate/reflex/nodes/react.py
59 60 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
octomate.reflex.nodes.summon ¶
The node that performs a summon: hands the conversation, where it is, to the agent
the decision names, then re-enters React there.
Summon
dataclass
¶
Bases: BaseNode[ReflexState, ReflexDeps, ReflexGraphResult]
Performs a summon: takes the surface over in place for the agent the decision
names, then re-enters React there.
Source code in octomate/reflex/nodes/summon.py
run
async
¶
Source code in octomate/reflex/nodes/summon.py
octomate.reflex.nodes.scheme ¶
The node that performs a scheme: hands this turn's brief to a person's direct
messages.
Scheme
dataclass
¶
Bases: BaseNode[ReflexState, ReflexDeps, ReflexGraphResult]
A scheme call: hand this turn's brief to the asking user's direct messages.
The receiver is whoever already owns that DM, or the channel's default agent when
nobody does — never an agent this run picked, so a group can't point someone's
private assistant somewhere. From there it is an ordinary handoff: the brief becomes
the receiving agent's prompt and the handoff is recorded on the DM's own thread, the
same way Route re-enters React with a decision it resolved itself.
Source code in octomate/reflex/nodes/scheme.py
run
async
¶
Source code in octomate/reflex/nodes/scheme.py
octomate.reflex.nodes.teleport ¶
The node that performs a teleport: carries the running agent's history
somewhere else and resumes it there.
Teleport
dataclass
¶
Bases: BaseNode[ReflexState, ReflexDeps, ReflexGraphResult]
Create a thread at the prepared address, copy history and resume the agent.
An in-place move binds a project without creating a thread. A failed creation refuses the move before any history is copied.
Source code in octomate/reflex/nodes/teleport.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | |
run
async
¶
Source code in octomate/reflex/nodes/teleport.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | |
carry_on
async
¶
Run the agent where the move landed: on the user's prompt, recorded there as their message, or on its own call answered by where it now is.
Source code in octomate/reflex/nodes/teleport.py
land
async
¶
End the move where it landed, for the next message there to carry on: the handoff is recorded and the workspace saved, as a turn's end would.
Source code in octomate/reflex/nodes/teleport.py
bind
async
¶
Bind the thread landed in to the project the request names, and fork its workspace, so the resumed run starts in the project's code. The gate validated the project and the ref; a project missing here is a wiring bug. Answers the bound thread, re-read: the state's copy predates the binding, and the turn-end save reads the project off it.
Source code in octomate/reflex/nodes/teleport.py
octomate.reflex.nodes.resume_deferred ¶
The node that continues a run after a human answered its deferred batch.
ResumeDeferred
dataclass
¶
Bases: BaseNode[ReflexState, ReflexDeps, ReflexGraphResult]
Resolves a batch from the user's reply and, once it is whole, resumes the
suspended run through React.
Source code in octomate/reflex/nodes/resume_deferred.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
run
async
¶
Source code in octomate/reflex/nodes/resume_deferred.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |