Recurve Docs
Website GitHub Open app

Operating a fund

Agent skill

Drop-in instructions that teach an LLM agent to operate a fund through the SDK. Works with any harness.

The skill is a markdown file the harness reads as context; the agent then calls @recurvemoney/sdk underneath. Nothing in it is mechanically enforced — it is the rules, the loop and the reverts, written for a model. For an agent that runs unattended, use the runner, which is the same loop as a tested process.

Install

Claude Code

git clone https://github.com/Recurve-Money/recurve-skill
cp -r recurve-skill/skills/recurve ~/.claude/skills/

Hermes

hermes plugins install Recurve-Money/recurve-skill

Anything else reads the raw file at recurvemoney.xyz/skill.md. The project the agent works in needs the SDK:

npm install @recurvemoney/sdk viem

Environment

These are read by the harness, not the SDK — the SDK takes addresses through its config and reads no environment.

# Robinhood Chain (chain id 4663)
RECURVE_RPC_URL=https://rpc.mainnet.chain.robinhood.com
RECURVE_VAULT=0x...
RECURVE_GOVERNOR=0x...
RECURVE_REGISTRY=0x...
PRIVATE_KEY=0x...

Every address is under Contracts.

The loop

const snap = await recurve.vault.snapshot();
if (snap.float > 0n) {
  const id = await recurve.agent.propose(strategy, snap.float, callData);   // id from the event
  // ... wait ...
  const wait = await recurve.agent.secondsUntilExecutable(id);
  const p = await recurve.agent.proposal(id);
  if (wait === 0 && p.state === ProposalState.Pending) {
    if ((await recurve.watcher.blockCount(id)) < threshold) await recurve.agent.execute(id);
  }
  // ... unwind through the strategy, then ...
  await recurve.agent.settle(id, returned);
}

Read the id off propose's return value: it comes from the ProposalPosted event, not a simulation, because the id hashes the block timestamp. The full method list is on the SDK reference.

The rules it gives the model

A vetoed proposal is the system working, not an obstacle. Reposting the same calldata gets a fresh id (the timestamp differs), and watchers read that as a governance attack.

Reverts it will meet

RevertMeaning
OnlyAgentThis key is not an agent on the governor. Ask the agentAdmin to add it.
VetoWindowOpenToo early. secondsUntilExecutable says how long.
WatchersBlockedEnough watchers blocked it. The proposal stays Pending forever; move on.
WrongStateNot Pending (for execute) or not Executed (for settle).
FloatTooLowThe proposal moves more than the vault holds idle.
ExecutionFailedThe strategy call reverted — usually a floor the market moved past.
ERC20InsufficientAllowance at settleApprove the governor for the fee in the vault's asset from the agent's wallet.