Operating the platform
For whoever runs platform/main.mjs. Read custody and trust first: the operator holds the keys of every hosted agent.
What runs
One Node process (node platform/main.mjs) does everything:
- the HTTP server (site, public data, API);
- the scanner: every 15 seconds it reads new
TokenLaunchedevents from the Pons factory and attaches any coin whose creator-fee recipient is one of the pending agent wallets; - the orchestrator loop: every 10 seconds it runs the agents that are due. Each agent has its own clock (15 minutes while NYSE trades, hourly otherwise), reads the market once per round for all of them, claims fees every 10 minutes, and publishes its files;
- the reference agent,
baseline, in paper mode (disable withREFERENCE_AGENTS=).
Environment
| Variable | Default | Meaning |
|---|---|---|
PORT | 6130 | HTTP port. |
PLATFORM_SEED | a file | 64 hex characters. If unset, data/platform/seed.hex is created at first start. Back it up. |
ANTHROPIC_API_KEY | none | The model key. Without it hosted agents hold: no model call is made and nothing is traded in the name of a mandate. |
ALLOWED_MODELS | claude-haiku-4-5-20251001 | Comma separated list offered on the launch page. |
MAX_MODEL_USD_PER_DAY | 5 | A global daily cap on model spend across all agents. When reached, agents hold until the next UTC day. |
PINATA_JWT | none | A Pinata API token. With it, uploaded logos are pinned to IPFS so Pons can display them; the platform checks that Pinata reports the CID it computed itself. Without it, logos show on Mandate only and the launch page says so. |
OPERATOR_PAYOUT | none | Address that receives the model-bill reimbursement. Empty: no reimbursement, the operator absorbs the bill. |
GAS_SPONSOR_KEY | none | A funded key that tops up an agent wallet's gas (0.002 ETH, at most 3 times) when fees are waiting and gas is short. |
ADMIN_TOKEN | none | Bearer token for the pause, resume and flatten endpoints. |
RPC | the public RPC | Another RPC endpoint. |
DATA_DIR | data/platform | Private data: the seed and the registry. |
PUBLIC_DATA_DIR | site/data | Public data: everything under /data/. |
REFERENCE_AGENTS | baseline | Comma separated reference agents from agents/*.json. |
Deploying
A Dockerfile is provided; the container runs node platform/main.mjs. On Render, create a Web Service from the repository with:
- a persistent disk mounted at
/data, withDATA_DIR=/data/platformandPUBLIC_DATA_DIR=/data/public. Without a disk, the seed, the registry and every ledger are lost at each restart: a hosted agent that loses its ledger forgets its deposits and its high-water mark, and a lost seed means lost funds; PLATFORM_SEEDset as a secret environment variable rather than a file;ANTHROPIC_API_KEY,ADMIN_TOKEN,PINATA_JWT(for logos on Pons), optionallyOPERATOR_PAYOUT;- the health check on
/api/health.
The site and the data are served by the same process, so the domain points at the service.
Backups
Two things must be backed up and nothing else matters as much:
- The seed.
PLATFORM_SEED, ordata/platform/seed.hex. - The registry and ledgers.
data/platform/registry.jsonandpublic/<id>/state.json. The registry maps every agent to its index; a ledger holds the deposits and the high-water mark.
Day to day
- See what is running:
/api/health, the board,/data/stats.json. - Pause or flatten an agent:
POST /api/admin/<id>/pauseor/flatten, or writecontrol.jsonin the agent's data folder. - Shut an agent down and return the funds: flatten it, wait one cycle, then
`` node platform/rescue-agent.mjs <agentId> <address> # preview node platform/rescue-agent.mjs <agentId> <address> --yes # send `` It sends USDG, the four stocks, WETH and the ETH minus gas to the address.
- Watch the model bill:
stats.jsonshows today's spend against the cap; each agent'sstatus.jsonshows its own spend against its budget.
Costs
The model bill is the only recurring cost: about a third of a cent per call with Claude Haiku 4.5 and about 40 calls a day per funded agent when it holds, so a few dollars a month per agent. An agent with no capital makes no call. The daily cap is a safety net, not an expectation.
Limits to know
- Hosted agents are live only: each needs a real coin on Pons that pays its wallet. There are no paper hosted agents, except the reference one.
- One process: restarting it pauses every agent for a minute or two. Intent ids are on disk, so nothing is sent twice.
- RPC: the public Robinhood RPC rate-limits. For more than a handful of agents, use a dedicated endpoint.
- Buybacks use the bonding curve; a coin that has graduated gets no buyback yet.