Refactored RoutineDiscoveryAgent from a hardcoded sequential pipeline to an LLM-driven agentic loop with tools
#121
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.
Files Created/Modified
bluebox/data_models/routine_discovery/state.pyDiscoveryPhaseenum andRoutineDiscoveryStateclass for BFS queue managementbluebox/llms/tools/routine_discovery_tools.pybluebox/agents/routine_discovery_agent.pyArchitecture Changes
Before: Hardcoded sequential pipeline
After: LLM-driven loop with tools
Tools Available to the LLM
list_transactions,get_transaction,scan_for_valueadd_transaction_to_queue,get_queue_status,mark_transaction_completerecord_identified_transaction,record_extracted_variables,record_resolved_variableconstruct_routine,finalize_routineKey Design Decisions
add_transaction_to_queueandmark_transaction_complete- when a variable's source is another transaction, it's auto-added to the queuerun()method signature and return type are preserved for compatibilityRoutineDiscoveryStatetracks all intermediate data for routine constructionTest Plan