AgenticFlow CLI

Command-line interface for AgenticFlow — build agents, deploy workflows and multi-agent workforces, and automate operations from your shell.

The AgenticFlow CLI (agenticflow, alias af) is a command-line interface for operating the AgenticFlow platform.

It is designed for:

  • AI agents that execute platform operations autonomously

  • Engineers scripting automation and CI/CD pipelines

  • Human operators who prefer a shell-first workflow

Current published version: @pixelml/[email protected] (SDK @pixelml/[email protected]).

Install

# Run without installing
npx @pixelml/agenticflow-cli doctor

# Or install globally (recommended for daily use)
npm install -g @pixelml/agenticflow-cli

Requires Node.js 18+. The CLI is available as both agenticflow and af (short alias).

Quick Start

# 1. Authenticate (interactive — prompts for API key, workspace, project)
af login

# 2. One-shot orientation — auth, agents, workforces, blueprints, playbooks, what's new
af bootstrap --json

# 3. Deploy a starter — pick the simplest shape that fits your need
af workflow init --blueprint summarize-url --json   # rung 2: URL → LLM summary
af agent init --blueprint research-assistant --json  # rung 3: agent with web-search plugins
af workforce init --blueprint parallel-research --json  # rung 6: 4-agent fan-out DAG

# 4. Run it
af workflow run --workflow-id <id> --input '{"url":"..."}' --json
af agent run --agent-id <id> --message "..." --json
af workforce run --workforce-id <id> --trigger-data '{"message":"..."}'

For AI agents: start every session with af bootstrap --json. It returns everything you need — auth state, agents, workforces, models, blueprints (with kind + complexity + deploy_command), playbooks, changelog, and a commands cheat-sheet — in a single call.

The composition ladder

The three deploy verbs — workflow, agent, workforce — are rungs on a complexity ladder. Start at the lowest rung that solves the user's problem.

Rung
Kind
Deploy
What it does

0

workflow

af workflow init --blueprint llm-hello

trigger → llm → output (hello world)

1

workflow

af workflow init --blueprint llm-chain

llm_plan → llm_execute (chained reasoning)

2

workflow

af workflow init --blueprint summarize-url

web_retrieval → llm (enriched)

2

workflow

af workflow init --blueprint api-summary

api_call → llm

3

agent

af agent init --blueprint research-assistant

single agent + plugins (flexible)

3

agent

af agent init --blueprint content-creator

agent with web_search + generate_image

3

agent

af agent init --blueprint api-helper

agent with api_call + json parsing

6

workforce

af workforce init --blueprint parallel-research

4-agent fan-out/fan-in DAG

6

workforce

af workforce init --blueprint <vertical>

dev-shop · marketing-agency · sales-team · content-studio · support-center · amazon-seller · tutor · freelancer

Rungs 4-5 (agent + workflow-as-tool; agent + sub-agents) are on the roadmap. See af playbook composition-ladder for the decision rule in full.

Blueprints (20 CLI-shipped starters)

Blueprints ship with the CLI and are offline, version-locked to the CLI release.

Workflow blueprints need one LLM-provider connection (Straico, OpenAI, Anthropic, Google, DeepSeek, Groq) in the workspace — af workflow init auto-discovers it. Agent and workforce blueprints don't need any pre-configured connections for the built-in-plugin ones.

Marketplace (live catalog)

Complements blueprints. The marketplace is the live, backend-hosted catalog of user- and admin-curated templates (agent, workflow, MAS/workforce). Updated independently of the CLI.

af marketplace try auto-detects the item's type and delegates to the right duplicate flow. See af playbook marketplace-vs-blueprint for when to use each.

Authentication

Method
Usage
Best For

Interactive login

af login

First-time setup

Environment variable

export AGENTICFLOW_API_KEY=<key>

CI/CD, automated agents

CLI flag

--api-key <key>

One-off scripts

Import from .env

af auth import-env --file .env

Batch import

Environment Variables

Variable
Purpose

AGENTICFLOW_API_KEY

API key

AGENTICFLOW_WORKSPACE_ID

Default workspace ID

AGENTICFLOW_PROJECT_ID

Default project ID

AF_SILENCE_DEPRECATIONS

Set =1 to suppress deprecation warnings on legacy commands

AF_SHOW_DEPRECATED

Set =1 to UN-hide af pack, af paperclip, af company in --help (hidden by default)

AF_INSECURE_TLS

Set =1 to opt-in to insecure TLS (off by default — useful only for self-signed dev backends)

AI-Agent Discovery — start here

Eight discovery commands cover everything you need to know about your workspace and the CLI surface:

Core Commands

Workflows (rungs 0-2 — deterministic)

Agents (rung 3 — flexible)

af agent update --patch is the recommended iteration path — send only the fields you want to change, and the CLI preserves your MCP clients, tools, code-execution config, and other settings.

Workforces (rung 6 — multi-agent DAG)

af workforce init --blueprint <id> creates one real agent per required blueprint slot (with plugins pre-attached for the batteries-included blueprints), wires them into a DAG, and returns the workforce ID plus every created agent ID — all in one response. Atomic rollback on failure.

Known limitation: af workforce run currently fails on API-key auth (backend returns 400 on user lookup). The CLI detects this and prints a 3-step workaround (publish + public SSE run). af workforce publish + a direct curl call to the public endpoint is the reliable path until the backend fix lands.

MCP clients (external tool providers)

Always inspect an MCP client before attaching it to an agent. The inspect command classifies the tool-schema pattern (Composio structured vs Pipedream single-instruction) and warns when parametric write operations are likely to fail.

See: af playbook mcp-client-quirks.

Marketplace templates

Company (portable agent-bundle I/O) [hidden — legacy]

af company * is hidden from default --help. Prefer af workforce export/import for new work.

Playbooks — guided paths

Playbooks are step-by-step walkthroughs shown when you run af playbook <topic>:

Global Options

Flag
Purpose

--json

Machine-readable JSON output with schema: discriminators

--fields <list>

Return only the named fields (saves context on list commands)

--dry-run

Validate without executing (create and deploy commands)

--patch

Partial update: fetch → merge → PUT (on af agent update and other updates)

--api-key <key>

Override API key

--workspace-id <id>

Override workspace

--project-id <id>

Override project

Hidden (deprecated) commands

af pack, af paperclip, af company are hidden from default --help (v1.10.0). They still work — set AF_SHOW_DEPRECATED=1 to see them in --help output. All migration paths:

  • af pack installaf workforce init --blueprint <id> (sunset 2026-10-14)

  • af paperclip initaf workforce init --blueprint <id> (sunset 2026-10-14)

  • af company *af workforce export/import (no hard sunset)

Error Handling

Every --json error returns a consistent envelope with an actionable hint:

Common codes: local_schema_validation_failed, request_failed, operation_not_found, invalid_option_value, missing_required_option, workforce_init_failed, workforce_run_api_key_unsupported, completed_empty, missing_connection.

SDK

A TypeScript SDK is published alongside the CLI:

Next Steps

Last updated