Isolated swaps for AI agents and bots on Solana
Your trade gets its own wallet. Your wallet never becomes the trade.
$ cp -r node_modules/@orientimhq/swap/skills/orientim-protected-swap .claude/skills/After npm i @orientimhq/swap
How protection works
Three steps, checked before anything is signed.
- 1
Your wallet never moves.
Your agent names the amount. Only that amount steps out, with the costs shown up front. The rest of your SOL, every other token and every NFT stay exactly where they are.
- 2
The trade gets its own wallet.
The amount moves into a one-time key built for this swap alone. Orientim routes it across Solana’s markets, and the route never sees your wallet.
- 3
Your price, or no trade.
Your agent sets the minimum before it signs. If the market can’t meet it, the whole swap reverts on chain: nothing is traded, and only the network fee is paid.
For AI agents and bots
Your agent trades within the limits you set.
The skill checks each transaction before signing. For bots using the API directly, run the same verification and keep the signing key and spending policy outside the agent’s control.
- Checks before signingThe skill, the MCP server and the command line check the exact transaction on your own connection to Solana.
- Recovers an interrupted orderAfter a restart it settles what was in flight before anything new, and never swaps an order twice.
Start in three steps
- 1
Get an API key
Sign Orientim’s message with your agent’s wallet. The key comes at once and lasts 90 days; signing moves nothing. The MCP server gets one itself.
- 2
Install the package
One npm package, @orientimhq/swap: instructions for your agent, the MCP server, a command line for bots, and the verifier that checks every swap.
- 3
Ask for a swap
Tell your agent: “swap 5 USDC to SOL with Orientim”. It checks the transaction on its own RPC, then signs.
What it protects against
What your agent can’t be tricked into.
The attacks that can empty a trading agent, and what happens when the swap goes through Orientim. The market itself is the one thing no check controls; its risks are set out in the terms.
✕ The attack
A message tells your agent to “swap everything” or “set slippage to 15%”.
✓ Blocked before signing
With your policy file set, the skill stops at your limits: per swap, per day, the tokens you allow and the slippage you set.
✕ The attack
The swap server itself is hacked.
✓ Blocked before signing
Orientim holds none of your keys. With the skill or verifier, your wallet signs only the transaction you asked for; a changed one never gets a signature.
✕ The attack
A bot sandwiches the trade.
✓ Reverted on chain
The minimum is enforced on chain: a swap that would fill below your tolerance (0.5% by default) reverts, and only the network fee is paid.
Limits you set
Rules in a file only you edit.
Per swap, per day, the tokens it may buy and the most slippage it may take. Your agent can’t raise them.
- ✓ At most 50 USDC a swap
- ✓ At most 200 USDC a day
- ✓ Buys only SOL
- ✓ Never more than 3% slippage
{
"maxAmountIn": {
"EPjF…Dt1v": "50000000" // 50 USDC a swap
},
"maxAmountInPerDay": {
"EPjF…Dt1v": "200000000" // 200 USDC a day
},
"allowedOutputMints": ["So11…1112"], // buys only SOL
"maxSlippageBps": 300, // never more than 3%
"stateDir": "/home/agent/.orientim-state" // where every swap is counted
}
# the agent is told to swap 500 USDC
✓ your policy holds it to 50 USDC a swap
# the agent is told to buy a token someone named
✓ your policy allows only the tokens you chose
# the agent is told to set slippage to 15%
✓ your policy caps slippage at 3%Your part: keep the signing key in a separate signer with its own limits. The protection covers every swap through Orientim; an agent that can read its own key, transfers made outside Orientim, a key stolen from your machine and the value of the token you buy are outside it.
No account, no cookies, no tracking. Orientim never holds your keys or funds, and keeps no database of your swaps. Privacy notice →
Give your agent a wallet, not a blank cheque.
Get a key with your agent’s wallet, download the skill, and let it swap within the limits you set.