Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/auth/byok.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def main():
done.set()

session.on(on_event)
await session.send({"prompt": "What is 2+2?"})
await session.send("What is 2+2?")
await done.wait()

await session.disconnect()
Expand Down
48 changes: 23 additions & 25 deletions docs/features/steering-and-queueing.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,13 @@ async def main():
)

# Start a long-running task
msg_id = await session.send({
"prompt": "Refactor the authentication module to use sessions",
})
msg_id = await session.send("Refactor the authentication module to use sessions")

# While the agent is working, steer it
await session.send({
"prompt": "Actually, use JWT tokens instead of sessions",
"mode": "immediate",
})
await session.send(
"Actually, use JWT tokens instead of sessions",
mode = "immediate"
)

await client.stop()
```
Expand Down Expand Up @@ -273,18 +271,18 @@ async def main():
)

# Send an initial task
await session.send({"prompt": "Set up the project structure"})
await session.send("Set up the project structure")

# Queue follow-up tasks while the agent is busy
await session.send({
"prompt": "Add unit tests for the auth module",
"mode": "enqueue",
})
await session.send(
"Add unit tests for the auth module",
mode = "enqueue"
)

await session.send({
"prompt": "Update the README with setup instructions",
"mode": "enqueue",
})
await session.send(
"Update the README with setup instructions",
mode = "enqueue"
)

# Messages are processed in FIFO order after each turn completes
await client.stop()
Expand Down Expand Up @@ -506,19 +504,19 @@ session = await client.create_session(
)

# Start a task
await session.send({"prompt": "Refactor the database layer"})
await session.send("Refactor the database layer")

# Steer the current work
await session.send({
"prompt": "Make sure to keep backwards compatibility with the v1 API",
"mode": "immediate",
})
await session.send(
"Make sure to keep backwards compatibility with the v1 API",
mode = "immediate"
)

# Queue a follow-up for after this turn
await session.send({
"prompt": "Now add migration scripts for the schema changes",
"mode": "enqueue",
})
await session.send(
"Now add migration scripts for the schema changes",
mode = "enqueue"
)
```

</details>
Expand Down