This document clearly compares the two versions of Weather syntax to help you understand which fields are for frontend display and which are for backend storage.
Version Overview
TradingFlow Weather syntax has two versions:
π₯οΈ Full Version
Purpose: Frontend display and user interaction
Contains: All fields, including UI state, style configuration, runtime data
File Size: Larger, includes redundant information
Use Cases: Frontend ReactFlow rendering, user editing, real-time status display
πΎ Essential Version
Purpose: Agent generation and backend storage
Contains: Only core business logic fields
File Size: Streamlined, frontend-specific fields removed
Use Cases: Database storage, API transmission, Agent workflow generation
Field Comparison Overview
π Comparison Statistics
Level
Full Version Fields
Essential Version Fields
Retention Rate
Detailed Field Comparison
1οΈβ£ Top Level Structure
Field
Full
Essential
Description
Workflow thumbnail (optional)
Conclusion: All top-level fields are retained, no changes.
2οΈβ£ Node Basic Fields
Field
Full
Essential
Type
Description
Node position coordinates
Absolute position (calculated)
Retained Fields: position, id, type, data
Removed Fields: className, width, height, selected, positionAbsolute, dragging
Reason: Frontend automatically calculates dimensions and manages interaction states based on node content; no need to store.
3οΈβ£ Node data Object
Field
Full
Essential
Type
Description
Node-related edges (already in top level)
Retained Fields: title, description, collection, inputs, outputs, id
Removed Fields: edges, menuItems, isDeepEdit, isFlowExecuting, isStopping, signals
Reasons:
edges - Complete definition exists at top level, node-level is redundant reference
menuItems - Frontend generates dynamically based on node type
isDeepEdit, isFlowExecuting, isStopping - UI states, not part of workflow definition
signals - Runtime data, should not be persisted
Field
Full
Essential
Type
Description
Detailed description (outputs)
Retained Fields: id, title, type, inputType, required, placeholder, handle, value, options, min, max, description
Removed Fields: isDeleted, disabled
Reason: isDeleted and disabled are frontend temporary states; truly deleted fields should be removed directly from the array.
5οΈβ£ Edge Fields
Field
Full
Essential
Type
Description
Retained Fields: id, source, target, sourceHandle, targetHandle
Removed Fields: type, animated
Reason: type and animated only control frontend rendering style and animation, do not affect data flow logic.
Practical Comparison Examples
Full Version Example (Node)
Essential Version Example (Node)
Reduction: From ~20 fields to ~7 fields, file size reduced by approximately 60%.
Full Version Example (Edge)
Essential Version Example (Edge)
Reduction: From 7 fields to 5 fields.
Conversion Rules
Full β Essential Conversion
Backend automatically performs the following cleanup before storage:
Essential β Full Conversion
Frontend automatically supplements frontend fields after loading:
1. Special Handling of edges Field
data.edges array within nodes:
Full version: Contains complete information of all edges related to this node (redundant)
Essential version: Completely removed , because top-level edges array already contains all information
Frontend automatically populates each node's data.edges based on top-level edges.
2. Handling Optional Fields
Some fields are optional in Essential version:
thumbnailUrl - If absent, frontend auto-generates
placeholder - If absent, shows default hint
options - Can be omitted if empty array
3. Backward Compatibility
If Essential version contains frontend fields (like width, selected), frontend will:
Prioritize values from Essential version
Use default or calculated values if missing
When Agent Generates
β
Recommended:
β Avoid:
When Backend Stores
Always store Essential version
Keep Essential format in API responses
Let frontend handle UI-related field supplementation
When Frontend Processes
Load Essential version from backend
Auto-convert to Full version for rendering
Convert back to Essential version when saving
File Size Comparison
For a workflow with 7 nodes and 7 edges:
Version
File Size
Compressed
Savings
Conclusion: Essential version significantly reduces storage space and network transmission overhead.
Quick Reference Table
Fields to Remove Checklist
Node Level:
data Level:
Input/Output Level:
Edge Level:
Related Documentation:
Last updated 3 months ago