🚀 Upgrade Fraud Detection Workflow to current version Agent Framework 1.0.0b260130#376
Merged
james-tn merged 5 commits intoint-agenticfrom Feb 4, 2026
Merged
🚀 Upgrade Fraud Detection Workflow to current version Agent Framework 1.0.0b260130#376james-tn merged 5 commits intoint-agenticfrom
james-tn merged 5 commits intoint-agenticfrom
Conversation
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.
Summary
This PR upgrades the Fraud Detection workflow application to use the new Agent Framework API, which includes breaking changes to the human-in-the-loop pattern. The migration replaces the deprecated RequestInfoExecutor pattern with the new ctx.request_info() and @response_handler decorator pattern.
Breaking Changes in Agent Framework
The following APIs were removed in the new version:
RequestInfoExecutor class
RequestInfoMessage base class
RequestResponse class
run_stream_from_checkpoint() method
The following APIs were added:
ctx.request_info(request_data, response_type) - Pauses workflow and emits RequestInfoEvent
@response_handler decorator - Handles responses when workflow resumes
get_checkpoint_summary(checkpoint) - Returns pending request info events
workflow.send_responses_streaming(responses) - Sends responses and continues workflow
Changes
Workflow Code (fraud_detection_workflow.py)
Replaced RequestInfoExecutor with ReviewGatewayExecutor that uses ctx.request_info()
Changed AnalystReviewRequest from RequestInfoMessage subclass to plain @DataClass
Added @response_handler decorated method to handle analyst decisions
Updated workflow builder to remove RequestInfoExecutor node and edges
Backend (backend.py)
Added UTF8FileCheckpointStorage wrapper class to fix Windows encoding issues with Unicode characters in LLM output
Updated checkpoint resolution to use get_checkpoint_summary().pending_request_info_events
Fixed checkpoint resolution timing - broadcast decision_required immediately, resolve checkpoint after SuperStepCompletedEvent
Updated resume logic to use run_stream(checkpoint_id=...) + send_responses_streaming(responses)
Added extensive debug logging for troubleshooting
Frontend
WorkflowVisualizer.jsx: Removed analyst_review node, updated edges so review_gateway connects directly to fraud_action_executor
useWebSocket.js: Added message queue to prevent lost messages during rapid React state updates
AnalystDecisionPanel.jsx: Made panel more compact with max height
App.jsx: Adjusted grid layout (Left: 2, Center: 7.5, Right: 2.5)
Documentation
Updated README.md with new architecture diagram and API references
Updated IMPLEMENTATION.md with new code examples
Updated QUICKSTART.md with new configuration instructions
Updated scenario.md to reference ReviewGatewayExecutor
Added troubleshooting entries for Windows encoding issues
Testing
✅ Workflow starts and processes alerts correctly
✅ Fan-out to 3 specialist executors works
✅ Fan-in aggregation produces risk assessment
✅ High-risk alerts trigger human-in-the-loop review
✅ Analyst decision panel appears in UI
✅ Checkpoints are saved with UTF-8 encoding (Windows fix)
✅ Workflow resumes after analyst decision
Migration Notes
If you have custom implementations using the old API, migrate as follows:
Before (deprecated):
After (new API):
Dependencies
Updated pyproject.toml to use latest agent-framework version
Regenerated uv.lock with updated dependencies