Skip to content

Terminal-based agent interaction for AGI desktop automation

Notifications You must be signed in to change notification settings

agi-inc/agi-cli

Repository files navigation

AGI CLI

Terminal-based agent interaction for AGI desktop automation. Control AI agents directly from your command line with a beautiful TUI interface.

Installation

npm install -g agi-cli

Prerequisites

Set your API key:

export AGI_API_KEY=your_api_key
# or
export ANTHROPIC_API_KEY=your_api_key

Usage

# Basic usage
agi "Open calculator and compute 2+2"

# Use a specific model
agi "Find flights from SFO to JFK" --model claude-opus

# Verbose output (shows agent thinking)
agi "Install Node.js" --verbose

# Auto-approve confirmations
agi "Delete old files" --no-confirm

Options

Option Alias Description Default
--model -m Model to use claude-sonnet
--verbose -v Show agent thinking false
--no-confirm Auto-approve confirmations false
--help -h Show help
--version -V Show version

Keyboard Shortcuts

While the agent is running:

Key Action
Space Pause/Resume
Q Stop
Ctrl+C Cancel

Features

  • Real-time event display: See actions, thinking, and status updates as they happen
  • Interactive dialogs: Respond to agent questions and confirmation requests
  • Pause/Resume: Take control when needed
  • Verbose mode: See the agent's reasoning process
  • Multiple models: Choose between Claude Sonnet and Opus

How It Works

The CLI uses the AGI SDK's driver module to spawn and manage the agent binary locally. The agent:

  1. Captures screenshots of your desktop
  2. Analyzes them using Claude
  3. Decides on actions to take
  4. Executes those actions
  5. Repeats until the task is complete

Requirements

  • Node.js 20.4.0 or later
  • macOS, Linux, or Windows
  • AGI API key or Anthropic API key

License

MIT

About

Terminal-based agent interaction for AGI desktop automation

Resources

Stars

Watchers

Forks

Packages

No packages published