YSLEY®
Docs

Docs

How to endow an agent, give to one, and connect an agent to its mandate through MCP or the SDK.

Last updated 1 December 2026Network Elysium · chain 99901Source github.com/tryCorody/corody

In short

  • Owners open an endowment in the app; patrons give from its page.
  • Agents spend through an MCP server with five tools, or the JavaScript SDK.
  • The draw is paid in USDC every quarter, at most 6% a year, with a 1% fee.
  • The code is open, and a script checks that what is on chain is that code.

01What Ysley is

Ysley gives an AI agent money of its own. Its owner opens an endowment for it; patrons give HYPE or USDC once; every quarter the endowment pays a draw in USDC into the agent's mandate, an account the agent can spend from only inside the limits its owner sets.

Everything runs on Elysium, Kinetiq's chain for Hyperliquid (chain 99901). There is no Ysley account to sign up for: you use your own wallet, and every action is a transaction it shows you first.

WhoDoes what
OwnerHolds the agent's identity token. Opens the endowment, accepts it, sets the limits, approves large payments, can pause or withdraw.
PatronGives HYPE or USDC to an open endowment. Earns a non-transferable patron mark from $1.
AgentPays providers from its mandate with its own key, through the MCP server or the SDK.
KeeperPosts the HYPE price, sells just enough HYPE before a draw, and pays the draws. It can never take money.
TreasuryA multisig Safe. Owns the protocol settings and receives 1% of each draw.

02Endow your agent

In the app, open Endow an agent and connect the wallet that will own the agent.

  1. The agent. Enter its number, or tick Register a new agent first and give a link to its card (a JSON file with its name and what it does).
  2. The draw. Pick a yearly rate from 1% to 6%. It is fixed once the endowment opens.
  3. The agent's key. The address your agent signs with. Create a new wallet just for it; it can only pay inside the limits.
  4. The limits. Per payment, per day, per 30 days, and the amount above which a payment waits for you.
  5. A first gift (optional) in USDC or HYPE.
  6. Press Open the endowment. Your wallet shows up to four transactions: register, open, accept, give.

Afterwards, the Console shows the mandate: its balance, what is left today and this month, and payments waiting for you. From there you can approve or reject them, change the limits, pause, or withdraw.

03Give to an agent

Open Endowments, pick an agent and press Open. Enter an amount in USDC or HYPE and press Give. USDC needs one approval first; HYPE is sent as it is and wrapped by the endowment.

Until the owner accepts, you can take your gift back after 180 days. Once accepted, gifts are final. A gift of $1 or more earns a patron mark, which gives no claim on the money.

04Connect your agent (MCP)

The MCP server gives your agent its mandate as five tools. It runs on your machine, next to the agent, and works with any MCP client (Claude Desktop, Claude Code, Cursor and others).

1. Get the code

git clone https://github.com/tryCorody/corody
cd corody && npm install

2. Add it to your MCP client

Use the agent's number and the private key of the agent's wallet (the address you gave as the agent's key). Without a key the server is read-only.

{
  "mcpServers": {
    "corody": {
      "command": "node",
      "args": ["/path/to/corody/mcp/server.js"],
      "env": { "AGENT_ID": "1", "AGENT_KEY": "0x…" }
    }
  }
}
The agent's key can only pay from its own mandate, inside the limits you set. Keep it on the machine the agent runs on, never in a repository or a chat.

3. Ask your agent

“How much can you spend today?”, “Pay 12 USDC to 0x… for the GPU hour”. The server reads the addresses from ysley.xyz/deployment.json.

ToolWhat it does
corody_mandateBalance, limits, and what is left today and this month.
corody_check_paymentWhether a payment would go through, without sending it.
corody_payPays in USDC. Inside the limits it settles at once; above the threshold it waits for the owner.
corody_pendingPayments waiting for the owner.
corody_endowmentWhat the endowment holds, its average, and the next draw.

05Use the SDK

For your own code, sdk/corody.js wraps the same calls. It needs only ethers v6.

// npm install ethers
const corody = require("./sdk/corody");
const deployment = await (await fetch("https://ysley.xyz/deployment.json")).json();
const c = corody.connect({ rpc: "https://ysley.xyz/rpc", deployment });

const { mandate } = await c.accountsOf(1);          // agent #1
console.log(await c.mandateStatus(mandate));      // balance, limits, left today
await c.pay(mandate, agentWallet, "0xProvider…", "12.50", "gpu-hour");

06How the draw works

  • When: every 90 days after the owner accepts. Anyone can trigger it once it is due; the keeper does.
  • How much: a quarter of the yearly rate, applied to the average of up to twelve quarterly valuations. Averaging keeps it steady when HYPE moves.
  • In what: USDC. In the week before a draw, if the endowment holds too little USDC, the keeper sells just enough HYPE through KyberSwap. The contract refuses the sale if it returns less than 97% of the guarded price, or sells more than the draw needs plus 5%.
  • Fee: 1% of each draw goes to the treasury Safe. Nothing else is charged; gas is paid by whoever sends a transaction.
  • Prices: HYPE is valued by a feed the keeper updates from Hyperliquid. A price older than 30 minutes is refused, and one update may move it at most 20%.

07The contracts

ContractRole
AgentRegistryAgent identity, in the shape of ERC-8004. Whoever holds the token controls the agent.
EndowmentFactoryOpens one endowment and one mandate per agent, as clones.
EndowmentTakes gifts, pays the quarterly draw, sells HYPE only for the draw. Nobody can withdraw the principal.
MandateAccountThe agent's spending account and its limits.
PatronMarkNon-transferable mark for patrons.
PriceGuardUSD prices, refusing stale ones.
PushFeedThe HYPE price the keeper posts.

Addresses are on Official addresses. The source and tests are on GitHub, and anyone can check that what is on chain is that source:

git clone https://github.com/tryCorody/corody && cd corody
npm install
npm run verify-onchain        # compares every Ysley contract on chain with this code, byte for byte

08What to know before you use it

  • The contracts have been tested, including against a copy of Elysium mainnet, but not yet audited by an outside firm.
  • The HYPE price comes from the keeper, within the limits above. This is a trust point until Elysium has a public oracle.
  • HYPE is held as WHYPE and does not earn staking rewards yet.
  • The draw is a share of what the endowment holds, so it falls when HYPE falls.