Flows¶
This section contains documentation for the various research flows and state machines available in DeepCritical.
Overview¶
DeepCritical organizes research workflows into specialized flows, each optimized for different types of research tasks and domains.
Available Flows¶
PRIME Flow¶
Purpose: Protein engineering and molecular design workflows Location: PRIME Flow Documentation Key Features: - Scientific intent detection - Adaptive replanning - Domain-specific heuristics - Tool validation and execution
Bioinformatics Flow¶
Purpose: Multi-source biological data fusion and integrative reasoning Location: Bioinformatics Flow Documentation Key Features: - Gene Ontology integration - PubMed literature analysis - Expression data processing - Cross-database validation
DeepSearch Flow¶
Purpose: Advanced web research with reflection and iterative strategies Location: DeepSearch Flow Documentation Key Features: - Multi-engine search integration - Content quality filtering - Iterative research refinement - Result synthesis and ranking
Challenge Flow¶
Purpose: Experimental workflows for benchmarks and systematic evaluation Location: Challenge Flow Documentation Key Features: - Method comparison frameworks - Statistical analysis and testing - Performance benchmarking - Automated evaluation pipelines
Code Execution Flow¶
Purpose: Intelligent code generation, execution, and automatic error correction Location: Code Execution Flow Documentation Key Features: - Multi-language code generation - Isolated execution environments - Automatic error analysis and improvement - Iterative error correction
Flow Architecture¶
All flows follow a common architectural pattern:
graph TD
A[User Query] --> B[Flow Router]
B --> C[Flow-Specific Processing]
C --> D[Tool Execution]
D --> E[Result Processing]
E --> F[Response Generation] Common Components¶
State Management¶
Each flow uses Pydantic models for type-safe state management throughout the workflow execution.
Error Handling¶
Comprehensive error handling with recovery mechanisms, logging, and graceful degradation.
Tool Integration¶
Seamless integration with the DeepCritical tool registry for extensible functionality.
Configuration¶
Hydra-based configuration for flexible parameterization and environment-specific settings.
Flow Selection¶
Automatic Flow Selection¶
DeepCritical can automatically select appropriate flows based on query analysis and intent detection.
Manual Flow Configuration¶
Users can explicitly specify which flows to use for specific research tasks:
Multi-Flow Coordination¶
Multiple flows can be combined for comprehensive research workflows that span different domains and methodologies.
Flow Development¶
Adding New Flows¶
- Create Flow Configuration: Add flow-specific settings to
configs/statemachines/flows/ - Implement Flow Logic: Create flow-specific nodes and state machines
- Add Documentation: Document the flow in
docs/user-guide/flows/ - Update Navigation: Add flow to MkDocs navigation
- Add Tests: Create comprehensive tests for the new flow
Flow Best Practices¶
- Modularity: Keep flow logic focused and composable
- Error Handling: Implement robust error handling and recovery
- Documentation: Provide clear usage examples and configuration options
- Testing: Include comprehensive test coverage for all flow components
- Performance: Optimize for both speed and resource efficiency
Related Documentation¶
- Architecture Overview - System design and components
- Tool Registry - Available tools and integration
- Configuration Guide - Flow configuration options
- API Reference - Agent and flow APIs