CLI Commands Reference

This page provides reference for the aip command-line interface that ships with the Python SDK. The CLI exposes the same resource coverage as the SDK, adds rich terminal renderers, and wraps import/export helpers for automation workflows.

circle-info

Need the interactive slash palette cheat sheet? Head over to the CLI Slash Command Palettearrow-up-right.

circle-info

Multi-account profiles ship in CLI v0.5.0+. Legacy aip config ... commands are deprecated and gated; see the Legacy Config Commandsarrow-up-right page for details and migration guidance.

At a glance

  • Manage agents, tools, MCP connections, and language models without writing code.

  • Stream AI agent runs with a live TTY renderer, file attachments, and transcript capture.

  • Import/export full resource definitions (JSON or YAML) and sync LangFlow flows into AIP.

  • Store multiple credential profiles in ~/.aip/config.yaml (default + named accounts) and switch output formats (rich, plain, json, md).


Installation & Quick start

Install & quick start
pipx install glaip-sdk

aip accounts add prod   # interactive credential prompt (alias: aip configure)

aip status              # smoke test connectivity
aip agents list         # browse resources (defaults to active account)
circle-info

Configuration sources Account selection order is --account flag > active_account in ~/.aip/config.yaml. CLI/palette ignore raw credential env vars; Python SDK still honors AIP_API_URL/AIP_API_KEY for scripts. AIP_ACCOUNT_FALLBACK is ignored in the MVP.


Global options

Global options (also honored on subcommands)

Flag
Description

--api-url TEXT

Deprecated: override API endpoint (profiles recommended)

--api-key TEXT

Deprecated: override API key (profiles recommended)

--account TEXT

Target a named account profile for this command (hidden; shown with --help --all)

--timeout FLOAT

Request timeout in seconds (30 default)

--view

Output mode: rich (default), plain, json, md

--no-tty

Disable rich TTY renderer for agent runs

--version

Show CLI version

--help

Show command help

Output modes

  • --view rich (default) renders tables/panels using Rich.

  • --view json emits machine‑friendly JSON.

  • --view md renders Markdown; --view plain prints plain text. All subcommands inherit --view from the top-level group.


Command Map

Command
Description

aip status

Check connectivity and resource counts

aip accounts ...

Manage credential profiles (add/list/use/remove); aip configure delegates here

aip configure

Interactive configuration wizard (alias of aip accounts add <active_account>)

aip agents ...

Agent CRUD, execution, import/export, LangFlow sync

aip tools ...

Tool upload/update, metadata, script retrieval

aip mcps ...

MCP configuration management and connection tests

aip models list

View available language models

aip config ...

Deprecated legacy config helpers (gated); see Legacy Config Commandsarrow-up-right


Agents

List

Options:

  • --simple — skip interactive fuzzy picker; always show a table

  • --type TEXT — filter by agent type (config, code, a2a, langflow)

  • --framework TEXT — filter by orchestration framework (langchain, langgraph, google_adk)

  • --name TEXT — filter by partial name (case-insensitive)

  • --version TEXT — filter by agent version

  • --sync-langflow — pull latest flows from the configured LangFlow server before listing (honours LANGFLOW_BASE_URL/LANGFLOW_API_KEY)

  • --view / --json — override output format

When you run the command on an interactive terminal in Rich mode it opens the picker only if no filters are supplied and --simple is omitted. Supplying any filter (--name, --type, --framework, --version) or switching to the simple/plain/JSON views skips the picker and prints the table immediately. Selecting an agent in the picker still shows complete metadata and suggested follow-up commands (run, update, delete).

Get

Options:

  • --select INTEGER — choose among ambiguous name matches (1-based)

  • --export PATH — export the full agent definition to .json or .yaml

  • --view / --json

AGENT_REF accepts either an ID or a name. The command resolves ambiguity using fuzzy search or the --select flag. Exported files include agent_config, tool associations, MCP references, and metadata.

Create

Required flags:

  • --name TEXT

  • --instruction TEXT

Optional flags:

  • --model TEXT — override the base model (omit to use your workspace’s AIP default); pass language_model_id inside --import payload for catalogue models

  • --tools TOOL_REF — attach tools by name or ID (multi-use option)

  • --agents AGENT_REF — attach sub-agents by name or ID (multi-use)

  • --mcps MCP_REF — attach MCP connections by name or ID (multi-use)

  • --timeout INTEGER — execution timeout per run (seconds, default 300)

  • --import PATH — bootstrap from an exported agent JSON/YAML file (CLI merges CLI flags over imported data)

  • --view / --json

References accept either UUIDs or human-friendly names; ambiguity raises unless unique. Import files can include metadata, agent_config (memory, tool sharing, PII tags), and runtime defaults. Secret fields should be re-supplied manually post-import.

Run

Parameters:

  • Positional INPUT or --input TEXT — required prompt if not provided positionally

  • --select INTEGER — disambiguate name matches

  • --chat-history JSON — pass prior turns as JSON array ([{"role": "user", "content": "..."}, ...])

  • --file PATH — attach one or more files (repeatable)

  • --timeout INTEGER — execution timeout for this run (defaults to agent timeout)

  • --save PATH — persist transcript and full debug log (supports .md or .json)

  • --verbose/--no-verbose — emit raw SSE JSON alongside the rich renderer

  • --view / --json

