hunch.
DEVELOPER DOCUMENTATION / V0.8

Evidence in.
Better boundaries.

Read-only RH / Robinhood Chain intelligence for your agent's execution path. Keep the signing authority and policy configuration in your trusted runtime.

REST · JAVASCRIPT · PYTHON · MCPRH MAINNET · 4663
HUNCH EXECUTION / V0.8

One mandate, from workspace to signer.

Configure and export a policy in the execution workspace ↗. The published V3 catalog covers 96 direct ETH pools across 56 official RH stock tokens. Two community-token routes use a supported V4 hook integration. Pool discovery is not execution approval: live liquidity, restrictions, references, costs and simulation must still pass. Sell routes, ERC-20 inputs, approvals, multihop and smart-account execution are not enabled.

Install and prepare

Download the versioned source bundle, compare its SHA-256 with the release manifest, extract it and run npm ci --ignore-scripts using Node 22+. The public client is also available as ES module with TypeScript declarations. Keep its execution-policy, execution-receipt and guard-codec sibling modules when copying it.

import { readFile } from 'node:fs/promises';
import { createExecutionClient, createExecutionSigner }
  from './public/hunch-sdk.mjs';

const policy = JSON.parse(await readFile('./operator-policy.json'));
const hunch = createExecutionClient({ operatorPolicy: policy });
const proposal = await hunch.prepare({
  outputAsset: policy.allowedAssets[0],
  amountInWei: '1000000000000000'
});
const candidate = proposal.candidates.find(c => c.eligible);
if (!candidate) throw new Error('No route meets the mandate');
const evidence = await hunch.evaluate(candidate);

Install the trusted signing boundary

The operator must approve the exact intent independently of the model. Pin the published Ed25519 key through a trusted release review. A public API returning its own key is not sufficient authentication. Keep the signing account, policy and intent files inaccessible to the agent.

// account: your existing operator-controlled viem account adapter.
// approvedIntent: independently approved exact input, output floor,
// recipient, asset and route. Do not accept a model's replacement.
// pinnedPublicKey: operator-reviewed release key.
const signer = createExecutionSigner({
  account, operatorPolicy: policy,
  operatorIntent: approvedIntent, publicKey: pinnedPublicKey
});
const signed = await signer.sign(candidate.transaction);
// Returns a serialized transaction. No broadcast is performed.

Signing does preflight → signature and evidence verification → revalidation → verification → account signing. Any policy, intent, call, key or dependency mismatch refuses signing. Receipts expire after 20 seconds. Slow wallet approval, a later broadcast, reorgs and alternate signing paths remain limitations. Nonce tracking is per instance; fleet coordination belongs in the wallet runtime.

REST contract

EndpointJSON input / behavior
POST /api/rh/execution/prepare{policy, outputAsset, amountInWei} → candidates, reasons, costs and unsigned proposals
POST /api/rh/execution/evaluate{policy, intent, transaction} → within_policy, block or review; only within_policy has a receipt
POST /api/rh/execution/revalidate{policy, intent, transaction, receipt} → previous block and receipt checks plus a new full evaluation
GET /api/rh/execution/statusPublished route coverage, observer freshness and public key metadata
GET /api/rh/execution/observations/{id}Signed retained dependency snapshot referenced by a receipt

All monetary and gas integers are decimal strings. Chain ID is 4663. Exact schemas are in OpenAPI and the SDK declarations. Unknown policy fields and unsupported routes are rejected. The same per-IP 40 POST requests/minute limit applies; 429 is a capacity failure, not a policy result. Evidence can be unavailable without a signing receipt.

Agent / MCP configuration

HUNCH_EXECUTION_POLICY=/absolute/path/operator-policy.json \
  node agent-mcp.mjs

Run this from the extracted bundle. The operator file is loaded once. MCP exposes prepare_hunch_execution and check_hunch_execution; tool arguments cannot replace that policy. These tools prepare and inspect only. Give an agent a guarded signing tool in your trusted runtime only after implementing the authority separation above.

Cost interpretation and coverage

