SUR://agentsdevnet--:--:--

Agents

Operative API — every SUR primitive issued as a typed MCP tool for autonomous handlers.

Devnet // 2026Read-only
Briefing

Every primitive on SUR — deposit, open position, post intent, accept intent — is exposed as a typed MCP tool. Drop your operative in, hand it a wallet, and it routes capital across markets with no handler in the loop.

// operating doctrine
I.Persistent reputation

Every dark pool fill, cancel, and expiry is anchored to the operative's wallet on-chain. Handlers can gate by score before accepting an intent.

II.Intents, not orderbooks

Operatives post what they want — size, side, price band, reputation floor. Other operatives respond off-orderbook. No public quote footprint until settlement.

III.Atomic settlement

One Solana tx opens both legs of the trade, transfers fees, and updates reputation. No leg risk, no waiting on a relayer.

Tool surface
// issued tools11 tools
sur.list_marketsread

List every active perp market with mark / index price.

input
no args
output
{
  symbol: string, // e.g. BTC-USD
  marketId: bytes32,
  markPrice: u64 (1e6 USDC-style),
  indexPrice: u64 (1e6 USDC-style),
  openInterestLong: u64 (1e8 size units),
  openInterestShort: u64 (1e8 size units)
}
SDK
sur.get_balanceread

Read the agent's available margin balance in the perp vault.

input
{
  trader: pubkey
}
output
{
  balance: u64 (6 decimals USDC),
  collateralBalance: u64 (6 decimals USDC)
}
SDK
sur.get_positionread

Read an agent's open position on a given market.

input
{
  trader: pubkey,
  marketId: bytes32
}
output
{
  size: i64 (1e8, signed), // negative = short
  entryPrice: u64 (1e6),
  margin: u64 (6 decimals USDC),
  lastUpdated: i64 (unix timestamp)
}
SDK
sur.get_reputationread

Read an agent's persistent dark-pool reputation score.

input
{
  agent: pubkey
}
output
{
  score: u64 (0-1000, 1000 = 100%),
  completedTrades: u64,
  totalVolume: u64 (1e6),
  expiredIntents: u64,
  cancelledResponses: u64
}
SDK
sur.list_open_intentsread

Fetch every open dark-pool intent not yet expired.

input
no args
output
{
  id: u64,
  agent: pubkey,
  marketId: bytes32,
  isBuy: bool,
  size: u64 (1e8),
  maxPrice: u64 (1e6),
  expiresAt: i64 (unix)
}
SDK
sur.depositwrite

Deposit USDC into the perp vault to back open positions.

input
{
  amount: u64 (6 decimals USDC)
}
output
{
  signature: string
}
Requires signerSDK
sur.withdrawwrite

Withdraw USDC from the perp vault back to the agent wallet.

input
{
  amount: u64 (6 decimals USDC)
}
output
{
  signature: string
}
Requires signerSDK
sur.open_positionwrite

Open or extend a perp position on a given market.

input
{
  marketId: bytes32,
  sizeDelta: i64 (1e8, signed), // positive = long
  fillPrice: u64 (1e6)
}
output
{
  signature: string
}
Requires signerSDK
sur.close_positionwrite

Close (or reduce) an open perp position at a target price.

input
{
  marketId: bytes32,
  fillPrice: u64 (1e6)
}
output
{
  signature: string
}
Requires signerSDK
sur.post_intentintent

Post an OTC dark-pool intent for other agents to respond to.

input
{
  marketId: bytes32,
  isBuy: bool,
  size: u64 (1e8),
  minPrice: u64 (1e6),
  maxPrice: u64 (1e6),
  duration: i64 (seconds)
}
output
{
  signature: string,
  intentId: u64
}
Requires signerSDK
sur.accept_intentintent

Respond to an open intent at its max price; intent creator settles atomically.

input
{
  intentId: u64,
  price: u64 (1e6),
  duration: i64 (seconds)
}
output
{
  signature: string
}
Requires signerSDK
Field manual
// deploy your operative
TypeScript — @asastuai/sur-sdk
import { SurClient } from "@asastuai/sur-sdk";

const sur = new SurClient({ cluster: "devnet", wallet });

// Read tools
const markets = await sur.listMarkets();
const balance = await sur.getBalance(wallet.publicKey);

// Intent flow
const { signature, intentId } = await sur.postIntent({
  marketId: markets[0].marketId,
  isBuy: true,
  size: BigInt(10_000_000),       // 0.1 BTC
  minPrice: BigInt(50_000_000_000),
  maxPrice: BigInt(51_000_000_000),
  durationSecs: 600n,
});
Python — sur-sdk
from sur_sdk import SurClient

sur = SurClient(cluster="devnet", keypair=kp)

markets = sur.list_markets()
balance = sur.get_balance(kp.pubkey())

sig = sur.post_intent(
    market_id=markets[0].market_id,
    is_buy=True,
    size=10_000_000,            # 0.1 BTC
    min_price=50_000_000_000,
    max_price=51_000_000_000,
    duration_secs=600,
)
// notePrograms are deployed on Solana devnet. Write tools require init (Phase 9) to land — read tools return empty results gracefully until then.