.do
Cli

Agents

CLI commands for managing autonomous agents

Agents CLI

Command-line interface for creating, managing, and monitoring autonomous agents.

Installation

pnpm add -g cli.do

Agent Management

Create Agent

# Basic agent
do agent create sales-assistant \
  --role "Sales Development Representative" \
  --capabilities "lead-qualification,email-outreach"

# With configuration file
do agent create sales-assistant --config agent.json

agent.json:

{
  "name": "sales-assistant",
  "role": "Sales Development Representative",
  "capabilities": ["lead-qualification", "email-outreach", "crm-updates"],
  "model": "gpt-5",
  "temperature": 0.7
}

List Agents

# List all agents
do agent list

# Filter by status
do agent list --status active

# Filter by role
do agent list --role "Sales Development Representative"

# JSON output
do agent list --json

Get Agent Details

do agent get sales-assistant

# Show configuration
do agent get sales-assistant --config

# Show performance metrics
do agent get sales-assistant --metrics

Update Agent

# Update capabilities
do agent update sales-assistant \
  --add-capability "meeting-scheduling"

# Update model
do agent update sales-assistant --model gpt-5

# Update system prompt
do agent update sales-assistant \
  --prompt "You are a professional sales assistant..."

Delete Agent

do agent delete sales-assistant

# Force delete (skip confirmation)
do agent delete sales-assistant --force

Task Management

Assign Task

# Basic task
do agent assign sales-assistant qualify-lead \
  --data '{"leadId": "lead-123"}'

# With priority and deadline
do agent assign sales-assistant qualify-lead \
  --data '{"leadId": "lead-123"}' \
  --priority high \
  --deadline "2025-01-01T12:00:00Z"

# From file
do agent assign sales-assistant qualify-lead --file task.json

List Tasks

# All tasks for agent
do agent tasks sales-assistant

# Filter by status
do agent tasks sales-assistant --status pending

# Filter by priority
do agent tasks sales-assistant --priority high

Get Task Status

do agent task get task-123

# Watch task progress
do agent task watch task-123

Cancel Task

do agent task cancel task-123

Lifecycle Operations

Start Agent

do agent start sales-assistant

# With schedule
do agent start sales-assistant --schedule "9-17"

# With concurrency limit
do agent start sales-assistant --concurrency 5

Stop Agent

# Graceful stop
do agent stop sales-assistant

# Force stop
do agent stop sales-assistant --force

Pause/Resume

do agent pause sales-assistant
do agent resume sales-assistant

Restart Agent

do agent restart sales-assistant

Monitoring

Status

do agent status sales-assistant

# Output:
# Status: active
# Current Task: qualify-lead-123
# Tasks Completed: 42
# Tasks In Progress: 3
# Uptime: 1h 30m
# Last Activity: 2 minutes ago

Metrics

# Performance metrics
do agent metrics sales-assistant

# Specific time range
do agent metrics sales-assistant --range 24h

# Export to CSV
do agent metrics sales-assistant --format csv > metrics.csv

Logs

# View logs
do agent logs sales-assistant

# Follow logs (tail -f)
do agent logs sales-assistant --follow

# Filter by level
do agent logs sales-assistant --level error

# Last 100 lines
do agent logs sales-assistant --tail 100

Teams

Create Team

do agent team create sales-team \
  --agents "sdr-agent,ae-agent,cs-agent" \
  --coordinator "team-lead-agent"

Assign Team Task

do agent team assign sales-team close-deal \
  --sdr-agent "qualify-lead" \
  --ae-agent "run-demo" \
  --cs-agent "onboard-customer"

List Teams

do agent team list

# Show team members
do agent team get sales-team

Feedback & Training

Provide Feedback

do agent feedback sales-assistant task-123 \
  --rating 5 \
  --comment "Excellent lead qualification"

Train Agent

# Train from feedback
do agent train sales-assistant --feedback feedback-1,feedback-2

# Train from examples
do agent train sales-assistant --examples examples.jsonl

Tools & Integration

List Tools

do agent tools sales-assistant

Register Tool

do agent tool register search_crm \
  --description "Search CRM for records" \
  --params params.json \
  --handler ./handlers/search-crm.js

Remove Tool

do agent tool remove search_crm

Configuration

Set Context

do agent context set sales-assistant \
  --key "currentCampaign" \
  --value "q1-promo"

Set Approvers

do agent approvers set sales-assistant \
  --add [email protected]

Configure Memory

do agent memory set sales-assistant \
  --key "customer-preferences" \
  --value '{"prefers": "email", "timezone": "PST"}'

Interactive Mode

# Launch interactive agent console
do agent console sales-assistant

# Chat with agent
> qualify lead-123
> what's the status of my tasks?
> show metrics for today

Batch Operations

# Start multiple agents
do agent start --all

# Stop all agents
do agent stop --all

# Deploy agents from manifest
do agent deploy --manifest agents.yaml

Examples

Daily Sales Agent

# Create and configure
do agent create daily-sales \
  --role "Sales Representative" \
  --capabilities "lead-qualification,email-outreach,follow-up" \
  --schedule "9-17" \
  --model gpt-5

# Auto-assign on lead creation
do agent subscribe daily-sales lead.created \
  --action "assign qualify-lead"

# Monitor performance
do agent metrics daily-sales --range 7d

Support Agent with Human Approval

# Create with approval workflow
do agent create support-agent \
  --role "Customer Support" \
  --capabilities "answer-questions,create-ticket,refund" \
  --approval-required "refund" \
  --approvers [email protected]

# Watch for approval requests
do agent approvals watch support-agent

Environment Variables

# Set API key
export DO_API_KEY=your-api-key

# Set default agent
export DO_DEFAULT_AGENT=sales-assistant

# Set output format
export DO_FORMAT=json