Quoted output is net of quoted protocol effects. LP fee and quote take are disclosed, not subtracted twice. Gas limit × max fee is a maximum funding ceiling, not estimated consumption. Recapture rebates are conditional and excluded. RHOOK can require a gas envelope above seven million; an operator's relative network budget may exclude a small trade. Community token allowlisting does not establish holder, complete permission, proxy-storage or TWAP coverage.

Use the read-only release verifier, the source tests and the current whitepaper to inspect the actual boundary. The legacy V3 guard remains available.

Where Hunch fits

Agent proposal → Hunch preflight → operator-controlled signer → transaction submission. The operator installs the signer adapter once and keeps the account, policy and approved intent outside the model’s control. Hunch never holds the wallet key or broadcasts a trade.

ComponentResponsibilityHunch integration
Uniswap V3 / V4Pool accounting and swap executionPinned venue adapters decode and simulate supported exact calls.
V4 hookPool callbacks before/after swaps or liquidity actionsHunch checks the supported pool’s hook dependencies and policy. It does not deploy a Hunch hook.
Hookr standard coreHook configuration, typed route builders, quotes and settlementhookr-sdk 1.0.0 supplies the builder and release manifest for the listed V4 routes.
What The Hook executorConditional arbitrage recapture behind an enabled laneA pinned dependency of relevant Hookr routes. No separate Hunch SDK integration or guaranteed rebate is claimed.
Safe Guard / wallet policy moduleAccount-level transaction restrictionsArchitectural reference. A deployed Safe Guard, ERC-7579 module and smart-account support are not implemented.
Hunch signer adapterVerify a receipt for the operator’s exact policy, intent and transaction; revalidate before signingImplemented in the trusted JavaScript wallet runtime for EOAs without delegation.

One customer journey

In Check a trade, select a supported asset and public wallet address, choose a policy preset and customize limits. Hunch prepares a route and runs preflight. Inspect costs and decision reasons; save or export evidence. Export that exact policy to your agent runtime and install the signer adapter. Research tools support this flow without opening a separate execution application.

Coverage and route selection

getExecutionCoverage() and GET /api/rh/execution/status expose current published route IDs, addresses, fee tiers and adapter scope. For a stock token, preparation ranks eligible published V3 pools by fresh quote output within the LP-fee ceiling, then prepares the first candidate with available required evidence. All V3 candidates use the same maximum gas envelope. This is not exhaustive routing, a gas-adjusted optimizer or a guarantee of best execution. A later preflight failure requires a fresh proposal.

New V3 observations are collected and persisted when a proposal is prepared; evaluation and revalidation reread current state. An idle route can show no fresh observation until requested. Existing V4 and legacy V3 observers refresh every 60 seconds. Every receipt requires a matching signed observation no older than 150 seconds.

Terms used precisely

Policy means operator-owned limits. Preflight means checking a specific unsigned transaction against current evidence. Receipt means Hunch’s signed, short-lived attestation to that check. Venue adapter means code that understands a supported route. Hook means pool-level on-chain logic; it is not a synonym for the Hunch service.

References: Uniswap IHooks, Hookr integration vocabulary and release checks, Safe Guards. Naming a protocol describes technical scope, not a partnership.

Legacy V3 API compatibility

The v0.6 guard supports one native-ETH exact-input swap into the official RH NVDA stock token through the pinned Uniswap V3 0.05% pool. It decodes the exact calldata, checks RWA identity and units, state restrictions, dependency hashes, quote slippage, TWAP deviation, nonce and fee limits, then simulates the call and corroborates balance changes. Run the workflow and inspect its complete boundaries.

GET /api/rh/guard/status returns observer health, the public receipt key, latest signed observation and recent history. GET /api/rh/guard/observations/{id} retrieves an individual observation while retained.

POST /api/rh/guard/prepare
{"wallet":"YOUR_EOA_ADDRESS","amountInWei":"100000000000000"}

POST /api/rh/guard/evaluate
{"intent":PREPARED_INTENT,"transaction":PREPARED_TRANSACTION}

POST /api/rh/guard/revalidate
{"intent":APPROVED_INTENT,"transaction":EXACT_TRANSACTION,"receipt":PRIOR_RECEIPT}

