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

# Helius for Agents

> Everything AI agents need to build on Solana with Helius: programmatic signup, API access, SDKs, MCP integration, and recommended workflows.

Helius provides first-class support for AI agents building on Solana. From programmatic account creation to real-time data streaming, agents can access the full power of Helius without any manual intervention.

* [Helius MCP](/agents/mcp) — 60+ tools for querying the blockchain, sending transactions, and more
* [Claude Code Plugin](/agents/claude-code-plugin) — One install: MCP servers + skills + reference files
* [Skills](/agents/skills/overview) — Expert instruction sets for Claude: [Build](/agents/skills/build), [Phantom](/agents/skills/phantom), [DFlow](/agents/skills/dflow), [SVM](/agents/skills/svm)
* [TypeScript SDK](/agents/typescript-sdk) — Type-safe methods for all Helius APIs
* [Rust SDK](/agents/rust-sdk) — High-performance Rust SDK for Helius APIs
* [Helius CLI](/agents/cli) — Account management and shell scripting

<Note>
  A machine-readable version of this section is available at [agents/llms.txt](https://www.helius.dev/docs/agents/llms.txt) for AI agent consumption.
</Note>

## MCP vs CLI

The [Helius MCP server](/agents/mcp) is the recommended way for AI agents to interact with Helius. It provides 60+ tools that give AI direct, structured access to Solana — no shell commands, no output parsing, no manual API calls.

|                   | [MCP](/agents/mcp)                                                                                  | [CLI](/agents/cli)                                                           |
| ----------------- | --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| **Best for**      | AI agents in Claude Code, Cursor, Claude Desktop, and any MCP-compatible tool                       | Shell scripts, CI/CD pipelines, terminal workflows                           |
| **Interface**     | Structured tool calls with typed inputs/outputs                                                     | Command-line with `--json` output                                            |
| **Capabilities**  | 60+ tools: blockchain queries, transactions, webhooks, streaming, wallet analysis, docs, and signup | 95+ commands: same capabilities plus config management and interactive flows |
| **Account setup** | Built-in: `generateKeypair` → `agenticSignup` — no external tools needed                            | `helius keygen` → `helius signup`                                            |
| **When to use**   | Default choice for any AI agent                                                                     | When you need shell-level automation or are not using an MCP-compatible tool |

<Tip>
  **Start with MCP.** If your AI tool supports MCP (Claude Code, Cursor, Claude Desktop, etc.), use the [MCP server](/agents/mcp) or the [Claude Code Plugin](/agents/claude-code-plugin). The CLI is useful for shell scripting and CI/CD, but for AI-driven workflows the MCP provides a more seamless experience — the AI calls tools directly rather than spawning shell commands and parsing output.
</Tip>

## Quick Start: Agent Signup

Agents can create a Helius account and get an API key in four steps using the [Helius CLI](/agents/cli):

```bash theme={"system"}
npm install -g helius-cli    # Install CLI
helius keygen                 # Generate keypair
# Fund wallet with 1 USDC + ~0.001 SOL
helius signup --json          # Get API key (JSON output)
```

On success, your agent receives an API key, RPC endpoints, and 1,000,000 credits. See the [full CLI guide](/agents/cli) for details.

## Authentication

All Helius API requests require an API key passed as a query parameter:

```
?api-key=YOUR_API_KEY
```

Append this to any RPC or API endpoint. For example: `https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY`

Get an API key from the [Helius Dashboard](https://dashboard.helius.dev) or programmatically via the [Helius CLI](/agents/cli).

<Tip>
  **Use Gatekeeper for lower latency** — [Gatekeeper (Beta)](/gatekeeper/overview) removes Cloudflare from the critical path, reducing response times by tens to hundreds of milliseconds. Same API key, same methods — just swap the endpoint:

  ```
  https://beta.helius-rpc.com/?api-key=YOUR_API_KEY
  wss://beta.helius-rpc.com/?api-key=YOUR_API_KEY
  ```

  Supports all RPC, DAS, WebSocket, ZK Compression, Priority Fee, and Enhanced Transaction methods. See the [migration guide](/gatekeeper/migration-guide) for details.
</Tip>

## Helius-Specific API Guidance

Use these Helius-optimized APIs instead of chaining standard Solana RPC methods:

| Instead of...                                | Use this                                                                                                       | Why                                                                  |
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `getSignaturesForAddress` + `getTransaction` | [`getTransactionsForAddress`](/rpc/gettransactionsforaddress)                                                  | Single call returns full transaction history with token account data |
| `getTokenAccountsByOwner`                    | [`getAssetsByOwner`](/api-reference/das/getassetsbyowner) (DAS API)                                            | Returns rich metadata, not just raw accounts                         |
| `getRecentPrioritizationFees`                | [`getPriorityFeeEstimate`](/api-reference/priority-fee/getpriorityfeeestimate)                                 | Pre-calculated optimal fees, no manual computation                   |
| `getSignaturesForAddress` (for cNFTs)        | [`getSignaturesForAsset`](/api-reference/das/getsignaturesforasset) (DAS API)                                  | Standard RPC doesn't work for compressed NFTs                        |
| `getProgramAccounts` (for NFT search)        | [`searchAssets`](/api-reference/das/searchassets) or [`getAssetsByGroup`](/api-reference/das/getassetsbygroup) | Faster, cheaper, indexed data                                        |
| Polling for real-time data                   | [Enhanced WebSockets](/enhanced-websockets) or [LaserStream gRPC](/laserstream)                                | Lower latency, more efficient                                        |
| Standard `sendTransaction`                   | [Helius Sender](/sending-transactions/sender)                                                                  | Dual routing (validators + Jito), higher landing rates               |

## Recommended Workflows

| Building...         | Helius Products to Use                                                                                                                                                                                         |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Trading bot         | [Gatekeeper](/gatekeeper/overview) (lowest latency RPC) + [Sender](/sending-transactions/sender) (fast tx submission) + [Priority Fee API](/priority-fee-api) + [LaserStream](/laserstream) (real-time prices) |
| Wallet app          | [DAS API](/das-api) (`getAssetsByOwner`) + [`getTransactionsForAddress`](/rpc/gettransactionsforaddress) (complete history)                                                                                    |
| NFT marketplace     | [DAS API](/das-api) (`searchAssets`, `getAssetsByGroup`) + [Webhooks](/webhooks) (track sales/listings)                                                                                                        |
| Token sniper        | [Gatekeeper](/gatekeeper/overview) (edge-routed RPC) + [LaserStream gRPC](/laserstream) (lowest latency) + [Sender](/sending-transactions/sender) (staked connections)                                         |
| Portfolio tracker   | [DAS API](/das-api) (`getAssetsByOwner` with `showFungible`) + [Enhanced Transactions](/enhanced-transactions/overview)                                                                                        |
| Wallet monitor      | [Enhanced WebSockets](/enhanced-websockets) or [Webhooks](/webhooks) for real-time notifications                                                                                                               |
| Analytics dashboard | [Enhanced Transactions API](/enhanced-transactions/overview) + [`getTransactionsForAddress`](/rpc/gettransactionsforaddress)                                                                                   |
| Airdrop tool        | [AirShip](/airship/getting-started) (95% cheaper with ZK compression)                                                                                                                                          |

## Rate Limits Quick Reference

Rate limits depend on your [plan](/billing/plans). Agents start on the Agent tier with 1,000,000 credits. The Agent tier requires a \$1 payment to prevent abuse.

| Plan         | Price      | Monthly Credits | RPC Rate Limit | DAS & Enhanced APIs |
| ------------ | ---------- | --------------- | -------------- | ------------------- |
| Agent        | \$1 signup | 1M              | 10 req/s       | 2 req/s             |
| Developer    | \$49/mo    | 10M             | 50 req/s       | 10 req/s            |
| Business     | \$499/mo   | 100M            | 200 req/s      | 50 req/s            |
| Professional | \$999/mo   | 200M            | 500 req/s      | 100 req/s           |

For detailed rate limits per API, see [Rate Limits](/billing/rate-limits).

## Credits Per API Call

| API                         | Credits | Notes                             |
| --------------------------- | ------- | --------------------------------- |
| Standard RPC calls          | 1       | Most Solana RPC methods           |
| `getProgramAccounts`        | 10      | Use DAS API instead when possible |
| DAS API                     | 10      | All DAS endpoints                 |
| Enhanced Transactions       | 100     | Parsed transaction data           |
| `getTransactionsForAddress` | 100     | Developer+ plans only             |
| Wallet API                  | 100     | All Wallet API endpoints          |
| Priority Fee API            | 1       | Fee estimation                    |
| Sender                      | 0       | Free on all plans                 |
| Webhook events              | 1       | Per event delivered               |
| Webhook management          | 100     | Create, edit, delete              |

For the full breakdown, see [Credits](/billing/credits).

## Retries and Error Handling

### HTTP Status Codes

| Code | Meaning      | Action                         |
| ---- | ------------ | ------------------------------ |
| 200  | Success      | Process response               |
| 400  | Bad request  | Fix request parameters         |
| 401  | Unauthorized | Check API key                  |
| 429  | Rate limited | Back off and retry             |
| 5xx  | Server error | Retry with exponential backoff |

### Retry Pattern

```typescript theme={"system"}
async function heliusRequest(url: string, data: object, maxRetries = 3) {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    const response = await fetch(url, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify(data),
    });

    if (response.ok) return response.json();

    if (response.status === 429) {
      const retryAfter = response.headers.get('Retry-After');
      const delay = retryAfter ? parseInt(retryAfter) * 1000 : Math.pow(2, attempt) * 1000;
      await new Promise(resolve => setTimeout(resolve, delay));
      continue;
    }

    if (response.status >= 500) {
      await new Promise(resolve => setTimeout(resolve, Math.pow(2, attempt) * 1000));
      continue;
    }

    throw new Error(`Request failed: ${response.status} ${await response.text()}`);
  }
  throw new Error('Max retries exceeded');
}
```

### Monitor Credit Usage

```bash theme={"system"}
helius usage --json
```

## Quick Reference

* **Mainnet RPC**: `https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY`
* **Mainnet RPC (Gatekeeper Beta)**: `https://beta.helius-rpc.com/?api-key=YOUR_API_KEY`
* **Devnet RPC**: `https://devnet.helius-rpc.com/?api-key=YOUR_API_KEY`
* **Mainnet WSS**: `wss://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY`
* **Mainnet WSS (Gatekeeper Beta)**: `wss://beta.helius-rpc.com/?api-key=YOUR_API_KEY`
* **Devnet WSS**: `wss://devnet.helius-rpc.com/?api-key=YOUR_API_KEY`
* **Sender endpoint**: `https://sender.helius-rpc.com/fast`
* **MCP server**: `https://www.helius.dev/docs/mcp`
* **Dashboard**: [dashboard.helius.dev](https://dashboard.helius.dev)
* **Status**: [helius.statuspage.io](https://helius.statuspage.io)