The command streams SSE responses using the Rich renderer (progress panels, tool call summaries, usage stats). Captured transcripts include artifacts and timing information when --save is used. Runtime overrides such as pii_mapping, runtime_config, or per-tool settings are currently only available via SDK/REST — the CLI forwards the fixed set above.

Update

Options:

  • --name TEXT

  • --instruction TEXT

  • --tools TOOL_REF

  • --agents AGENT_REF

  • --timeout INTEGER

  • --import PATH — merge updates from exported definition (CLI sanitises language model fields automatically)

  • --view / --json

Updating fetches the latest copy, merges defaults, and issues a full PUT. Passing empty lists (e.g. --tools omitted) keeps current associations; supplying an empty list in an import file clears them.

Delete

Soft-deletes the agent after confirmation (or immediately with --yes). Use the SDK/REST to restore soft-deleted agents if needed.

Sync LangFlow

Fetches all flows from the configured LangFlow instance and upserts matching agents. Credentials fall back to LANGFLOW_BASE_URL / LANGFLOW_API_KEY environment variables.


Tools

List

  • --type TEXT — filter by backend tool type (custom, native, etc.)

  • --view / --json

Create

Options:

  • Positional FILE or --file PATH — path to the plugin Python file

  • --name TEXT — override inferred plugin name (must match the class name attribute)

  • --description TEXT

  • --tags TEXT — comma-separated tags

  • --import PATH — import metadata from exported tool definition (merges with CLI flags)

  • --view / --json

If a file is provided, the CLI validates the plugin name attribute, checks for duplicates, and uploads via /tools/upload. Metadata-only creation is reserved for imports or native catalog entries.

Get

Options:

  • --select INTEGER — disambiguate by name

  • --export PATH — export JSON/YAML definition

  • --view / --json

Update

Options:

  • --file PATH — upload new plugin code (only valid for custom tools)

  • --description TEXT — metadata update (only valid for native tools)

  • --tags TEXT — comma-separated tags (native tools only)

  • --view / --json

Custom tools support code updates via file upload; native tools support metadata updates. The command enforces these constraints before calling the backend.

Delete

Deletes the tool after confirmation. The underlying API performs a soft delete.

Script

Fetches and prints the stored plugin source (json view wraps it under {"script": ...}).


MCPs (Model Context Protocol)

List

Shows stored MCP connections.

Create

Options:

  • --description TEXT

  • --config JSON — inline JSON payload (e.g. '{"url": "https://..."}')

  • --view / --json

Get

Resolves names/IDs, optionally exports the definition.

Tools

Lists tools discovered from a stored MCP connection.

Connect (ad-hoc test)

Loads JSON config from disk, calls /mcps/connect, and prints the result. Uses Rich panels unless --view json is active.

Update

Options:

  • --name TEXT

  • --description TEXT

  • --config JSON

  • --view / --json

The underlying SDK escalates to a full PUT when name, transport, and config are supplied together; the CLI currently exposes name, description, and config, so updates are submitted as partial PATCH requests.

Delete

Soft-delete after confirmation.


Language Models

Displays available language models for the current API key, including provider and optional base URL overrides. Use this list to locate language_model_id values for agent creation.


Configuration & Status

Interactive setup

1

Prompt for API URL and key

The wizard prompts for API URL and key (with masked input).

2

Persist to disk

Persists values to ~/.aip/config.yaml (0600 permissions).

3

Test the connection

Tests the connection by listing agents/tools/MCPs.

Legacy config commands (deprecated)

Use aip accounts ... or aip configure for credentials. If you still need the legacy aip config ... commands (for example, global settings like history_default_limit), see Legacy Config Commandsarrow-up-right for gated usage and migration guidance.

Status

Displays the resolved account + source (flag/account:<name>/active_profile:<name>), masks the key, pings the API, and counts agents/tools/MCPs. Useful for smoke tests in CI.

Accounts command group

  • aip accounts list renders a table with an active badge; --json returns [{name, api_url, has_key, active}] (keys are never printed).

  • aip accounts show prints one profile with masked key and config path; --json returns a single object and omits empty metadata fields.

  • aip accounts add is interactive by default; --url + --key <value> accepts inline keys, and --url + --key - (or no value) reads from stdin for scripts. Use --yes to overwrite without prompting. Add does not validate connectivity; validation happens when you switch.

  • aip accounts use validates connectivity before switching and then sets active_account (no offline bypass).

  • aip accounts remove refuses to delete the last profile; if the active profile is removed, the CLI auto-selects default (or the next alphabetical) and prints a notice.

  • The global --account <name> override is available on all commands (hidden; visible via --help --all) so you can target a profile without switching it.


Import & Export Workflow Tips

  • Use aip agents get <ref> --export agent.yaml or aip tools get <ref> --export tool.json to version configurations alongside code.

  • Imported agent files can carry agent_config settings for memory scopes, PII mappings, and tool output sharing described in the AIP REST reference. The CLI sanitises language model fields so you can swap between named models and catalogue IDs safely.

  • aip agents run ... --save transcript.md captures the Rich stream plus final answer; JSON saves include captured debug events for replaying pipelines.

  • When scripting, prefer --view json to capture machine-friendly responses and avoid control characters from the Rich renderer.


Examples

Run an agent with attachments and save the transcript

Replace agent-123 with the ID you captured from aip agents list.

Import agent configuration from Git

Sync LangFlow and inspect


The CLI shares the same backend guarantees as the Python SDK. Consult the REST reference for the full payload schema.

Last updated