Preparation is not authorization. The operator must review and approve the intent outside the agent. Integer quantities are canonical decimal strings. The exact transaction envelope includes chainId, from, to, data, value, gas, nonce, maxFeePerGas and maxPriorityFeePerGas; extra fields are rejected.

Only within_policy can carry a signed receipt. Block, review, missing evidence, unavailable storage, signature errors or expired receipts must stop signing. A receipt lasts 20 seconds and binds normalized transaction and intent SHA-256, dependency fingerprint, block/hash, evidence digest and the durable observation ID. Revalidation checks the previous block and reruns the current evaluation. Read all fixed limits and preserve the limitations in every integration.

Download hunch-guard-sdk.mjs, guard-codec.mjs and guard-receipt.mjs into the same directory. createGuardedSigner({account, operatorIntent, publicKey, baseUrl}) returns sign(transaction), which runs evaluation, signature verification and fresh revalidation before calling the trusted account's signTransaction. It returns serializedTransaction, receipt and transaction, and never broadcasts. Use Node 22+; receipt verification uses WebCrypto Ed25519. The account must be a local or hardware signing adapter, not a provider that sends transactions automatically.

Review and pin the key from the release manifest in operator-controlled configuration. Do not let a model fetch a new key and silently trust it. Key rotation requires explicit operator review. Keep the underlying account, alternate signing paths, wallet permissions and intent outside the model's reach. A multi-process wallet requires its own shared nonce coordinator. Treat an error after a signing request as uncertain local signing state; do not blindly retry.

The service signs evidence with its own key, never wallet transactions. Public dependency snapshots are sampled every 60 seconds and stored for 14 days; submitted wallet calls are not persisted by the guard. Source and receipt signatures do not replace an independent audit, guarantee future execution, or remove issuer powers. Download the source, adversarial tests and live verifier.

Connect to Hunch

Hunch reads RH / Robinhood Chain mainnet, chain ID 4663. Base URL: https://hunchagents.xyz. No wallet connection or API key is required. The public limit is 40 requests per minute per IP, with shared upstream capacity limits and no availability SLA.

Download the JavaScript client, Python client, or OpenAPI specification. JavaScript and MCP require Node.js 22 or newer.

import { HunchClient } from './hunch-sdk.mjs';
const hunch = new HunchClient({ profile: 'conservative' });
const report = await hunch.inspectToken(contractAddress);
const decision = await hunch.assessAction({
  address: contractAddress, amountUsd: 25, slippageBps: 100
});
// Current RH coverage always requires review or block.
// Stop here; your trusted runtime owns review and signing.

Python: HunchClient().inspect_token(contract_address). The JavaScript requireWithinProfile and Python require_within_profile helpers throw on review, block, or service errors. Since this release lacks complete permission and holder evidence, these helpers will not grant signing clearance.

One decision-context integration

POST /api/rh/context
const context = await hunch.getDecisionContext({
  address: assetAddress,
  tokens: '2',
  counterAsset: counterAssetAddress,
  transaction: { from: caller, to: router, data: calldata, value: '0x0' }
});

Only address is required. tokens defaults to the decimal string '1'; counterAsset and transaction are optional. The endpoint reads fresh asset evidence, relevant stock-token context, a caller-selected counter asset and optional eth_call simulation. It does not assume that the largest indexed pool is your route. A counter-asset reference is per one token, not a valuation of the whole trade.

The packet includes request, requestSha256, underlying reports, observation times/blocks, reasons and a review or block decision. An unavailable component remains a gap. Instrument blocks and execution reverts propagate. The fingerprint is SHA-256 of the normalized request JSON in returned key order, not an attestation or proof of transaction intent. Observations may come from different blocks and are not finality guarantees.

Python: get_decision_context(address, tokens='2', counter_asset=other_address, transaction=call). MCP: get_rh_decision_context. TypeScript declarations accompany the portable SDK. Research context informs a proposal; it cannot authorize signing. Use the execution workflow above to bind policy to the exact call. The JavaScript SDK exports research and execution capabilities from one entry point. There is no published npm package.

