Runs the agent as a node.
(
self,
*,
ctx: Context,
node_input: Any,
)
| 313 | |
| 314 | @override |
| 315 | async def _run_impl( |
| 316 | self, |
| 317 | *, |
| 318 | ctx: Context, |
| 319 | node_input: Any, |
| 320 | ) -> AsyncGenerator[Any, None]: |
| 321 | """Runs the agent as a node.""" |
| 322 | async for event in self.run_async( |
| 323 | parent_context=ctx.get_invocation_context() |
| 324 | ): |
| 325 | # Preserve author by setting it in context for NodeRunner |
| 326 | if event.author: |
| 327 | ctx.event_author = event.author |
| 328 | |
| 329 | if not event.node_info.path and event.author == self.name: |
| 330 | event.node_info.path = ctx.node_path |
| 331 | yield event |
| 332 | |
| 333 | @final |
| 334 | async def run_live( |
nothing calls this directly
no test coverage detected