What are Flows?
Flows are containers that group related steps together and provide:Shared Memory
Each flow maintains its own context that persists across steps within the flow
Component Management
Flows can have dedicated components like memory systems, specialized tools, or custom handlers
Context Transfer
When transitioning between flows, context is intelligently summarized and passed along
Entry/Exit Points
Define which steps can enter or exit a flow for better control flow management
Flow Configuration
You can define flows in your YAML configuration:Flow Memory and Context
Each flow can have its own memory system that:Preserves Context
Preserves Context
Maintains conversation history and important details within the flow
Intelligent Retrieval
Intelligent Retrieval
Uses BM25 or other retrieval methods to find relevant information
Context Summarization
Context Summarization
Automatically summarizes context when exiting a flow
Cross-Flow Transfer
Cross-Flow Transfer
Passes summarized context when transitioning between flows
Flow Benefits
- Architecture
- Context
- Scalability
- Memory
- Control
Organized Architecture: Keep related functionality grouped togetherFlows help you organize your agent’s capabilities into logical groups, making your codebase more maintainable and easier to understand.
Example: Barista Agent with Flows
The barista example demonstrates flow usage for order management:This flow ensures that all order-related context (customer preferences, cart contents, order history) is maintained throughout the ordering process and properly summarized when the order is complete.
Multi-Flow Applications
You can create sophisticated applications by combining multiple flows:Flow Transitions
Flows automatically handle context transfer when users move between different workflows, ensuring seamless user experience while maintaining relevant information.
Best Practices
Single Responsibility
Each flow should handle one specific type of workflow or business logic
Clear Entry Points
Define clear conditions for when users should enter each flow
Context Management
Keep flow contexts focused and relevant to avoid information overload
Exit Strategies
Always provide clear exit paths from each flow
Configuration Validation
Use thenomos validate
command to check your flow configuration:
- Flow ID uniqueness
- Entry/exit step references
- Component configuration
- Field naming compatibility (supports both
id
/flow_id
anddesc
/description
)
Field Naming FlexibilityNOMOS supports both compact (
id
, desc
) and descriptive (flow_id
, description
) field names for flows. You can use either convention consistently in your configuration.