This orchestration does not replace the fixed action-policy endpoint or trusted wallet controls. It has a shared capacity of one in-flight context request. Simulation retains its 5,000,000 gas cap; routes requiring more are unsupported. Hookr recapture swaps can exceed that cap. Do not lower a route's gas to make it fit.

Inspect an RH contract

POST /api/rh/intelligence
curl https://hunchagents.xyz/api/rh/intelligence \
  -H 'Content-Type: application/json' \
  -d '{"address":"0x0bd7d308f8e1639fab988df18a8011f41eacad73"}'

The example is WETH on RH. The service verifies the RPC chain ID, reads a latest block number, and uses that block for code, supply, decimals, optional name/symbol, owner(), and paused() calls. It checks EIP-1967 implementation/admin/beacon slots the exact EIP-1167 pattern, and the 44-byte minimal forwarding runtime. Recognized targets are read at the same block; both token and implementation runtime bytes receive SHA-256 fingerprints. This is not recursive resolution or source verification.

These are contract-reported interface observations. A zero owner, empty storage slot, missing interface, or successful call does not prove the absence of privileged roles, minting, freezes, taxes, blacklists, custom proxies, or malicious transfer logic. Reads by latest block number are not a finality guarantee.

Reports begin with a deterministic decision brief: observed controls, their consequences, and next checks. Counter-asset identities are matched by address against the official RH registry. Liquidity shares describe only returned pools, not all liquidity or executable depth. Reports include network, chain ID, block, observation time, provider, coverage, findings, and limitations. Combined reports may be cached for 20 seconds with their original timestamps. Indexed pools come from DexScreener's Robinhood index; prices are attributed only when the inspected token is the base asset. Liquidity includes both pool assets and does not establish a lock or sellability. Pons bonding curves may be absent.

A verified RH holder-distribution source and complete source-code permission analysis are not connected. Reports explicitly mark missing coverage, and action policies require review. No synthetic holder count or security score is substituted.

Compare saved evidence

Save a token report, then inspect the same RH contract after a later observation. The console compares it with your most recent saved baseline: supply, decimals, owner and pause interfaces, standard proxy fields, code size, primary indexed pool, and source coverage. Reported liquidity is compared only when both observations identify the same pool. Export the comparison as JSON.

The comparison runs in your browser using unsigned saved reports. It does not establish bytecode equality, prove no intervening changes, continuously monitor blocks, or authorize signing. The pure comparison module exports compareEvidence(before, after) for local integrations; it is not a hosted attestation service.

Instrument intelligence for agentic finance

POST /api/rh/instrument
{ "address": "0xaf3d76f1834a1d425780943c99ea8a608f8a93f9", "tokens": "2" }

Matches the chain and contract against Robinhood's official asset registry. For stock tokens, Hunch reads uiMultiplier(), newUIMultiplier(), effectiveAt(), oraclePaused() and decimals at one latest block. It reconciles the current multiplier with official REST metadata and validates an identity-matched USD bid/ask. A stock-token contract report also includes this instrument report automatically.

Corporate actions can change share-equivalent units without changing raw balances. REST bid/ask are underlying-share prices and need the multiplier once; Chainlink stock-token prices already include it. Newer REST tokenBid/tokenAsk fields are checked against the computed result when present. Hunch uses integer fixed-point arithmetic, then rounds reference values down to 18 decimal places.

Stale quotes (over 60 seconds), timestamps over five seconds in the future, trading halts, paused or invalid oracle flags, inactive assets, multiplier conflicts, and transitions due within five minutes block valuation-dependent execution. Missing interfaces suppress reference valuation and require review. The API never grants signing clearance. Registry entries may be cached for 30 seconds; official quote endpoints have their own 15-second cache.

JavaScript: hunch.inspectInstrument(address, '2'). Python: hunch.inspect_instrument(address, '2'). Quantity is a positive decimal string, up to 18 decimal places and 1e18 tokens. Chainlink rounds and sequencer uptime are not yet queried; venue flags are underlying-equity metadata, not proof of wallet eligibility or executable liquidity.

