Trading agents
What a trading agent is, why the subnet values agents, the sealed machine an agent runs in, the daily check, and how to build, fund and run one.
What an agent is
A trading agent is a program that trades on its own. On the Kokoah subnet, it is your own trading code running in a sealed machine started from Kokoah’s published harness. It manages its own Hyperliquid account, trades perpetuals through Kokoah and is a miner like any trader: it needs the same $10,000 daily average and the same three qualifying trades, and it earns the volume reward by the Kokoah fees it pays.
Why the subnet values agents
Agents are what the subnet exists to produce. A trader’s record shows what one person did; an agent’s record shows what a program does, and a program that has proven itself can run again, for more traders. That is why a verified agent’s skill weight in the skill reward is 10% higher. It still passes the same 90-day entry test as everyone else.
The sealed machine
The machine is a Google Cloud Confidential Space machine, on your own cloud account, running Kokoah’s harness. Its memory is sealed off from the cloud host, and anyone can rebuild the harness from its published code and check that it is the same.
- The account’s key is made inside the machine and never leaves it. Nobody, you included, can trade the account by hand.
- Your code runs sealed off, with no network. Through the harness it can only place and cancel orders, change leverage and margin, and read market data and its own account.
- Every order carries Kokoah’s builder code, and only the main perpetual markets can be traded. A limit order, or a stop-loss or take-profit whose trigger price the market has already reached, is refused when its price is more than 5% from the market. A stop-loss or take-profit that hasn’t triggered yet can rest at any price, with its limit price within 5% of its trigger price.
- Your code is fingerprinted: the fingerprint you publish with your miner’s link must match the code the machine runs. The code can stay private: encrypted, it is opened only inside the machine.
- If the machine stops, a new sealed machine started from the newest approved harness, with your secret, gets the account back, and it carries on as an agent.
What validators check every day
Every validator checks every agent once a day, on its own. It sends the machine a fresh challenge, and the machine answers with a token signed by Google. The checks run in this order; the first one that fails is the reason in that validator’s record, and the account earns no agent bonus that day:
- The account’s key has never been released to you. If the list of released keys can’t be read, no account counts as an agent that day.
- The machine answers within 30 seconds, at the address its link publishes.
- The answer names the linked account, your miner key, this subnet and the code fingerprint on your miner’s link.
- The token comes from a genuine, production sealed machine on confidential hardware, running an approved Kokoah harness.
- The account has no other trading key.
The leaderboard marks such an account as a Verified agent.
How to build one
You need a registered miner key, a Google Cloud account (you pay for the machine; Kokoah runs nothing for you) and the subnet’s command-line tool. An agent links with that tool rather than the Register page, because its trading key lives inside the machine.
The trading that counts is on Hyperliquid’s main exchange, with real USDC, so the machine runs on Hyperliquid mainnet. Hyperliquid’s test exchange is only for trying an agent: nothing traded there counts.
- Write your agent: a folder with an
entry.pythat talks to the harness. - Package it and submit it, signed by your miner key, to Kokoah’s agent service at
https://api.kokoah.com/miners. Keep your keys and secrets in a folder outside the agent’s code: the tool refuses to package files that look like keys or secrets. - Make your secret from a strong password, and sign a start permission with your miner key, both on your own computer.
- Start the sealed machine on your own Google Cloud account, from the newest approved harness image (a new machine on an older one stops before it can store its key copy). Open its port 8080, where validators check it, to that machine only.
- Check that it started. A production machine shows no logs, so ask its status page from outside. If it doesn’t answer within a few minutes, a setting was wrong: fix it and start a new machine.
- Publish the link from your miner key, with the agent’s code fingerprint and the machine’s address.
- Deposit USDC to the agent’s account on Hyperliquid, the address on its status page. Your agent starts trading.
The agent service takes one submission per miner key every 12 hours, and at most 6 uploads an hour, refused ones included. It keeps a miner key’s five newest submissions, and a month after the key leaves the subnet it deletes them; a submission a stored key copy still needs is always kept. The same key can send a deleted one again, as a new submission.
Every command is in the agent guide; registering a miner key is in the miner guide.
Funding, withdrawing and stopping
- Fund the account with USDC on Hyperliquid. To be eligible, it must average at least $10,000 over each UTC day, as for every miner.
- To withdraw, sign a withdrawal request with your own wallet, the one you named when starting the machine. Money goes only to that wallet.
- To stop, sign a stop request: the agent stops and its open orders are cancelled. Positions stay open, so close them first.
- A signed withdrawal or stop request is good for 5 minutes and works once. For another one, sign a new request.
- The machine takes up to 10 withdrawal and stop requests a minute from one IP address, and 6 attestation requests (the validators’ check). Beyond that, it answers “too many requests” to that address for a short while; others aren’t affected. Its status page is never limited.
Taking the key out
You can take the account’s key out yourself, for example to trade it by hand. The release is public, and the account never earns the agent bonus again, since a person then holds its key.
From verified agents to traders
The strongest verified agents, with records that have held up for months, are to become strategies Kokoah brings to traders. A trader will be able to follow one in their own Hyperliquid account, inside limits they sign, and stop at any time.
The agent keeps mining as before, and being offered to traders will never change its score. Strategy products will be subject to regional availability, and their revenue will go to the buyback.