# AI Trading Agent

> Source: https://www.archr.bot/docs/ai-agent
> Section: Advanced Features
> Last updated: 2026-07-27

ARCHR includes an optional AI trading assistant that understands natural language. Ask it to analyze tokens, execute trades, check your positions, modify settings, or explain how features work — all through conversation.

## How It Works

The AI agent uses a **BYOK (Bring Your Own Key)** model. You provide your own API key from OpenAI or Anthropic, and ARCHR connects to that provider on your behalf. You pay the LLM provider directly for token usage. ARCHR does not charge for agent usage.

The agent has full access to your account data and bot functionality through approximately **62 native tools** and **13 internal MCP (Model Context Protocol) tools** for on-chain/market data when configured. It can read your positions, execute trades, update settings, analyze tokens, and provide market intelligence.

> Note: These internal MCP tools power the Telegram agent. A **public** ARCHR MCP server for external agents is on the roadmap and not available yet.

## Setup

1. Go to **Settings → 🤖 Agent Mode**
2. Tap **Set API Key**
3. Choose your provider (Anthropic or OpenAI)
4. Paste your API key (the message is auto-deleted for security)
5. Select a model (or keep the recommended default)
6. Toggle Agent Mode ON

### Getting an API Key

**Anthropic (Claude):**
1. Go to [console.anthropic.com](https://console.anthropic.com)
2. Sign up and add a payment method
3. Go to API Keys → Create Key
4. Copy the key (starts with `sk-ant-`)

**OpenAI (GPT):**
1. Go to [platform.openai.com](https://platform.openai.com)
2. Sign up and add a payment method (Settings → Billing)
3. Go to API Keys → Create new secret key
4. Copy the key (starts with `sk-`)

## Supported Models

### Anthropic
| Model | Cost Tier | Notes |
|-------|-----------|-------|
| Claude Sonnet 4.6 | Standard | **Recommended** — best balance of speed and quality |
| Sonnet 4.6 + Thinking | Premium | Extended reasoning for complex analysis |
| Claude Opus 4.7 | Premium | Highest quality, slower |
| Opus 4.7 + Thinking | Ultra | Maximum capability |
| Claude Haiku 4.5 | Budget | Fastest and cheapest |

### OpenAI
| Model | Cost Tier | Notes |
|-------|-----------|-------|
| GPT-5.4 Mini | Budget | **Recommended** — fast and affordable |
| GPT-5.4 | Standard | Smarter, higher quality |
| GPT-5.5 | Ultra | Most capable (higher per-token cost) |

Most conversations cost less than $0.01. Set a monthly budget in your provider's dashboard to control costs.

## What the Agent Can Do

### Token Analysis
- Analyze any token by address or symbol
- Real-time price, market cap, volume, holder analysis
- Security checks (honeypot, freeze/mint authority, wash trading)
- Social presence and community metrics
- Multi-token comparison

### Trading
- Buy tokens by address or symbol
- Sell positions (percentage or full)
- Check current positions and P&L
- View transaction history

### Settings Management
- View and update all trading settings
- Change buy amount, slippage, TP/SL/trailing stop
- Toggle auto-trade, filters, and protections
- Manage signal preferences
- Switch between Basic and Plan mode
- **Auto-buy readiness** — ask "why isn't my auto-buy working?" or "what's my auto-buy status?" for gate/blocker details (same logic as the **🤖 Auto** control panel)

### Wallet Operations
- Check wallet balance and addresses
- Switch active wallet
- Rename wallets, toggle auto-buy per wallet
- Set per-wallet buy amounts
- Toggle Multi-Wallet Buy mode

### Market Intelligence
- Trending tokens analysis
- Market temperature (bull/bear/neutral)
- Signal performance history
- Meta narratives and sector trends
- Technical indicators (when available)

### Copy Trading
- View tracked wallets and their activity
- Update tracked wallet settings
- Check copy trading status

### Knowledge
- Explain any bot feature or setting
- Answer "how does X work?" questions
- Provide setup guidance and best practices

## Safety Guardrails

The agent has built-in safety limits to protect your funds:

- **Trade confirmation**: Before executing any trade, the agent shows you the details and asks for confirmation via inline buttons. You must tap ✅ Confirm to execute.
- **Auto-Execute mode**: When enabled (Settings → Agent Mode → Auto-Execute), trades execute immediately without confirmation. Use with caution.
- **Daily auto-execute threshold**: After 25 agent-initiated trades in a day, ARCHR forces confirmation mode even if Auto-Execute is enabled (resets at midnight UTC).
- **Cooldown**: 30-second minimum between consecutive trades.
- **Read-only by default**: The agent cannot generate, import, or remove wallets, and cannot reveal private keys. Use the Wallet menu for these operations.

## Using the Agent

Once Agent Mode is enabled, simply type a message in the chat. The agent understands natural language:

- "What's the price of BONK?"
- "Buy 0.5 SOL of So11...address"
- "Sell 50% of my WIF position"
- "What are my current settings?"
- "Set my trailing stop to 20%"
- "Show me what's trending"
- "Explain how trading plans work"

### Tips for Best Results

- **Be specific**: "Buy 0.1 SOL of [address]" works better than "buy some tokens"
- **Use token addresses** when possible for unambiguous identification
- **Check your settings first**: Ask "show my settings" to verify before trading
- **Start with analysis**: Ask the agent to analyze a token before buying
- **Use confirmation mode**: Keep Auto-Execute OFF while learning

## Commands and Agent Together

The agent works alongside regular bot commands and buttons. You can:
- Use /buy to trade, then ask the agent about your positions
- Configure settings via menus, then ask the agent to verify
- Mix and match — there's no conflict between commands and agent messages

## Cost Management

- Each message exchange costs tokens based on your chosen model
- Budget models (Haiku 4.5, GPT-5.4 Mini) keep costs minimal
- Set spending limits in your provider's dashboard
- The agent automatically manages context to minimize token usage
- Your API key is encrypted with AES-256 and never stored in plain text
