Skip to main content

Overview

The Cashmere Agent SDK (@cashmerelabs/cashmere-agent-sdk) turns cross-chain USDC transfers into a standard AI agent tool. Any framework that supports function calling or tool use can integrate Cashmere bridging in minutes. What agents can do:
  • Simulate a transfer to preview fees, duration, and route viability without executing
  • Execute a transfer across 16 chains (EVM, Solana, Aptos, Sui)
  • Query supported routes and CCTP versions programmatically
Destination minting is handled automatically by Cashmere relayers — the agent only needs to initiate the source-side burn.

Install

For LangChain integration, also install:

Quick Setup

Only configure the chains your agent needs. Keys are read from environment variables and used only for in-memory transaction signing.

Simulate Before Execute

Use simulate() to let the agent preview costs before committing funds:
This calls the Gas API and Circle Iris to fetch real-time fee data without submitting any transaction.

Framework Integration

Import the JSON tool schemas and pass them directly to the OpenAI API:
The schema defines two tools:

Tool Schemas Reference

cashmere_bridge

Executes a cross-chain USDC transfer. Returns: { txHash, explorerUrl, version, from, to }

cashmere_simulate

Previews a transfer without executing. Returns: { supported, version, estimatedDuration, estimatedFee: { cashmere, circleBurnBps } }

Supported Chains


SKILL.md (Agent Context)

The SDK ships with a SKILL.md file that provides comprehensive context for AI agents. Load it to give your agent detailed knowledge about Cashmere CCTP:
The SKILL.md covers:
  • All contract addresses and program IDs (public, on-chain data)
  • Fee calculation formulas and gas API integration
  • Per-chain transfer patterns and ABI details
  • CCTP version routing rules and estimated durations

Security

Private keys are never logged, stored on disk, or sent to any API other than the chain’s own RPC for transaction submission. The Gas API only receives domain IDs and fee parameters.
  • Keys are provided via environment variables and used only for in-memory signing
  • The SDK contains zero console.log statements
  • All contract addresses in the SDK are public on-chain data
  • The .env.example file ships with empty values — never commit .env

Next Steps