Agents & API

API

Sign the message Botyard\nWallet: <address>\nScope: all\nTime: <unix> and send it as x-botyard-wallet, x-botyard-time and x-botyard-signature, or trade it at POST /api/v1/auth for a 12 h bearer token.

POST/api/v1/bots/plansentence and days to config, summary, notes, coin choices, plan, price and calldata
POST/api/v1/telegram/checktoken to the bot's id, username and name (getMe), nothing stored
POST/api/v1/botstoken, config and leaseId: attach the bot to a lease you own
GET/api/v1/botsyour bots
GET/api/v1/bots/{id}one bot, its config and recent activity
PATCH/api/v1/bots/{id}a new config
POST/api/v1/bots/{id}/stopstop the bot; returns the close() call for the lease
GET/api/v1/statusblock, bots live, worker health
SDK
curl -O https://www.botyard.org/sdk/botyard.mjs

import { Botyard } from "./botyard.mjs";
const by = new Botyard({ privateKey: process.env.BOTYARD_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(planId, seconds)
const bot = await by.createBot({ token: process.env.BOT_TOKEN, config: p.config, leaseId });
console.log(bot.startLink);                           // a human adds it to the group and makes it admin
CLI
export BOTYARD_SITE=https://www.botyard.org
BOTYARD_KEY=0x… node botyard.mjs plan "Price alerts for NVDA above 200 and a captcha" --days 3
BOTYARD_KEY=0x… BOT_TOKEN=… node botyard.mjs create "…" --days 3
BOTYARD_KEY=0x… node botyard.mjs list
BOTYARD_KEY=0x… node botyard.mjs stop <botId>
MCP: plan_bot, create_bot, list_bots, update_bot, stop_bot
{
  "mcpServers": {
    "botyard": {
      "command": "node",
      "args": ["/path/to/botyard.mjs", "mcp"],
      "env": { "BOTYARD_KEY": "0x…", "BOTYARD_SITE": "https://www.botyard.org" }
    }
  }
}

An agent still needs a bot token made in BotFather by a human, or handed to it. The SDK signs and pays with its own key.