Choose
Select a software or gateway profile and an existing soul.
METABOTICS FOR DEVELOPERS
Connect an assistant or device gateway with a guided install prompt. Build further with scoped credentials, source SDKs, and the same API that powers the console.
Connect creates an endpoint, issues a short-lived pairing grant, and gives your coding assistant an executable installation brief. The server marks the connection verified only after an authenticated heartbeat. Opening a website or copying a prompt does not advance that state.
Select a software or gateway profile and an existing soul.
Copy the one-time prompt or run the source installer.
Inspect the credential exchange, heartbeat, and trace.
The connection bundle contains install.py, client.py, adapter.py, Perch / qīyi text adapters, and a WorkBuddy connector template. It needs Python 3.10+ and the standard library. Inspect the files first, then run the installer from the extracted directory. It writes a fresh session directory and will not overwrite an existing configuration.
# Unzip and inspect metabotics-connect.zip first.
# Requires Python 3.10+. macOS /usr/bin/python3 may be 3.9.
# Set PYTHON to a 3.10+ interpreter, e.g. PYTHON=python3.12
PYTHON="${PYTHON:-python3}"
# Set METABOTICS_BASE_URL to this deployment's accessible origin.
"$PYTHON" install.py \
--base-url "$METABOTICS_BASE_URL" \
--dest .metabotics/YOUR_SESSION_ID
# The installer securely prompts for your one-time pairing code.
"$PYTHON" .metabotics/YOUR_SESSION_ID/client.py heartbeat
"$PYTHON" .metabotics/YOUR_SESSION_ID/client.py remember "Integration test: I like jazz."
"$PYTHON" .metabotics/YOUR_SESSION_ID/client.py recallThe pairing code is valid for up to 15 minutes and can be redeemed once; an earlier sandbox expiry also applies. The resulting endpoint credential lasts at most seven days, inherits an earlier sandbox expiry, and can be revoked in Connect. Keep credentials.json, .env, and host-access.json outside source control; the installer creates a local .gitignore and restricted file permissions.
| Method | Route under /api/v1 | Purpose |
|---|---|---|
| GET | /connect/profiles | Published integration profiles and evidence |
| GET | /connect/preflight | Storage, model, hosting, and launcher readiness |
| GET | /connect/manifest?profile=ID | Source URLs and transport contract |
| POST | /connect/sessions | Owner browser creates a one-time pairing grant |
| GET | /connect/sessions/:id | Read the persisted connection state |
| DELETE | /connect/sessions/:id | Owner revokes the grant and endpoint credential |
| POST | /connect/redeem | Exchange pairing_code for one endpoint credential |
| POST | /connect/heartbeat | Authenticate the endpoint credential |
| POST | /connect/workbuddy-launch | Get a configured signed or manual WorkBuddy entry |
Session creation accepts soul_id, profile_id, endpoint_name, and optional capabilities. Its response includes session, pairing_code, install_prompt, and manifest. Redeeming the grant returns credential, session, manifest, and config. Keep the raw values at creation time; subsequent reads never return them.
Open ConnectThe WorkBuddy profile uses its published custom connector format: streamableHttp with an HTTPS MCP URL and an X-Metabotics-Key header. The downloaded template is a custom integration package, not a marketplace publication or an independently certified WorkBuddy installation.
{
"mcpServers": {
"metabotics": {
"type": "streamableHttp",
"url": "${API_BASE_URL}/api/v1/mcp",
"headers": {
"X-Metabotics-Key": "${METABOTICS_API_KEY}"
},
"timeout": 30000
}
}
}Set API_BASE_URL to the current deployment origin and METABOTICS_API_KEY to the endpoint credential issued by pairing. Use the generated local environment or WorkBuddy’s official credential input. The secret belongs in credential storage, not in a model prompt.
Copy the install prompt, open the official WorkBuddy website, install the app if needed, and paste the prompt into a task. Import the generated connector configuration.
Official website and downloadThe official HTTPS launcher requires registered app credentials and RSA signing. Connect checks the deployment configuration and otherwise returns the manual entry. A launch result never counts as a verified connection.
Official connector documentationDownload the source SDKs, keep their sdk/ directory beside your script, and create a read + write + interact key in the console. Set the origin and key in your server environment before running the example.
import { MetaboticsClient } from "./sdk/typescript/metabotics.ts";
const client = new MetaboticsClient({
baseUrl: process.env.METABOTICS_BASE_URL!,
apiKey: process.env.METABOTICS_API_KEY!,
});
const state = await client.getState();
console.log(state.runtime.mode);
const soul = await client.createSoul({
name: "Perch",
personality: "Curious, thoughtful, and quietly helpful.",
});
const web = await client.createEndpoint({
soul_id: soul.id,
name: "My web client",
type: "web",
capabilities: ["text", "memory"],
});
const mobile = await client.createEndpoint({
soul_id: soul.id,
name: "My mobile client",
type: "mobile",
capabilities: ["text", "memory"],
});
await client.addMemory({
soul_id: soul.id,
content: "I like jazz while I work.",
scope: "shared",
});
for (const endpoint of [web, mobile]) {
const result = await client.interact({
soul_id: soul.id,
endpoint_id: endpoint.id,
message: "What music do I like?",
});
console.log(endpoint.name, result.response);
console.log(result.trace.id, result.mode);
}# Node.js 22.13+
node --experimental-strip-types quickstart.tsSet METABOTICS_BASE_URL to your accessible deployment origin (without /api/v1) and METABOTICS_API_KEY to a key from that same deployment. Every run creates a new soul and two endpoints; keep the returned IDs to continue working with them.
The SDKs are distributed as source with this product. They are not published npm or PyPI packages. Both clients use the same application API, disable automatic write retries, and return structured errors.
A typed fetch client for Node.js 22.13+ and compatible server runtimes.
Python 3.10+ with no third-party runtime dependencies.
| TypeScript | Python | Operation |
|---|---|---|
| getState() | get_state() | Read workspace |
| createSoul(input) | create_soul(name, **options) | Create identity |
| createEndpoint(input) | create_endpoint(soul_id, name, **options) | Register endpoint |
| addMemory(input) | add_memory(soul_id, content, **options) | Persist memory |
| interact(input) | interact(soul_id, endpoint_id, message) | Run a traced interaction |
| evaluate() | evaluate() | Run functional checks |
| exportWorkspace() | export_workspace() | Download state |
All routes below are relative to /api/v1. Requests and responses use JSON. Mutations return the created or updated object; deletes return {"ok":true}. List access is scoped to the authenticated workspace.
curl "$METABOTICS_BASE_URL/api/v1/interact" \
-H "Content-Type: application/json" \
-H "X-Metabotics-Key: $METABOTICS_API_KEY" \
--data '{
"soul_id": "YOUR_SOUL_ID",
"endpoint_id": "YOUR_ENDPOINT_ID",
"message": "What do you remember about me?"
}'Direct HTTP clients must send a descriptive User-Agent. Cloudflare rejects the default Python-urllib signature with HTTP 403; requests, curl and the packaged client are unaffected.
| Method | Route | Scope | Purpose |
|---|---|---|---|
| GET | /bootstrap | read | Workspace, runtime mode, and recent records |
| GET | /souls · /souls/:id | read | List or retrieve an identity |
| POST | /souls | write | Create an identity |
| PATCH | /souls/:id | write | Update name, personality, or system_prompt |
| DELETE | /souls/:id | write | Delete a soul and its related records |
| GET | /endpoints · /endpoints/:id | read | List or retrieve registered endpoints |
| POST | /endpoints | write | Register a virtual endpoint |
| PATCH | /endpoints/:id | write | Update name, capabilities, or status |
| DELETE | /endpoints/:id | write | Remove an endpoint and its private memories |
| GET | /memories · /memories/:id | read | List or retrieve stored memory |
| POST | /memories | write | Write shared or endpoint-private memory |
| PATCH | /memories/:id | write | Update memory content |
| DELETE | /memories/:id | write | Delete a memory record |
| POST | /interact | interact | Retrieve context, check policy, and record a trace |
| GET | /traces | read | Read the latest 80 interaction traces |
| POST | /evaluate | write | Run the internal consistency suite |
| GET | /export | read | Export workspace JSON with all traces |
| POST | /mcp | per tool | JSON-RPC tool transport |
| GET | /health | host access | Check the service and D1 connection |
An interaction returns response, mode, soul, endpoint, memories, trace, and action. The mode is memory_replay unless a server model is configured for an authenticated account. The trace contains identity, memory, policy, generation or replay, and action-receipt steps.
Errors use {error:{code,message}}. Expect 401 for missing or expired credentials, 403 for scope or origin rejection, 404 for unavailable resources, 409 for limits or identity-version conflicts, 415 for non-JSON writes, and 429 for request limits. Inspect the response before retrying a write.
Current workspace bounds: 25 souls, 100 endpoints, 1,000 memories, 25 API keys, 20 applications, and 5,000 traces. The general rate limit is 180 requests/minute, interactions 30/minute, and evaluations 4/minute per workspace. JSON request bodies are limited to 24 KB.
Browser requests use the signed-in account identity supplied by the hosting platform, or an isolated, expiring sandbox session. API clients use X-Metabotics-Key. Keys are created and revoked in the console; an API key cannot create another key.
| Scope | Allows |
|---|---|
read | Workspace state, identities, memory, endpoints, traces, and export. |
write | Create, update, and remove data; run evaluation. |
interact | Run a traced interaction with a soul and endpoint. |
Workspace API keys (mb_) have the selected permissions across their workspace. Paired endpoint credentials (mbe_) are restricted to one soul and one endpoint: permitted context, memory append, interaction, and heartbeat. They cannot create souls, manage keys, export the workspace, or edit and delete historic memories.
POST JSON-RPC 2.0 requests to /api/v1/mcp with a workspace API key or paired endpoint credential. The server implements initialize, ping, notifications/initialized, tools/list, and tools/call. It returns JSON responses; it does not expose an SSE event stream or claim compatibility with every MCP client.
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-03-26",
"capabilities": {},
"clientInfo": {
"name": "my-client",
"version": "1.0.0"
}
}
}| Tool | Scope | Input |
|---|---|---|
souls_list | read | {} |
memories_add | write | soul_id, content, scope?, endpoint_id? |
context_recall | read | soul_id, endpoint_id, query? |
interact | interact | soul_id, endpoint_id, message, action? |
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "context_recall",
"arguments": {
"soul_id": "YOUR_SOUL_ID",
"endpoint_id": "YOUR_ENDPOINT_ID",
"query": "music"
}
}
}Tool results carry JSON inside result.content[0].text. Check result.isError before using the result. The same ownership and memory-scope checks apply to REST and MCP.
The default runtime replays actual stored memory without an external model call. To enable generation, the deployment operator configures all three server-only variables for an OpenAI-compatible chat-completions provider.
METABOTICS_LLM_BASE_URL=https://your-provider.example/v1
METABOTICS_LLM_MODEL=your-model-id
METABOTICS_LLM_API_KEY=your-provider-keyThe base URL must use HTTPS. The service calls {base_url}/chat/completions, sends the soul instructions, permitted memory records, and current message, and records the provider outcome. Anonymous sandboxes remain in memory_replay even when a provider is configured.
Configure provider keys through your deployment's secret management. They are never entered into the public playground, stored in client code, or included in workspace exports.
The current API registers endpoints and simulates allowed capability requests. Physical device transport, firmware, audio streaming, motion control, and real execution receipts must be integrated in a device adapter and verified with that device.
The Connect bundle supplies DeviceAdapter.capabilities(), DeviceAdapter.execute(), and ExecutionReceipt. Its simulator returns status: simulated with hardware_verified: false. Hardware mode returns ADAPTER_REQUIRED until you implement and validate a vendor driver. Reachy Mini and 小智 / ESP32 require vendor device adapters. Perch has a separate text-only REST adapter, and qīyi has its own Core SSE adapter. Both need a configured local runtime and separate token, and neither executes device actions.
{
"soul_id": "YOUR_SOUL_ID",
"name": "My device gateway",
"type": "robot",
"capabilities": [
"text",
"memory",
"speak",
"gesture"
],
"status": "connected"
}Persistent identity, shared or private context, endpoint declarations, policy checks, and a trace for each interaction.
Input capture, device authentication, protocol translation, actual hardware execution, and independently verified results.
The reference policy allows declared text, memory, speak, gesture, and display actions. Unsupported or paused endpoint requests are blocked. Every accepted action currently returns status: simulated; no accepted request is evidence of physical execution.
Propose a device integrationThis build uses React, the Vinext app router, a Cloudflare Worker, and D1 persistence. Source, schema migrations, SDKs, and verification scripts are part of the project. The browser experience and API share the same backend.
An application API key and the hosting access gate are separate layers. On the private hosted Site, external CLI or SDK calls still need access authorized by the hosting platform. The SDK accessHeaders option can carry already-authorized provider headers; it does not create permission or bypass the gate. Never supply or forge the platform's identity headers.
Use Node.js 22.13 or later. Install dependencies, build the Worker, apply the supplied D1 migrations to the local database, then start the local runtime. The exact migration filename and setup commands are documented in the source README. Create a local API key in that local console; hosted keys do not authenticate to your local database.
HTTPS is required for remote SDK origins; HTTP is permitted for loopback development. Public or self-hosted deployments must preserve trusted identity-header injection and strip client-supplied identity headers at their boundary.