Repository navigation
[python][examples] Add quickstart workflow examples - #158
Merged
Merged
Conversation
Sxnan
force-pushed
the
workflow-quickstart
branch
from
September 11, 2025 03:32
8fbfae5 to
8af3767
Compare
xintongsong
reviewed
Sep 11, 2025
Comment on lines
+139
to
+146
| aggregated_analysis_res_stream = ( | ||
| review_analysis_res_stream.key_by(lambda x: x.id) | ||
| .window(TumblingProcessingTimeWindows.of(Time.minutes(1))) | ||
| .process(AggregateScoreDistributionAndDislikeReasons()) | ||
| ) |
Contributor
There was a problem hiding this comment.
I wonder if we can convert the output of ReviewAnalysisAgent into a table, and apply some event-time windowing. The purpose is to show how to integrate the agent with not only datastream but also table api, and event-time is more frequently used by flink users.
Contributor
Author
There was a problem hiding this comment.
Sxnan
marked this pull request as ready for review
September 12, 2025 02:21
1 of 2 tasks
Sxnan
force-pushed
the
workflow-quickstart
branch
from
September 16, 2025 09:59
71468da to
71e68b4
Compare
Contributor
Author
|
@xintongsong Thanks for the review! All the comments are addressed. Please take another look. |
xintongsong
approved these changes
Sep 17, 2025
xintongsong
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Please merge after resolving the conflicts.
Sxnan
force-pushed
the
workflow-quickstart
branch
from
September 18, 2025 01:39
71e68b4 to
338074d
Compare
Contributor
Author
|
Conflict resolved, merging... |
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.
Purpose of change
This PR introduces a comprehensive quickstart workflow for Flink Agents with practical examples demonstrating how to integrate LLM-powered agents with Flink streaming pipelines. The changes include:
Two complete example workflows:
product_review_analysis.py: A simple streaming pipeline that analyzes product reviews using an LLM agent to extract review scores and unsatisfied reasonsproduct_improve_suggestion.py: A more complex multi-stage pipeline that aggregates review analysis results and generates product improvement suggestionsAgent implementations:
ReviewAnalysisAgent: Analyzes individual product reviewsProductSuggestionAgent: Generates improvement suggestions based on aggregated review dataSample data: Product review data in JSON format for testing the examples
These examples serve as a practical entry point for users to understand how to build streaming applications that leverage LLM agents for real-time data processing and analysis.
Tests
API
This change does not modify any public APIs. It only adds example code that demonstrates usage of existing Flink Agents APIs
Documentation