> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiusd.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Core & Pro

> Two integration paths for AI agents — choose the level of control you need.

## Overview

AIUSD provides two official skills for integrating trading capabilities into AI agents:

<CardGroup cols={2}>
  <Card title="AIUSD Core" icon="bolt">
    **Structured CLI tools**

    Your agent's LLM calls trading commands directly via MCP. You control the reasoning and orchestration.

    No platform inference cost.
  </Card>

  <Card title="AIUSD Pro" icon="comments">
    **Managed AI agent**

    Delegates to a backend agent that handles reasoning, tool selection, and multi-step execution.

    Natural language in, results out.
  </Card>
</CardGroup>

## Which Should I Use?

|                      | Core                                      | Pro                                    |
| -------------------- | ----------------------------------------- | -------------------------------------- |
| **How it works**     | Agent calls CLI/MCP tools directly        | Messages sent to managed backend agent |
| **Reasoning**        | Client-side (your agent's LLM)            | Server-side (AIUSD backend)            |
| **Interface**        | Structured commands                       | Natural language                       |
| **Multi-step flows** | Agent manages state                       | Backend maintains session context      |
| **Inference cost**   | None — bring your own LLM                 | Included                               |
| **Best for**         | Developers building custom agents         | End users and turnkey integrations     |
| **Trade-off**        | More control, requires capable host agent | Easier setup, less granular control    |

<Tip>
  **Not sure?** Start with **AIUSD Pro** for the fastest setup. Switch to **AIUSD Core** when you need granular control over execution logic.
</Tip>

***

## AIUSD Core

Structured CLI tools and MCP integration. Your agent invokes trading commands and handles orchestration.

### Installation

<Tabs>
  <Tab title="Claude Code / Codex / Cursor">
    ```bash theme={null}
    npx skills add galpha-ai/aiusd-core -y -g
    ```
  </Tab>

  <Tab title="OpenClaw">
    Drag & drop the [.skill file](https://github.com/galpha-ai/aiusd-core/releases/latest/download/aiusd-core.skill) into your OpenClaw chat, or:

    ```bash theme={null}
    openclaw skill install aiusd-core.skill
    ```
  </Tab>

  <Tab title="npm">
    ```bash theme={null}
    npm install -g aiusd-core
    ```

    This registers `aiusd-core` globally so you can use `aiusd-core <command>` directly.
  </Tab>

  <Tab title="Manual">
    ```bash theme={null}
    git clone https://github.com/galpha-ai/aiusd-core.git
    cd aiusd-core && npm install && npm run build
    ```
  </Tab>
</Tabs>

### Authentication

```bash theme={null}
# Browser login (recommended)
aiusd-core login --browser

# Create new account
aiusd-core login --new-wallet

# Switch accounts
aiusd-core logout
aiusd-core login --browser
```

### CLI Usage

```bash theme={null}
# Check balances
aiusd-core balances

# Get command reference for a domain
aiusd-core guide spot

# Execute trades
aiusd-core spot buy -b SOL -a 100
aiusd-core perp long --asset ETH --size 0.1 --leverage 10
```

### Command Reference

| Domain                 | Commands                                                                                                                                                                                                                     |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Account**            | `aiusd-core balances`, `aiusd-core accounts`, `aiusd-core transactions`, `aiusd-core get-deposit-address`                                                                                                                    |
| **Spot**               | `aiusd-core spot buy -b SOL -a 100`, `aiusd-core spot sell -b ETH -a all`                                                                                                                                                    |
| **Perpetuals**         | `aiusd-core perp long --asset ETH --size 0.1 --leverage 10`, `aiusd-core perp close --asset ETH`, `aiusd-core perp deposit --amount 100`, `aiusd-core perp withdraw --amount 50`                                             |
| **HyperLiquid Spot**   | `aiusd-core hl-spot buy --coin HYPE --amount 100`, `aiusd-core hl-spot sell --coin PURR --amount 50`                                                                                                                         |
| **Prediction Markets** | `aiusd-core pm buy --market "bitcoin-100k" --outcome Yes --amount 10`, `aiusd-core pm sell`, `aiusd-core pm positions`, `aiusd-core pm orders`, `aiusd-core pm search -q "election"`, `aiusd-core pm cancel --order-id <id>` |
| **Monitoring**         | `aiusd-core monitor add --handle @elonmusk --budget 100`, `aiusd-core monitor list`, `aiusd-core monitor cancel --order-id <id>`                                                                                             |
| **Market Data**        | `aiusd-core market hot-tokens`                                                                                                                                                                                               |
| **Staking**            | `aiusd-core call genalpha_stake_aiusd -p '{"amount":"100"}'`, `aiusd-core call genalpha_unstake_aiusd -p '{"amount":"50"}'`                                                                                                  |

Run `aiusd-core guide <domain>` before executing commands to get the latest parameter reference.

**Source:** [github.com/galpha-ai/aiusd-core](https://github.com/galpha-ai/aiusd-core)

***

## AIUSD Pro

Natural language interface to a managed backend agent. Send messages in plain language — the agent handles reasoning, execution, and transaction confirmation.

### Installation

<Tabs>
  <Tab title="Claude Code / Codex / Cursor">
    ```bash theme={null}
    npx skills add galpha-ai/aiusd-pro -y -g
    ```
  </Tab>

  <Tab title="OpenClaw">
    Drag & drop the [.skill file](https://github.com/galpha-ai/aiusd-pro/releases/latest/download/aiusd-pro.skill) into your OpenClaw chat, or:

    ```bash theme={null}
    openclaw skill install aiusd-pro.skill
    ```
  </Tab>

  <Tab title="npm">
    ```bash theme={null}
    npm install -g aiusd-pro
    ```

    This registers `aiusd-pro` globally.
  </Tab>

  <Tab title="Manual">
    ```bash theme={null}
    git clone https://github.com/galpha-ai/aiusd-pro.git
    cd aiusd-pro && npm install && npm run build
    ```
  </Tab>
</Tabs>

### Authentication

```bash theme={null}
# Browser login (recommended)
aiusd-pro login --browser

# Create new account
aiusd-pro login --new-wallet

# Switch accounts
aiusd-pro logout
aiusd-pro login --browser
```

### Usage

```bash theme={null}
aiusd-pro send "What are my balances?"
aiusd-pro send "Buy $100 of SOL"
aiusd-pro send "Long ETH 10x with $500"
```

### How It Works

```
You send a message
       ↓
Backend agent processes intent
       ↓
Agent streams response via WebSocket
       ↓
CLI auto-polls transaction status
       ↓
Session maintained for follow-ups
```

1. **Send** — your message is posted to the AIUSD backend agent
2. **Reason** — the agent selects tools, plans execution, and handles multi-step logic
3. **Execute** — trades are placed and transactions confirmed automatically
4. **Respond** — results stream back in natural language

### What You Can Ask

| Domain           | Examples                                                     |
| ---------------- | ------------------------------------------------------------ |
| **Spot Trading** | "Buy \$100 of SOL", "Sell all my ETH", "Swap TRUMP for USDC" |
| **Perpetuals**   | "Long ETH 10x", "Short BTC at \$70k", "Close my position"    |
| **Account**      | "What's my balance?", "Show my deposit addresses"            |
| **Staking**      | "Stake 500 AIUSD", "Unstake my AIUSD"                        |
| **Market Data**  | "What's trending?", "Show xStock prices"                     |

### Session Management

```bash theme={null}
aiusd-pro session new      # Start a new conversation
aiusd-pro session list     # List sessions
aiusd-pro session reset    # Reset current session
aiusd-pro cancel           # Cancel active operation
```

**Source:** [github.com/galpha-ai/aiusd-pro](https://github.com/galpha-ai/aiusd-pro)

***

## Supported Platforms

Both skills support the same platforms:

| Platform           | Install                                            |
| ------------------ | -------------------------------------------------- |
| **Claude Code**    | `npx skills add` or symlink to `~/.claude/skills/` |
| **Codex**          | `npx skills add` or symlink to `~/.codex/skills/`  |
| **Cursor**         | `npx skills add` or symlink to `.cursor/skills/`   |
| **OpenClaw**       | `.skill` file or symlink to `~/.openclaw/skills/`  |
| **GitHub Copilot** | Symlink to `.github/skills/`                       |

Both skills require **Node.js >= 18.0.0**.

## Security

<AccordionGroup>
  <Accordion title="Local-First Authentication">
    Authentication tokens stored locally on your device in `~/.aiusd/`. No credentials sent to third parties.
  </Accordion>

  <Accordion title="Secure Storage">
    Token files written with restrictive permissions (0600). Wallet mnemonic stored separately.
  </Accordion>

  <Accordion title="Open Source">
    All skill code is transparent and auditable on GitHub.
  </Accordion>
</AccordionGroup>

## Troubleshooting

### Authentication Issues

```bash theme={null}
# Logout and re-login
aiusd-core logout              # or aiusd-pro logout
aiusd-core login --browser     # or aiusd-pro login --browser
```

If browser login fails, try creating a new account with `--new-wallet`.

### Skill Not Loading

```bash theme={null}
# Check installation
ls ~/.claude/skills/aiusd-core
ls ~/.claude/skills/aiusd-pro

# Reinstall
npx skills add galpha-ai/aiusd-core -y -g
npx skills add galpha-ai/aiusd-pro -y -g
```
