diff --git a/docs/repl.md b/docs/repl.md index 073b87f51..aeb518be2 100644 --- a/docs/repl.md +++ b/docs/repl.md @@ -1,6 +1,7 @@ # REPL utility -The SDK provides `run_demo_loop` for quick interactive testing. +The SDK provides `run_demo_loop` for quick, interactive testing of an agent's behavior directly in your terminal. + ```python import asyncio @@ -14,6 +15,6 @@ if __name__ == "__main__": asyncio.run(main()) ``` -`run_demo_loop` prompts for user input in a loop, keeping the conversation -history between turns. By default it streams model output as it is produced. -Type `quit` or `exit` (or press `Ctrl-D`) to leave the loop. +`run_demo_loop` prompts for user input in a loop, keeping the conversation history between turns. By default, it streams model output as it is produced. When you run the example above, run_demo_loop starts an interactive chat session. It continuously asks for your input, remembers the entire conversation history between turns (so your agent knows what's been discussed) and automatically streams the agent's responses to you in real-time as they are generated. + +To end this chat session, simply type `quit` or `exit` (and press Enter) or use the `Ctrl-D` keyboard shortcut.