# AgentGPT CLI

The **AgentGPT Command-Line Interface (CLI)** is a developer-first toolkit for creating, managing, and executing autonomous AI agents directly from the terminal. Designed for engineers and technical teams, it combines GPT-4’s reasoning with programmable scripting to automate blockchain operations, DeFi strategies, and Web3 workflows via code-centric tooling. With native support for chains like Ethereum, Solana, and Layer 2 networks, the CLI enables scalable, high-frequency automation and integration into CI/CD pipelines.

***

#### **Core Capabilities**

**1. Scriptable Agent Workflows**

* **Terminal-Driven Automation**: Write, test, and deploy agents using YAML or Python scripts.

  ```bash
  agentgpt create-agent --name "payroll-bot" --goal "Distribute 10K USDC monthly via Optimism"  
  ```
* **Batch Execution**: Run multi-step workflows (e.g., token swaps, payrolls, NFT mints) in a single command.

**2. Chain-Agnostic Interoperability**

* **Unified Commands**: Interact with EVM, Cosmos, and Solana chains using standardized syntax.

  ```bash
  agentgpt execute --network ethereum --task "swap 1 ETH to USDC via UniswapV3, max_slippage 0.5%"  
  ```
* **Gas Optimization Flags**: Force transactions to wait for optimal gas (e.g., `--gas-strategy eco`, `--priority high`).

**3. Real-Time Monitoring & Debugging**

* **Terminal Dashboard**: Track transaction statuses, gas fees, and workflow progress in real time.
* **Log Streaming**: Pipe execution logs to external tools (Splunk, Grafana) for auditing.

**4. Developer-First Extensibility**

* **Plugin System**: Extend functionality with community-built modules (e.g., `agentgpt-defi`, `agentgpt-nft`).
* **CI/CD Integration**: Embed agents into GitHub Actions, CircleCI, or Jenkins pipelines.

***

#### **Technical Architecture**

**AI Core**

* **Goal Parser**: Translates CLI commands into executable steps (e.g., `payroll` ➔ fetch balances ➔ convert FX ➔ disburse).
* **Dynamic Scheduler**: Optimizes transaction order/parallelism based on network conditions.

**Blockchain Adapters**

* **RPC Abstraction Layer**: Unified interface for 50+ networks (e.g., Ethereum via Alchemy, Solana via QuickNode).
* **Signer Integration**: Supports MetaMask, Ledger, and AWS KMS for secure key management.

**Script Engine**

* **Workflow Templating**: Prebuilt scripts for common tasks (payrolls, staking, governance).
* **Error Handling**: Auto-retries failed transactions with configurable backoff strategies.

***

#### **Use Cases**

**Enterprise DevOps**

* Schedule recurring cross-chain payrolls via cron jobs:

  ```bash
  agentgpt run ./scripts/polygon-payroll.yml --schedule "0 0 1 * *"  
  ```

**DeFi Developers**

* Execute arbitrage bots across DEXs with latency-critical logic:

  ```bash
  agentgpt monitor --dex uniswap,sushiswap --token ETH/USDC --execute-arb  
  ```

**Protocol Auditors**

* Batch-validate smart contracts and generate compliance reports:

  ```bash
  agentgpt audit ./contracts/ --network avalanche --report-format markdown  
  ```

***

#### **Security & Compliance**

* **Non-Interactive Mode**: Run agents in headless environments without exposing private keys.
* **Encrypted Configs**: Securely store API keys and RPC endpoints with AES-256 encryption.
* **Compliance Checks**: Flag risky addresses pre-execution via `--sanctions-scan`.

***

**Install Now**:

```bash
curl -sSL https://cli.agent-gpt.org/install | bash  
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://agent-gpt.gitbook.io/agent-gpt/agentgpt-produtcs/agentgpt-cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
