agentleFS
helius-labshelius-labs/core-ai/AGENTS.md

core-ai

AGENTS.md30 starsChanged 12 days agoMITView on GitHub

This file is the Layer A harness for Codex CLI and other OpenAI-compatible agents. Skills in .agents/skills/ provide the domain expertise (Layer B). This monorepo contains Helius developer tools for building on Solana: The Helius MCP server provides live blockchain access through 11 public tools total: 10 routed domain tools plus expandResult. Configure it as an MCP tool source: This works with any MCP-compatible client. Use a domain tool such as heliusWallet, heliusAsset, or heliusStreaming plus action: "getBalance", action: "getAssetsByOwner",…

  • Reads credentials
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository10 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

24 rules. About 0 are common, 4 are distinctive, and 20 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 20

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Run with --read-only (or HELIUS_MCP_READ_ONLY=1) for a read-only server: 10 tools, no heliusWrite, and no action that changes state.

    line 75
  2. Very specific:

    Never commit API keys to git — use HELIUS_API_KEY environment variable

    line 103
  3. Very specific:

    Always use Orb (https://orbmarkets.io) for transaction and account links

    line 107
  4. Very specific:

    Use heliusWallet + getBalance (1 credit) over heliusWallet + getWalletBalances (100 credits) when only SOL balance is needed

    line 115
  5. Very specific:

    Use heliusWallet + getTokenBalances (10 credits) over heliusWallet + getWalletBalances when you don't need USD values

    line 116
  6. Very specific:

    Use heliusKnowledge + lookupHeliusDocs with the section parameter for targeted lookups — full docs can be 10,000+ tokens

    line 117
  7. Very specific:

    Always use Helius Sender endpoints — never raw sendTransaction to standard RPC

    line 125
  8. Very specific:

    Always include skipPreflight: true when using Sender

    line 126
  9. Distinctive:

    Always include a Jito tip (minimum 0.0002 SOL) and priority fee

    line 128
  10. Very specific:

    Use heliusChain + getPriorityFeeEstimate to get fee levels — never hardcode fees

    line 129
  11. Very specific:

    Use heliusChain + simulateTransaction to dry-run a transaction before sending — checks success/failure, compute units, and logs without …

    line 130
  12. Very specific:

    Use heliusChain + simulateBundle to dry-run a Jito bundle of up to 5 transactions, and getBundleStatuses to check whether sent bundles …

    line 131
  13. Very specific:

    Use heliusStreaming + describeProgram before building a Parsed Streams filter — it returns the exact instruction and account role names the …

    line 134
  14. Very specific:

    Use heliusStreaming + preconfSubscribe for the earliest transaction signal (before shredding) and preprocessedSubscribe for broad …

    line 135
  15. Very specific:

    Use heliusTransaction + parseTransactions over raw RPC for human-readable transaction data

    line 136
  16. Very specific:

    Use heliusAsset + getAssetsByOwner with showFungible: true for both NFTs and fungible tokens

    line 137
  17. Very specific:

    Use heliusAsset + searchAssets for multi-criteria queries instead of client-side filtering

    line 138
  18. Very specific:

    Use heliusKnowledge + troubleshootError with the error code before manual diagnosis

    line 141
  19. Very specific:

    Use heliusKnowledge + getRateLimitInfo or getHeliusCreditsInfo — never guess at credit costs

    line 142
  20. Distinctive:

    Use MCP tools for live blockchain data — never hardcode or mock chain state

    line 147
  21. Distinctive:

    Read reference files before writing code — they contain product-specific patterns and pitfalls

    line 148
  22. Distinctive:

    Run tests and verify outputs after making changes

    line 149
  23. Very specific:

    Use appropriate commitment levels (confirmed for reads, finalized for critical operations)

    line 151
  24. Very specific:

    Do not edit these directly — modify the canonical source in helius-skills/ and re-run the compiler.

    line 160

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Core AI — Agent Instructions

This file is the Layer A harness for Codex CLI and other OpenAI-compatible agents. Skills in .agents/skills/ provide the domain expertise (Layer B).

Repository Overview

This monorepo contains Helius developer tools for building on Solana:

PackageWhat it does
helius-mcp/MCP server (npx helius-mcp@latest) — exposes 11 public tools total: 10 routed domain tools plus expandResult
helius-skills/Canonical skill source — SKILL.md + reference files for each domain
helius-plugin/Claude Code plugin — bundles skills + auto-starts MCP server
helius-cli/CLI for account setup, blockchain queries, and staking (npx helius-cli@latest)

MCP Server Setup

The Helius MCP server provides live blockchain access through 11 public tools total: 10 routed domain tools plus expandResult. Configure it as an MCP tool source:

npx helius-mcp@latest

This works with any MCP-compatible client. Use a domain tool such as heliusWallet, heliusAsset, or heliusStreaming plus action: "getBalance", action: "getAssetsByOwner", or action: "createWebhook" to call a specific Helius action. Use expandResult for summary-first follow-ups.

For Codex, run codex mcp add helius -- npx helius-mcp@latest or add to .codex/config.toml (or ~/.codex/config.toml for global):

[mcp_servers.helius]
command = "npx"
args = ["helius-mcp@latest"]

For other MCP clients, add to your project's .mcp.json:

{
  "mcpServers": {
    "helius": {
      "command": "npx",
      "args": ["helius-mcp@latest"]
    }
  }
}

API Key Setup

Most tools require a Helius API key. Three paths:

Path A — Existing key: Set the HELIUS_API_KEY environment variable, or call the setHeliusApiKey MCP tool.

Path B — Signup: Call generateKeypair → signup with mode: "link" (returns a hosted paymentUrl the user opens in a browser) → after payment, signup with mode: "resume". Or mode: "autopay" to pay USDC from the local keypair (wallet must hold ~0.001 SOL + the plan amount in USDC). API key is configured automatically.

Path C — CLI: npx helius-cli@latest keygen → npx helius-cli@latest signup --plan agent --email ... --first-name ... --last-name ... (link) → user pays in browser → npx helius-cli@latest signup --resume. Or --pay to autopay.

Get keys from https://dashboard.helius.dev.

Public Tool Surface

Helius MCP exposes 11 public tools total:

  • Routed domain tools: heliusAccount, heliusWallet, heliusAsset, heliusTransaction, heliusChain, heliusStreaming, heliusKnowledge, heliusWrite, heliusCompression, heliusPrivacy
  • Expansion tool: expandResult

The routed domain tools take a Helius action name in action. Example:

  • heliusWallet + action: "getBalance"
  • heliusKnowledge + action: "getRateLimitInfo"
  • heliusStreaming + action: "createWebhook"

Heavy responses are summary-first. Use expandResult({ resultId: "..." }) to fetch a full section, range, page, or continuation on demand.

Run with --read-only (or HELIUS_MCP_READ_ONLY=1) for a read-only server: 10 tools, no heliusWrite, and no action that changes state. See helius-mcp/README.md.

Skills

Skills are in .agents/skills/. Each provides expert routing, rules, and reference docs for a domain:

SkillDirectoryWhen to use
Helius.agents/skills/helius/Building Solana apps with Helius infrastructure — transactions, DAS API, WebSockets, Laserstream, webhooks, wallet analysis
Helius DFlow.agents/skills/helius-dflow/Trading apps combining DFlow (spot swaps, prediction markets, Proof KYC) with Helius
Helius Phantom.agents/skills/helius-phantom/Frontend Solana apps with Phantom wallet + Helius — React, React Native, vanilla JS
SVM.agents/skills/svm/Solana protocol internals — SVM engine, account model, consensus, validators, token extensions

Each skill has:

  • SKILL.md — routing logic, rules, and domain expertise
  • references/ — deep reference docs for specific products/APIs
  • prompts/ — pre-formatted prompt variants for OpenAI API and Claude API

Read the SKILL.md before implementing — it tells you which reference files to read and which MCP tools to use for each type of task.

Coding Conventions

SDK Usage

  • TypeScript: import { createHelius } from "helius-sdk" → const helius = createHelius({ apiKey: "apiKey" })
  • Rust: use helius::Helius → Helius::new("apiKey", Cluster::MainnetBeta)?
  • For @solana/kit integration, use helius.raw for the underlying Rpc client

Environment Variables

  • Never commit API keys to git — use HELIUS_API_KEY environment variable
  • Store keys in .env or .env.local (for Next.js, never NEXT_PUBLIC_)

Explorer Links

  • Always use Orb (https://orbmarkets.io) for transaction and account links
  • Transaction: https://orbmarkets.io/tx/{signature}
  • Account: https://orbmarkets.io/address/{address}
  • Token: https://orbmarkets.io/token/{token}

MCP Tool Usage Rules

Prefer Specific Routed Actions

  • Use heliusWallet + getBalance (1 credit) over heliusWallet + getWalletBalances (100 credits) when only SOL balance is needed
  • Use heliusWallet + getTokenBalances (10 credits) over heliusWallet + getWalletBalances when you don't need USD values
  • Use heliusKnowledge + lookupHeliusDocs with the section parameter for targeted lookups — full docs can be 10,000+ tokens

Use Batch Endpoints

  • heliusAsset + getAsset accepts an ids array for batch lookups — one call instead of N
  • heliusAsset + getAssetProofBatch for multiple compressed NFT proofs
  • heliusChain + getAccountInfo accepts an addresses array for batch account lookups

Transaction Sending

  • Always use Helius Sender endpoints — never raw sendTransaction to standard RPC
  • Always include skipPreflight: true when using Sender
  • Always include maxRetries: 0 when using Sender
  • Always include a Jito tip (minimum 0.0002 SOL) and priority fee
  • Use heliusChain + getPriorityFeeEstimate to get fee levels — never hardcode fees
  • Use heliusChain + simulateTransaction to dry-run a transaction before sending — checks success/failure, compute units, and logs without submitting on-chain
  • Use heliusChain + simulateBundle to dry-run a Jito bundle of up to 5 transactions, and getBundleStatuses to check whether sent bundles landed

Data Queries

  • Use heliusStreaming + describeProgram before building a Parsed Streams filter — it returns the exact instruction and account role names the filter must use — then parsedTransactionSubscribe to generate the subscription and SDK code
  • Use heliusStreaming + preconfSubscribe for the earliest transaction signal (before shredding) and preprocessedSubscribe for broad pre-execution coverage; both generate a subscription and code, and neither opens a connection
  • Use heliusTransaction + parseTransactions over raw RPC for human-readable transaction data
  • Use heliusAsset + getAssetsByOwner with showFungible: true for both NFTs and fungible tokens
  • Use heliusAsset + searchAssets for multi-criteria queries instead of client-side filtering

Errors and Docs

  • Use heliusKnowledge + troubleshootError with the error code before manual diagnosis
  • Use heliusKnowledge + getRateLimitInfo or getHeliusCreditsInfo — never guess at credit costs
  • For pricing questions, start with heliusAccount + getHeliusPlanInfo — not heliusKnowledge + lookupHeliusDocs

Agent Behavior

  • Use MCP tools for live blockchain data — never hardcode or mock chain state
  • Read reference files before writing code — they contain product-specific patterns and pitfalls
  • Run tests and verify outputs after making changes
  • Handle rate limits with exponential backoff
  • Use appropriate commitment levels (confirmed for reads, finalized for critical operations)

Generated Content

The following directories are generated by npx tsx scripts/compile-skills.ts from canonical sources in helius-skills/:

  • .agents/skills/ — Codex-native skills + prompt variants
  • helius-mcp/system-prompts/ — npm-shipped prompt copies

Do not edit these directly — modify the canonical source in helius-skills/ and re-run the compiler.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.