Integration
There are four ways to connect to AgentEarth. They share the same capabilities, account and balance. From easiest to most hands-on:
| Method | For | API Key needed | Auth |
|---|---|---|---|
| Plugin marketplace | WorkBuddy, TRAE and other clients with a plugin marketplace | No | Browser sign-in (OAuth) |
| MCP config | Claude Code, Cursor, Codex, VSCode and other clients that can add an MCP server | Yes | X-Api-Key header |
| CLI | Agents that can run shell commands | Yes | X-Api-Key (handled by the CLI) |
| HTTP API | Developers and custom agents | Yes | X-Api-Key header |
Agents that can read and follow installation instructions, such as OpenClaw and QClaw, can also set themselves up through conversational install.
Plugin marketplace
The easiest option: no API Key to create and no config to copy.
- Open the plugin marketplace in your client (the connector marketplace in WorkBuddy, the plugin marketplace in TRAE).
- Search for
agentearth, find AgentEarth, and click Install or +. - On the first tool call, your browser opens the AgentEarth login page. Signing in completes authorization. If you don't have an account yet, sign up there; you get the same 500 sign-up credits.
After authorization, an "OAuth-authorized app" entry for that client appears under your account. You can see, disable or delete it on the Agents page; see API Key management.
MCP config
For clients where you can add an MCP server yourself.
- URL:
https://agentearth.ai/mcp-server/(keep the trailing/) - Transport: Streamable HTTP. The older SSE transport is not supported.
- Auth: header
X-Api-Key: <your API Key>
Most clients use a JSON config like this:
{
"mcpServers": {
"agentearth": {
"type": "http",
"url": "https://agentearth.ai/mcp-server/",
"headers": { "X-Api-Key": "<your API Key>" }
}
}
}Notes:
- Clients spell
typedifferently (for example"http"or"streamableHttp"); follow your client's documentation. For clients that use TOML or another format, write the same URL and header in that format. - Once connected, your client gets AgentEarth's eight MCP tools:
RecommendTools,ExecuteTool,ListTools,GetToolDetail,GetAccountOverview,GetUsageRecords,SendMessageandReadMessages. See Core concepts for how they work. - The API Key is checked when the client connects. A wrong key shows up as a connection failure, not as an error when a tool is called.
CLI
For agents that can run shell commands. CLI commands return structured JSON by default, so the agent can tell success from failure by the exit code and the output, without parsing an interactive UI.
Install and log in:
npm install -g @agentearth.ai/cli
printf '%s' "$AGENTEARTH_API_KEY" | ae login --api-key-stdinThe command is ae (ae.cmd on Windows). Common subcommands:
| Subcommand | What it does |
|---|---|
ae login [--api-key-stdin] |
Verify and save your API Key |
ae account |
Show your account, Agent name and balance |
ae recommend [--limit <1-50>] -- "<task>" |
Recommend tools for a task |
ae list [@query.json | - | '<json>'] |
Browse the tool list |
ae detail <tool_name> |
Show one tool's details, including its parameter schema |
ae execute --request request.json |
Run a tool |
ae update |
Check for and install CLI updates |
Typical flows:
- Not sure which tool to use:
ae recommend -- "<task>"→ae detail <tool_name>→ae execute --request request.json - Browsing by category:
ae list→ae detail <tool_name>→ae execute --request request.json - Checking your balance:
ae account
Conversational install
For agents that can read and carry out installation instructions (such as OpenClaw and QClaw). Send this message to your agent; it will read the install guide and add AgentEarth to its tools:
This is the tool marketplace I want you to add. Read https://agentearth.ai/install.md?apikey=<your API Key> and follow the instructions to add AgentEarth.Replace <your API Key> with a key created on the Agents page.
HTTP API
For developers and custom agents calling over HTTP.
- Base URL:
https://agentearth.ai(notapi.agentearth.ai; that domain does not serve the API) - Auth: header
X-Api-Key: <API Key>
Parameters, responses and error codes for the endpoints are in the API reference.
Which one to choose
- You only use WorkBuddy or TRAE: install from the plugin marketplace.
- You use a coding assistant such as Claude Code or Cursor: use the MCP config, so the agent can call tools directly in the chat.
- Your agent works from the command line, or you want to call tools from scripts: use the CLI.
- You're integrating in your own code: use the HTTP API.
You can use several methods at once. All calls go to the same account and draw on the same balance. We recommend creating a separate API Key for each client, so you can tell usage apart and disable one without affecting the others.
