Skip to main content

inspect Commands

Understanding how your actions connect can be challenging as workflows grow. The inspect command group helps you analyze workflow structure, dependencies, and data flow without executing anything.

agac inspect <subcommand> [options]
Run from Anywhere

You can run inspect commands from any subdirectory within your project.

Subcommands

SubcommandDescription
dependenciesAnalyze workflow dependencies and auto-inferred context
graphShow workflow structure as a visual dependency graph
actionShow detailed information about a specific action
contextShow context debug information for a specific action

inspect dependencies

How do actions connect to each other?

This command shows the dependency model for your workflow - which actions feed into others and which provide context data.

agac inspect dependencies -a <workflow-name> [options]

Options:

OptionDescription
-a, --agent TEXTWorkflow name (required)
-u, --user-codePath to user code directory
--jsonOutput as JSON
--action TEXTFilter to a specific action

Example:

agac inspect dependencies -a my_workflow

The output table shows:

  • Input Sources: Actions that provide the primary input data
  • Context Sources: Actions that provide additional context (via context_scope)
  • Type: Classification based on dependency pattern (Source, Transform, Merge, etc.)

Filter to Specific Action

agac inspect dependencies -a my_workflow --action extract_facts

JSON Output

agac inspect dependencies -a my_workflow --json

inspect graph

Visualize the workflow structure

Shows your workflow as a tree with data flow indicators:

agac inspect graph -a <workflow-name> [options]

Options:

OptionDescription
-a, --agent TEXTWorkflow name (required)
-u, --user-codePath to user code directory
--jsonOutput as JSON

Example:

agac inspect graph -a my_workflow

The output symbols indicate:

  • Input source (execution dependency)
  • Context source (additional data)
  • Output fields (from schema)

inspect action

Deep dive into a single action

Shows detailed configuration, dependencies, and schema for one action:

agac inspect action -a <workflow-name> <action-name> [options]

Options:

OptionDescription
-a, --agent TEXTWorkflow name (required)
-u, --user-codePath to user code directory
--jsonOutput as JSON

Example:

agac inspect action -a my_workflow generate_question

JSON Output

agac inspect action -a my_workflow generate_question --json

inspect context

Debug context data availability for an action

Shows what data namespaces, template variables, and context scope rules would be available during template rendering for a specific action. This helps you understand what data is available without running the workflow.

agac inspect context -a <workflow-name> <action-name> [options]

Options:

OptionDescription
-a, --agent TEXTWorkflow name (required)
-u, --user-codePath to user code directory
--jsonOutput as JSON

Example:

agac inspect context -a my_workflow generate_question

The output shows:

  • Namespaces loaded: Available data namespaces (source, dependencies, versions, workflow)
  • Context scope applied: Which fields are observed, passed through, or dropped
  • Template variables available: Variables you can use in your prompt templates
  • Dependencies: Input sources and context sources

JSON Output

agac inspect context -a my_workflow generate_question --json
Debugging Template Errors

If you're getting "undefined variable" errors in your templates, use inspect context to see exactly what variables are available for that action.

Use Cases

Debugging Dependency Issues

If an action isn't receiving expected data:

# Check what the action thinks its dependencies are
agac inspect action -a my_workflow problematic_action

# See the full dependency chain
agac inspect graph -a my_workflow

Understanding Execution Order

# See the computed execution order
agac inspect graph -a my_workflow --json | jq '.execution_order'

Validating context_scope Configuration

# Check if context fields are correctly inferred
agac inspect dependencies -a my_workflow --json

Debugging Template Variable Issues

# See what variables are available for an action
agac inspect context -a my_workflow problematic_action

# Check if specific fields are accessible
agac inspect context -a my_workflow problematic_action --json | jq '.namespaces'

See Also