Skip to main content

schema Command

The schema command analyzes your workflow configuration. It shows the fields that each action expects and the fields that each action produces. It does not make API calls.

bash
BASH
agac schema -w <workflow-name> [options]

This command finds field reference errors before a run. For example, if you typed extract_facts.fact in place of extract_facts.facts, you would find the error at runtime. You would find it after the workflow processed hundreds of records. The schema command validates these references statically.

Run from Anywhere

You can run this command from any subdirectory in your project.

Options​

OptionDescription
-w, --workflow TEXTThe workflow name (required). -a names the same option.
-u, --user-code DIRECTORYThe path to the user code directory that contains the tools
--jsonWrite the output as JSON, for use by programs
-v, --verboseShow a detailed diagram of the data flow

Examples​

bash
BASH
# Show schemas in table format
agac schema -w my_workflow

# Output as JSON for programmatic use
agac schema -w my_workflow --json

# Show detailed data flow tree
agac schema -w my_workflow --verbose

# Include tool schemas from user code
agac schema -w my_workflow -u ./tools

Output Reference​

The output shows:

  • Input: The fields that the action requires from upstream actions or from the source data
  • Output: The fields that the action produces for downstream actions
  • (none): The action requires no input fields, or produces no output fields
  • (schemaless): The output schema is not defined (a tool without a YAML schema: field)
  • (dynamic): The schema is set at runtime
  • (template-based): The input fields come from the prompt template

Schema Sources for Each Action Type:

Action TypeInput Schema SourceOutput Schema Source
LLMTemplate references and context_scopeschema field
Toolcontext_scope in workflow YAMLschema field in workflow YAML

See Also​