Skip to main content

CLI for AgentRun — manage AI agent infrastructure from the command line

Project description

English | 简体中文

AgentRun CLI

Command-line tool for managing AI-agent infrastructure on the AgentRun platform.

ar (or agentrun) is a single-binary CLI that wraps the AgentRun Python SDK. It lets developers, CI pipelines, and LLM-powered agents create and operate sandboxes, tools, skills, model services and — most importantly — super agents: platform-hosted AI agents that you configure declaratively without writing or deploying any runtime code.

Features

  • One-command super agentar super-agent run creates a hosted agent and drops you into a chat REPL in seconds.
  • Declarative deployment — Kubernetes-style YAML (ar sa apply -f superagent.yaml) for reproducible, version-controlled agents.
  • Six resource groupsconfig, model, sandbox, tool, skill, super-agent, all following the same ar <group> <action> pattern.
  • Multi-profile config — store multiple sets of credentials in ~/.agentrun/config.json and switch with --profile.
  • Multiple output formatsjson (default), table, yaml, and quiet for shell piping.
  • Agent-friendly — JSON-by-default output, deterministic exit codes, no interactive prompts when stdin isn't a TTY.
  • Rich sandbox primitives — code execution, file system, process management, and CDP/VNC-backed browser automation.
  • Single-file distribution — PyInstaller produces standalone ar / agentrun binaries for Linux, macOS and Windows (x86_64 + arm64).

Installation

Prebuilt binary (recommended)

Download a single self-contained binary from Releases. No Python required.

Linux / macOS (x86_64 or arm64):

curl -fsSL https://raw.githubusercontent.com/Serverless-Devs/agentrun-cli/main/scripts/install.sh | sh

Windows (x86_64, PowerShell):

irm https://raw.githubusercontent.com/Serverless-Devs/agentrun-cli/main/scripts/install.ps1 | iex

Pin a specific version with AGENTRUN_VERSION=v0.1.0 …. Change the install directory with AGENTRUN_INSTALL=…. Both installers verify the SHA256 checksum before placing the binary.

Or download the archive manually from the Releases page — naming scheme:

agentrun-<version>-<os>-<arch>.<ext>
# e.g. agentrun-0.1.0-linux-amd64.tar.gz
#      agentrun-0.1.0-darwin-arm64.tar.gz
#      agentrun-0.1.0-windows-amd64.zip

From PyPI

pip install agentrun-cli

From source

git clone https://github.com/Serverless-Devs/agentrun-cli.git
cd agentrun-cli
make install            # editable install into .venv
make build              # standalone binary → dist/agentrun

Verify

ar --version            # or: agentrun --version

Quickstart

Step 1 — Configure credentials

ar config set access_key_id     LTAI5t...
ar config set access_key_secret ***
ar config set account_id        1234567890
ar config set region            cn-hangzhou

Credentials land in ~/.agentrun/config.json under the default profile. Use --profile staging on any command to target a named profile.

Step 2 — Spin up a super agent and chat

$ ar super-agent run --prompt "You are a Python expert"
Loading model services...
? Select model service: svc-tongyi
? Select model:         qwen-max
Creating super agent: super-agent-tmp-20260420213045 ...
Ready. Type your message (/help for commands).

> Write a quicksort in Python
def quicksort(arr):
    if len(arr) <= 1:
        return arr
    pivot = arr[len(arr) // 2]
    left  = [x for x in arr if x < pivot]
    mid   = [x for x in arr if x == pivot]
    right = [x for x in arr if x > pivot]
    return quicksort(left) + mid + quicksort(right)

> /exit
─────────────────────────────────────────────
Super agent created: super-agent-tmp-20260420213045
Last conversation:  conv-9f8e7d6c-xxx
Resume:  ar sa chat super-agent-tmp-20260420213045
Delete:  ar sa delete super-agent-tmp-20260420213045
─────────────────────────────────────────────

The agent persists after you exit, so you can continue the conversation later with ar sa chat <name> — the CLI remembers the last conversation id locally.

Step 3 — Declarative deployment

Save this to superagent.yaml:

apiVersion: agentrun/v1
kind: SuperAgent
metadata:
  name: my-helper
  description: "My personal assistant"
spec:
  prompt: "You are my helpful assistant"
  model:
    service: svc-tongyi
    name: qwen-max
  tools:
    - mcp-time-sa
  skills: []
  sandboxes: []
  workspaces: []
  subAgents: []

Then deploy it:

ar super-agent apply -f superagent.yaml
# → action: "created"    (first run)
# → action: "updated"    (subsequent runs)

# Chat with it
ar sa chat my-helper

# Single-shot invocation for scripts
ar sa invoke my-helper -m "Plan my day" --text-only

Multi-document YAMLs (--- separated) let you deploy many agents in one call.

Command groups

Group Alias Purpose Docs
config Credentials and named profiles en · zh
model Register external LLM providers as ModelServices en · zh
sandbox sb Sandboxes + files, processes, contexts, templates, browser en · zh
tool MCP and FunctionCall tools en · zh
skill Platform skill packages + local execution en · zh
super-agent sa Quickstart / CRUD / declarative / conversation en · zh

Documentation

Each page walks through installation, authentication, global options, output formats, exit codes and every command option with runnable examples.

License

Apache-2.0 — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentrun_cli-0.1.0rc8.tar.gz (113.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentrun_cli-0.1.0rc8-py3-none-any.whl (52.5 kB view details)

Uploaded Python 3

File details

Details for the file agentrun_cli-0.1.0rc8.tar.gz.

File metadata

  • Download URL: agentrun_cli-0.1.0rc8.tar.gz
  • Upload date:
  • Size: 113.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentrun_cli-0.1.0rc8.tar.gz
Algorithm Hash digest
SHA256 649eb20c4edadc180e2e145df6af4b9a12c08da059e6c50b11b2806f877c61f3
MD5 2f6ed1b0d4615e9badf845bd77bbecc9
BLAKE2b-256 3d0f5949844cd71c7df613fff8055a88364765800880502924cabf7b08936e96

See more details on using hashes here.

File details

Details for the file agentrun_cli-0.1.0rc8-py3-none-any.whl.

File metadata

File hashes

Hashes for agentrun_cli-0.1.0rc8-py3-none-any.whl
Algorithm Hash digest
SHA256 7bfa05f54231bc94782ae0a40ce20477fbf72fd7649d25f8323425c275240c7f
MD5 8b9bbd900e40217db4ca20d09886ea39
BLAKE2b-256 22991f4bd3afe714247772f5ab1977326e894ad96720933d46716c232b14093b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page