Repository navigation
Conversation
Show launchdarkly_ai_server.agui.stream for one config turn: RUN_STARTED, text and tool events, then RUN_FINISHED. The file is standalone so it does not edit the shared example index. Co-authored-by: alexis <alexis@launchdarkly.com>
|
@cursor review |
jeffdupont
reviewed
Oct 15, 2026
jeffdupont
left a comment
Contributor
There was a problem hiding this comment.
Not ready yet: the example can't be run.
examples/agui_stream.py:14-15says it isn't registered inmain.py, and the file has noif __name__ == "__main__"block. Every other example runs through theEXAMPLESdict inmain.py, so nothing callsinit_client()here andpython -m examples.agui_streamjust imports and exits. Fix: add"agui-stream": "examples.agui_stream"tomain.pyand aUsage (via main.py):line to the docstring, likeexamples/streaming.py.
Non-blocking:
TOOL_CALL_ARGSdeltas are empty unlesscapture_contentis on. One docstring line would save users wondering why args are blank.RUN_FINISHEDwithout usage printsUsage: null. Same asstreaming.py, so consistency only.
The API usage itself checks out against main: agui.stream(...) signature and the event field names all match RunReader/TurnEmitter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a standalone example of
launchdarkly_ai_server.agui.streamfor one AI Config turn.config().stream()stayschunkthendone. This file shows the opt-in reader:RUN_STARTED, text and tool events, thenRUN_FINISHED. Text goes to stdout. Run and tool events go to stderr.main.pyand the README layout are unchanged, so this does not collide with another example PR editing that index.run(flag_key, user_input)matches the other examples.