Skip to content

Commit 8dcee5d

Browse files
authored
Merge pull request strands-agents#44 from mkmeral/bidi-run
Add start/stop to bidi_agent.run
2 parents ef3d659 + aae5cf0 commit 8dcee5d

File tree

1 file changed

+5
-1
lines changed
  • src/strands/experimental/bidi/agent

1 file changed

+5
-1
lines changed

src/strands/experimental/bidi/agent/agent.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,15 @@ async def run_outputs():
428428
for output in outputs:
429429
if hasattr(output, "start"):
430430
await output.start()
431-
431+
432+
# Start agent after all IO is ready
433+
await self.start()
432434
try:
433435
await asyncio.gather(run_inputs(), run_outputs(), return_exceptions=True)
434436

435437
finally:
438+
await self.stop()
439+
436440
for input_ in inputs:
437441
if hasattr(input_, "stop"):
438442
await input_.stop()

0 commit comments

Comments
 (0)