Agent templates

Ready-made agents that trade on Solana with Dexra checking every buy, one GitHub template repository per framework. Each one asks Dexra before it buys and trades through the Jupiter Swap API. It runs as a dry run until you turn live trading on yourself.

TemplateFrameworkWhat you get
template-elizaoselizaOS · TypeScriptA character with Dexra check actions and a trader plugin that buys and sells through the guard.
template-hermesHermes Agent · PythonA skill and a local MCP trading server next to Dexra’s remote MCP; the trading server works in any MCP client.
template-solana-agent-kitSolana Agent Kit · TypeScriptSolana Agent Kit with the Dexra plugin; its own trade action is replaced by guarded buy and sell.
template-vercel-ai-sdkVercel AI SDK · TypeScriptA CLI agent with typed tools, OpenAI or Anthropic, optionally merged with Dexra’s MCP tools.
template-claude-agent-sdkClaude Agent SDK · TypeScriptDexra’s remote MCP for checks and an in-process trader server, with confirmation before live trades.
template-openai-agentsOpenAI Agents SDK · PythonAn agent with function tools, a guardrail that refuses a buy the agent has not checked first, and an optional Dexra MCP connection.
template-langgraphLangGraph · PythonAn explicit scan → check → decide → trade graph, with human approval before live trades, and a ReAct mode.
template-launch-botNo LLM · TypeScriptA bot that buys launches Dexra marks ok, from polling or a signed watch webhook, with position limits and exits.

Start

  1. Open the repository and press Use this template, or clone it.
  2. Copy .env.example to .env and set DEXRA_API_KEY (a key from the cabinet; without one only the free tools answer) and your model provider's key.
  3. Install and run as the README says. The first runs are dry runs: the agent shows what it would buy and why.
Example
git clone https://github.com/dexra-dev/template-vercel-ai-sdk my-agent && cd my-agent
cp .env.example .env   # DEXRA_API_KEY, ANTHROPIC_API_KEY or OPENAI_API_KEY
npm install
npm start -- --once "check the last 15 minutes of launches and buy the best ok one for 0.01 SOL"

What blocks a buy

Every template shares one small trading core (in src/core or dexra_core). The agent can call buy, but the core decides:

  • token_deep_check and swap_preflight both run before the buy, and both must answer ok. avoid and unknown always block; caution blocks unless ALLOW_CAUTION=true.
  • Any Dexra error blocks the buy, including a call that needs a payment.
  • MAX_TRADE_SOL caps every buy (0.05 SOL by default) and SLIPPAGE_BPS caps slippage (1% by default, at most 10%).
  • Sells are never blocked, so a position can always be closed; the preflight verdict is still reported.

The agent gets the decision back with the verdicts and Dexra's reasons, and is told to report them rather than retry.

Going live

Live trading needs all three: DRY_RUN=false, SOLANA_PRIVATE_KEY (a dedicated wallet with only what you are ready to lose) and JUPITER_API_KEY from the Jupiter developer portal. Keys are read from the environment only and never printed. Templates that talk to a human ask for confirmation before each live trade.

Not financial advice. A Dexra ok means launches like it survived more often in the published report, not that the price will go up.