← Protocols
Bitte Protocol
01Description

Open-agent platform: agents are OpenAPI-spec'd Next.js services that the Bitte runtime invokes to execute multi-step onchain tasks across EVM and NEAR. Ships `make-agent` CLI for local dev/deploy and an MCP SSE endpoint so any MCP-compatible client can call Bitte tools.

02Best for
  • 01publish-once agents callable from Bitte runtime
  • 02OpenAPI-driven agent contracts
  • 03EVM + NEAR multi-step transactions
  • 04MCP-exposed onchain tools
  • 05Next.js boilerplate agents
03Install
  • git clone https://github.com/BitteProtocol/agent-next-boilerplate.git my-agent
  • cd my-agent && pnpm install
  • pnpm add -D make-agent concurrently
04Environment variables
VariableScopeDescription
BITTE_API_KEYServerAPI key from key.bitte.ai. Used by `make-agent` to register and authenticate the agent.
BITTE_RUNTIME_URLServerOptional — override default Bitte runtime endpoint when deploying to a custom env.
05Prompt snippet
Use Bitte Protocol to publish onchain agents as Next.js services. Start from `agent-next-boilerplate`, then expose an `/.well-known/ai-plugin.json` plus OpenAPI spec describing each tool route under `/api/tools/*`. Each tool route is a normal Next.js handler — implement the onchain logic (viem/ethers for EVM, NEAR API JS for NEAR) and return a JSON response that Bitte's runtime feeds back to the LLM. Use `concurrently "next dev" "make-agent dev --port 3000"` for local dev with the chat sandbox, then `next build && make-agent deploy` to publish. For MCP clients, point at `https://mcp.bitte.ai/sse` to call your tools without writing a custom client. Wallet operations are signed in the user's connected wallet, not the agent — the agent returns a transaction payload.
06Gotchas
  • OpenAPI spec is the contract — schema drift between the spec and tool handlers makes the LLM hallucinate or skip tools.
  • `make-agent dev` requires the dev server to be reachable on the declared port; firewalls or non-default ports break the sandbox loop.
  • Bitte signs in the user wallet by default, but custom flows that hold an agent EOA need explicit spend caps and per-tool allowlists.
  • Agents are public once deployed — never expose secrets through tool inputs/outputs; use server-side env vars only.
  • MCP SSE endpoint is a single multiplexed stream; long-running tools must heartbeat or the runtime times out.
  • Free `BITTE_API_KEY` is rate-limited; production agents need a paid key or self-hosted runtime.
07Alternatives