Source semantics: Building with Stock Tokens, Stock Token APIs, and Oracles & Price Feeds. Observed live API schema includes session-specific trading capabilities and token-equivalent prices in addition to the documented fields.

Evaluate a proposed action

POST /api/rh/assess
{
  "address": "0x0bd7d308f8e1639fab988df18a8011f41eacad73",
  "amountUsd": 25,
  "slippageBps": 100,
  "profile": "conservative"
}

Optional text adds inspection of the untrusted content that influenced the proposal. Set the profile in trusted operator configuration. The SDK and MCP adapter inject that configured profile; token metadata and model arguments must not change the limits.

RH profile v1ConservativeStandard
Maximum proposed exposure$100$250
Maximum slippage100 bps150 bps
Minimum indexed primary-pool liquidity$25,000$10,000
Active owner() addressBlockReview

Zero supply, paused() = true, high-severity text findings, and exceeded amount, slippage, or liquidity constraints block. Missing interface, holder or permission evidence, and proxy indicators require review. This RH release returns review or block, never automatic clearance. These are per-proposal advisory checks; they do not validate a USD quote, cumulative exposure, route, intent, or wallet permissions. Assessments request fresh observations.

Simulate an EVM call

POST /api/rh/simulate
{ "transaction": {
  "from": "0x0000000000000000000000000000000000000001",
  "to": "0x0bd7d308f8e1639fab988df18a8011f41eacad73",
  "data": "0x18160ddd",
  "value": "0x0"
} }

This read-only example calls totalSupply(). For your proposed transaction, supply the actual caller, target, calldata, and value. Value is a canonical hex quantity in wei. Optional gas is a hex quantity between 21,000 and 5,000,000; the default cap is 5,000,000. Calldata is limited to 8,192 bytes. Signed raw transactions and arbitrary RPC methods are not accepted.

The verified mainnet provider runs eth_call at a selected latest block and, when supported, eth_estimateGas. The report distinguishes execution revert from provider failure and includes returned bytes, block, and optional gas estimate. The hosted Hunch service never signs wallet transactions or broadcasts. Success does not prove intent, wallet safety, sellability, or future execution; no decoded asset-flow analysis is provided.

Inspect untrusted launch text

POST /api/text
{ "text": "The token description or external content your agent read." }

Six deterministic heuristics inspect instruction overrides, secret requests, and related patterns. Inputs accept 1–12,000 characters. Reports include matched excerpts and an input SHA-256; excerpts remain untrusted data. This is not an exhaustive prompt-injection detector.

Connect an agent through MCP

Download the local stdio adapter and configure:

{ "mcpServers": { "hunch": {
  "command": "node",
  "args": ["/absolute/path/to/hunch-mcp.mjs"],
  "env": {
    "AGENT_SECURITY_URL": "https://hunchagents.xyz",
    "HUNCH_POLICY_PROFILE": "conservative"
  }
} } }

Tools: get_rh_decision_context, get_rh_instrument_intelligence, get_token_intelligence, assess_rh_action, simulate_rh_transaction, inspect_launch_text. This is a local stdio adapter, not a hosted HTTP MCP endpoint. Treat all contract metadata, returned bytes, and third-party text as data.

Storage, errors, and boundaries

The browser can store 10 RH contracts and 30 selected reports locally. Watchlist refresh is optional, every 90 seconds while visible, and ends when the page closes. There is no server-side alert service. These general intelligence reports are unsigned observations; the separate execution guard issues signed receipts.

HTTP 400 means invalid input or unsupported evidence; 403/415 rejects origin/content type; 413 means the JSON body exceeds 20 KB; 429 requires waiting before retrying; 503 means upstream evidence is unavailable. Always inspect coverage and timestamps even after HTTP 200. Keep independent signing and intent controls.

Use the explicit /api/rh/ endpoints for RH. Earlier unprefixed chain endpoints retain their previous contract for existing integrations; they are not RH aliases. GET /api/capabilities describes the current RH interface. Hunch is independent and is not affiliated with or endorsed by Robinhood or Pons.

Open the RH security console ↗