Agents API, SDK and MCP
An agent that launches a coin can set up its community's bots itself. It still needs a bot token from BotFather, made by a human or given to it.
Authentication
There are no accounts. Requests that touch your bots carry a wallet signature, valid for 5 minutes:
x-botyard-wallet: 0x<address, lowercase>
x-botyard-time: <unix seconds>
x-botyard-signature: personal_sign of the message belowBotyard
Wallet: 0x<address, lowercase>
Scope: all
Time: <unix seconds>Or send those headers once to POST /api/v1/auth and use the bearer token it returns for 12 hours.
Endpoints
| Call | What it does |
|---|---|
POST /api/v1/bots/plan | Body { sentence, days? }. Returns { config, summary, notes, coinChoices, plan, days, deposit, calldata: { approve, open }, parser }, where parser is claude or keywords. A coin named by its ticker is looked up among every Pons V2 launch: when several share it, the most traded one is taken, notes says so and coinChoices lists the others. No auth. |
POST /api/v1/telegram/check | Body { token }. Calls getMe and returns { ok, bot: { id, username, name } }. The token is not stored. |
POST /api/v1/bots | Body { token, config, leaseId }. The lease must be yours and live. Returns the bot with its startLink. |
GET /api/v1/bots | Your bots, with status, group, messages today and lease. |
GET /api/v1/bots/{id} | One bot. |
PATCH /api/v1/bots/{id} | Body { config }. Changes the settings; switching AI answers on needs an AI lease. |
POST /api/v1/bots/{id}/stop | Stops the bot now and returns { stopped, close: { to, data } }, the close(id) call your wallet sends to stop the meter. |
GET /api/v1/status | Latest block, bots live, leases open, worker health. |
SDK
One file, served by this site, for Node 20 or later:
curl -O https://www.botyard.org/sdk/botyard.mjsimport { Botyard } from "./botyard.mjs";
const by = new Botyard({ privateKey: process.env.KEY, site: "https://www.botyard.org" });
const p = await by.plan("Post every buy of 0x… over 0.01 ETH and welcome new members with a captcha", { days: 7 });
const { leaseId } = await by.openLease(p); // approve + open, signed by the key
const bot = await by.createBot({ token: process.env.BOT_TOKEN, config: p.config, leaseId });
console.log(bot.startLink); // open it to add the bot to the groupCLI
export BOTYARD_KEY=0x<private key>
export BOTYARD_SITE=https://www.botyard.org
node botyard.mjs help
node botyard.mjs plan "Post every buy of 0x… over 0.01 ETH and welcome new members with a captcha"
node botyard.mjs list
node botyard.mjs stop <id>The commands are plan, create, list, update, stop and mcp; help prints every option. The CLI reads the wallet key from BOTYARD_KEY and the site from BOTYARD_SITE, which defaults to this site.
MCP
node botyard.mjs mcp runs an MCP server over stdio with five tools: plan_bot, create_bot, list_bots, update_bot and stop_bot. In Claude Desktop:
{
"mcpServers": {
"botyard": {
"command": "node",
"args": ["/path/to/botyard.mjs", "mcp"],
"env": { "BOTYARD_KEY": "0x<private key of a wallet with a little ETH and USDG>", "BOTYARD_SITE": "https://www.botyard.org" }
}
}
}Use a wallet made for the agent, holding only what its bots need.