@@ -82,15 +82,15 @@ async def main():
8282 )
8383
8484 # Start a long-running task
85- msg_id = await session.send({
86- " prompt " : " Refactor the authentication module to use sessions" ,
87- } )
85+ msg_id = await session.send(
86+ " Refactor the authentication module to use sessions" ,
87+ )
8888
8989 # While the agent is working, steer it
90- await session.send({
91- " prompt " : " Actually, use JWT tokens instead of sessions" ,
92- " mode" : " immediate" ,
93- } )
90+ await session.send(
91+ " Actually, use JWT tokens instead of sessions" ,
92+ mode = " immediate" ,
93+ )
9494
9595 await client.stop()
9696```
@@ -274,18 +274,18 @@ async def main():
274274 )
275275
276276 # Send an initial task
277- await session.send({ " prompt " : " Set up the project structure" } )
277+ await session.send(" Set up the project structure" )
278278
279279 # Queue follow-up tasks while the agent is busy
280- await session.send({
281- " prompt " : " Add unit tests for the auth module" ,
282- " mode" : " enqueue" ,
283- } )
280+ await session.send(
281+ " Add unit tests for the auth module" ,
282+ mode = " enqueue" ,
283+ )
284284
285- await session.send({
286- " prompt " : " Update the README with setup instructions" ,
287- " mode" : " enqueue" ,
288- } )
285+ await session.send(
286+ " Update the README with setup instructions" ,
287+ mode = " enqueue" ,
288+ )
289289
290290 # Messages are processed in FIFO order after each turn completes
291291 await client.stop()
@@ -507,19 +507,19 @@ session = await client.create_session(
507507)
508508
509509# Start a task
510- await session.send({ " prompt " : " Refactor the database layer" } )
510+ await session.send(" Refactor the database layer" )
511511
512512# Steer the current work
513- await session.send({
514- " prompt " : " Make sure to keep backwards compatibility with the v1 API" ,
515- " mode" : " immediate" ,
516- } )
513+ await session.send(
514+ " Make sure to keep backwards compatibility with the v1 API" ,
515+ mode = " immediate" ,
516+ )
517517
518518# Queue a follow-up for after this turn
519- await session.send({
520- " prompt " : " Now add migration scripts for the schema changes" ,
521- " mode" : " enqueue" ,
522- } )
519+ await session.send(
520+ " Now add migration scripts for the schema changes" ,
521+ mode = " enqueue" ,
522+ )
523523```
524524
525525</details >
0 commit comments