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.
| Template | Framework | What you get |
|---|---|---|
template-elizaos | elizaOS · TypeScript | A character with Dexra check actions and a trader plugin that buys and sells through the guard. |
template-hermes | Hermes Agent · Python | A skill and a local MCP trading server next to Dexra’s remote MCP; the trading server works in any MCP client. |
template-solana-agent-kit | Solana Agent Kit · TypeScript | Solana Agent Kit with the Dexra plugin; its own trade action is replaced by guarded buy and sell. |
template-vercel-ai-sdk | Vercel AI SDK · TypeScript | A CLI agent with typed tools, OpenAI or Anthropic, optionally merged with Dexra’s MCP tools. |
template-claude-agent-sdk | Claude Agent SDK · TypeScript | Dexra’s remote MCP for checks and an in-process trader server, with confirmation before live trades. |
template-openai-agents | OpenAI Agents SDK · Python | An agent with function tools, a guardrail that refuses a buy the agent has not checked first, and an optional Dexra MCP connection. |
template-langgraph | LangGraph · Python | An explicit scan → check → decide → trade graph, with human approval before live trades, and a ReAct mode. |
template-launch-bot | No LLM · TypeScript | A bot that buys launches Dexra marks ok, from polling or a signed watch webhook, with position limits and exits. |
Start
- Open the repository and press Use this template, or clone it.
- Copy
.env.exampleto.envand setDEXRA_API_KEY(a key from the cabinet; without one only the free tools answer) and your model provider's key. - Install and run as the README says. The first runs are dry runs: the agent shows what it would buy and why.
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_checkandswap_preflightboth run before the buy, and both must answerok.avoidandunknownalways block;cautionblocks unlessALLOW_CAUTION=true.- Any Dexra error blocks the buy, including a call that needs a payment.
MAX_TRADE_SOLcaps every buy (0.05 SOL by default) andSLIPPAGE_BPScaps 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.