Skip to main content

preview Command

The preview command lets you inspect data stored in the SQLite storage backend during workflow execution. This is useful for debugging, verifying outputs, and understanding what data flows between actions.

agac preview -w <workflow-name> [options]
Quick Inspection

Use preview to quickly check what records were written by an action without manually opening SQLite files.

Options

OptionDescription
-w, --workflow TEXTWorkflow configuration file name (required)
-a, --action TEXTAction name to preview (lists all actions if not specified)
-n, --limit INTMaximum number of records to show (default: 10)
--offset INTNumber of records to skip (default: 0)
-f, --formatOutput format: table, json, or raw (default: table)
--statsShow storage statistics only

Examples

List All Actions

See which actions have stored data:

agac preview -w my_workflow

Preview Action Output

View records from a specific action:

agac preview -w my_workflow -a extract_facts

JSON Output

Get machine-readable output for scripting:

agac preview -w my_workflow -a extract_facts -f json

Pagination

Browse through large datasets:

# First 10 records
agac preview -w my_workflow -a extract_facts -n 10

# Next 10 records
agac preview -w my_workflow -a extract_facts -n 10 --offset 10

Storage Statistics

Check how much data each action has stored:

agac preview -w my_workflow --stats

Output Formats

Table Format (default)

Displays records in a formatted table with key fields:

┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ source_guid ┃ node_id ┃ content ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ abc123 │ extract_facts_def4 │ {"facts": ["fact1", "fact2"]} │
└─────────────┴────────────────────┴──────────────────────────────────────────┘

JSON Format

Full record data as JSON array:

agac preview -w my_workflow -a extract_facts -f json

Raw Format

Unformatted output for piping to other tools:

agac preview -w my_workflow -a extract_facts -f raw | jq '.[] | .content'

Use Cases

Debugging Missing Data

If a downstream action isn't receiving expected data:

# Check what the upstream action actually produced
agac preview -w my_workflow -a upstream_action -n 5 -f json

Verifying Field References

Confirm that fields exist before referencing them:

# See the actual content structure
agac preview -w my_workflow -a extract_facts -f json | jq '.[0].content | keys'

Monitoring Workflow Progress

During long-running workflows, check what's been processed:

agac preview -w my_workflow --stats

See Also