Problem
Current implementation passes module state through workflow context implicitly. For complex module graphs with nested sub-modules, this can become unclear and potentially problematic.
Proposed Solution
Implement explicit state serialization for complex module graphs:
- Define clear serialization boundaries
- Support snapshotting intermediate state
- Enable state inspection for debugging
Use Cases
- Deep module hierarchies (e.g., RAG → Retriever → Ranker → Generator)
- Modules with complex internal state
- Debugging failed workflows by inspecting intermediate state
Implementation Notes
- Consider using Pydantic models for state serialization
- Evaluate what state needs to be serialized vs reconstructed
- LM instances should remain as references (not serialized)
- Look at how Pydantic AI handles
RunContext serialization
Priority
High
Problem
Current implementation passes module state through workflow context implicitly. For complex module graphs with nested sub-modules, this can become unclear and potentially problematic.
Proposed Solution
Implement explicit state serialization for complex module graphs:
Use Cases
Implementation Notes
RunContextserializationPriority
High