Inspect Graph Block
The Inspect Graph block is a utility designed to help you debug and inspect the structure of your workflow.
Inspect Graph Block
- The Inspect Graph block is a utility designed to help you debug and inspect the structure of your workflow. It gives you a snapshot of how your workflow is currently configured—showing which blocks are connected, their dependencies, and other structural details.
When to use it:
- When you want to visualize or debug the flow of data and dependencies between blocks.
- To verify that your workflow is structured as intended, especially after making changes.
- To monitor performance metrics like elapsed time and cost for graph inspection.
How to use it:
- Add the Block
- Drag the Inspect Graph block onto your workflow canvas.
- Connect the Block
- Attach it downstream from any block whose graph state you want to inspect (often near the end of your workflow, but it can be placed anywhere).
- No Configuration Needed
- The Inspect Graph block does not require any configuration. There are no required fields to fill out in its configuration panel.
- Run the Workflow
- Execute your workflow as usual.
- When the workflow reaches the Inspect Graph block, it will output a serialized representation of the workflow’s current graph structure.
What Do Its Outputs Look Like?
- The output of the Inspect Graph block is a JSON object that includes:
- Response Format: JSON
- Elapsed Time (ms): How long the inspection took
- Cost: Associated cost for the inspection (if any)
- Graph Structure: Details about blocks, their connections, and dependencies
Example output:
{
"blocks": [
{
"block_id": "inputs",
"block_type": "Input",
"dependencies": []
},
{
"block_id": "collections_v2_tables_query",
"block_type": "Search Table",
"dependencies": ["inputs"]
},
{
"block_id": "llm",
"block_type": "LLM",
"dependencies": ["collections_v2_tables_query"]
},
{
"block_id": "debug_inspect_graph",
"block_type": "Inspect Graph",
"dependencies": ["llm"]
}
],
"elapsed_time_ms": 12,
"cost": 0.0001
}
Best Practices
- Use during development: Add the Inspect Graph block while building or troubleshooting your workflow to ensure everything is wired correctly.
- Remove before production: Once you’ve validated your workflow structure, you can remove or disable the block if you don’t need ongoing inspection.
- Check outputs: After running your workflow, click on the Inspect Graph block in the run history to view the output and confirm your workflow’s structure.