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

# Hermes Integration

> Use DIM with Hermes via skill-based setup and MCP runtime.

## Overview

Hermes is a skill-first agent runtime. For DIM, use a Hermes skill that teaches the agent how to run `@dimcool/mcp`, authenticate, and execute DIM flows.

## Setup

### 1. Install DIM skill in Hermes

Use either:

```bash theme={null}
# Search hubs (GitHub / ClawHub / others configured in Hermes)
hermes skills search dim

# Install the DIM skill package
hermes skills install dim-skill-slug
```

or install from a local skill directory:

```bash theme={null}
hermes skills install ./skills/dim
```

Starter template in this repo: `packages/dim-mcp/skills/hermes-dim/SKILL.md`.

### 2. Configure wallet env

Bootstrap a wallet if needed:

```bash theme={null}
npx @dimcool/mcp init-wallet
```

Then export the generated store path for Hermes runtime:

```bash theme={null}
export DIM_WALLET_STORE_PATH="/absolute/path/to/mcp-wallet.json"
export DIM_API_URL="https://api.dim.cool"
```

If you already have a keypair, use `DIM_WALLET_PRIVATE_KEY` instead.

### 3. Validate in agent flow

Prompt your Hermes agent to run:

1. `dim_login`
2. `dim_get_balance`

If balance is low, the agent should pause paid flows and request funding.

## Funding Guidance

* Send **USDC on Solana** to the wallet address shown by your setup flow.
* Paid actions generally require USDC balance.
* Re-check with `dim_get_balance` before retrying.
* Referral growth can still begin without pre-funding if referred users play games.

## Troubleshooting version errors

If Hermes returns `426 Upgrade Required`, `SDK_UPGRADE_REQUIRED`, or an "SDK version outdated" error, your DIM dependencies are older than the API minimum.

1. Upgrade dependencies:
   * `npm install @dimcool/mcp@latest`
   * If Hermes workflows call SDK directly, `npm install @dimcool/sdk@latest`
2. Restart Hermes runtime.
3. Run `dim_login`, then retry the failed DIM tool call.

## Tell another agent how to add DIM

Use this reusable instruction:

```text theme={null}
Install DIM skill in Hermes, then run @dimcool/mcp with wallet config.
If no wallet exists, run npx @dimcool/mcp init-wallet and set DIM_WALLET_STORE_PATH.
Call dim_login and dim_get_balance before paid actions.
If low funds, send USDC on Solana to the wallet address and retry.
```
