CLI Command Reference

Complete reference for all AgenticFlow CLI commands.

Diagnostics

agenticflow discover --json        # Machine-readable capability index
agenticflow doctor --json          # Preflight check (auth, health, spec)
agenticflow doctor --json --strict # Exit 1 if required checks fail
agenticflow whoami --json          # Show current auth profile

doctor validates config presence, token presence, API reachability, and bundled OpenAPI loading. Use --strict in CI/CD to gate execution.

When --json is set, command failures return the structured envelope:

{
  "schema": "agenticflow.error.v1",
  "code": "request_failed",
  "message": "...",
  "hint": "optional"
}

Workflows

CRUD

Execution

Workflow execution is a 2-step process: start the run, then poll for status.

Run History

Validation & Metadata

Smart Connection Resolution

When workflow run encounters a "Connection not found" error, the CLI automatically:

  1. Fetches the workflow and identifies which nodes use the missing connection

  2. Looks up the node type's connection_category (for example pixelml, openai)

  3. Lists available connections matching that category

  4. Prompts you to select a replacement

  5. Updates the workflow with the new connection

  6. Retries the run

This removes most manual connection repair work when importing workflows between workspaces.


Agents

Template Bootstrap & Duplicate

templates duplicate agent duplicates referenced workflow templates first, then creates the agent with duplicated workflow_id tool references.

Minimal Agent Payload

Stream Payload


Node Types

circle-info

Prefer get or search over list. The full node types list is very large and may time out.

Finding Connection Requirements

To find what kind of connection a node requires:

Look at the connection field in the response. connection_category tells you which connection category is needed.


Connections

circle-exclamation

Uploads


API Discovery

These commands help you explore the full AgenticFlow API surface:


Raw API Call

For any endpoint not wrapped by a resource subcommand, use call:

--dry-run is supported on agenticflow call only.


Policy & Safety


Step-by-step process for an AI agent to build and run a workflow:


Troubleshooting

Problem
Solution

Connection X not found

Re-run the workflow. CLI can auto-resolve using available connections.

operation_not_found

Use agenticflow ops list --json then retry with the suggested operation id.

invalid_option_value

Check numeric flags like --limit, --offset, --top and provide integers only.

local_schema_validation_failed

Inspect details.issues, fix payload fields, and rerun (try workflow validate --local-only).

401 Error decoding token

Some endpoints require session tokens, not API keys. Use the web UI for those actions.

422 validation error

Read the detail array for exact missing/invalid fields.

Network request failed

Verify network/TLS/path; prefer targeted queries (node-types get/search) over huge list calls.

Connections list too few

Default limit is 10. Use --limit 200.

For restricted/sandbox network environments, use cache-first dry runs:

Last updated