METABOTICS FOR DEVELOPERS

One prompt. Your soul, everywhere.

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.

Scoped credentialsREST + MCPVerifiable transport

From one prompt to a verified client.

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.

01

Choose

Select a software or gateway profile and an existing soul.

02

Install

Copy the one-time prompt or run the source installer.

03

Verify

Inspect the credential exchange, heartbeat, and trace.

Install from readable source

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.

Terminal · install → heartbeat → context
# 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 recall

The 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.

Connection API

MethodRoute under /api/v1Purpose
GET/connect/profilesPublished integration profiles and evidence
GET/connect/preflightStorage, model, hosting, and launcher readiness
GET/connect/manifest?profile=IDSource URLs and transport contract
POST/connect/sessionsOwner browser creates a one-time pairing grant
GET/connect/sessions/:idRead the persisted connection state
DELETE/connect/sessions/:idOwner revokes the grant and endpoint credential
POST/connect/redeemExchange pairing_code for one endpoint credential
POST/connect/heartbeatAuthenticate the endpoint credential
POST/connect/workbuddy-launchGet 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 Connect

A familiar assistant. A persistent soul.

The 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.

workbuddy.mcp.json · generated template
{
  "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.

MANUAL

Available without app registration

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 download
REGISTERED APP

Signed automatic launch

The 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 documentation

Your first continuous interaction

Download 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.

  1. CREATEDefine an identityA name and personality independent of its client.
  2. CONNECTRegister two endpointsBoth endpoints reference the same soul_id.
  3. INTERACTRecall shared memoryObserve the same memory in two contexts.
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);
}
Run from the extracted directory
# Node.js 22.13+
node --experimental-strip-types quickstart.ts

Set 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.

Small clients. An explicit contract.

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.

TypeScriptPythonOperation
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

API reference

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.

HTTP · POST /api/v1/interact
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.

MethodRouteScopePurpose
GET/bootstrapreadWorkspace, runtime mode, and recent records
GET/souls · /souls/:idreadList or retrieve an identity
POST/soulswriteCreate an identity
PATCH/souls/:idwriteUpdate name, personality, or system_prompt
DELETE/souls/:idwriteDelete a soul and its related records
GET/endpoints · /endpoints/:idreadList or retrieve registered endpoints
POST/endpointswriteRegister a virtual endpoint
PATCH/endpoints/:idwriteUpdate name, capabilities, or status
DELETE/endpoints/:idwriteRemove an endpoint and its private memories
GET/memories · /memories/:idreadList or retrieve stored memory
POST/memorieswriteWrite shared or endpoint-private memory
PATCH/memories/:idwriteUpdate memory content
DELETE/memories/:idwriteDelete a memory record
POST/interactinteractRetrieve context, check policy, and record a trace
GET/tracesreadRead the latest 80 interaction traces
POST/evaluatewriteRun the internal consistency suite
GET/exportreadExport workspace JSON with all traces
POST/mcpper toolJSON-RPC tool transport
GET/healthhost accessCheck the service and D1 connection

The response you can inspect

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 and limits

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.

Your workspace is the boundary.

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.

ScopeAllows
readWorkspace state, identities, memory, endpoints, traces, and export.
writeCreate, update, and remove data; run evaluation.
interactRun 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.

Give tools the same memory.

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.

POST /api/v1/mcp · initialize
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-03-26",
    "capabilities": {},
    "clientInfo": {
      "name": "my-client",
      "version": "1.0.0"
    }
  }
}
ToolScopeInput
souls_listread{}
memories_addwritesoul_id, content, scope?, endpoint_id?
context_recallreadsoul_id, endpoint_id, query?
interactinteractsoul_id, endpoint_id, message, action?
POST /api/v1/mcp · tools/call
{
  "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.

Choose the model. Keep the identity.

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.

Server environment · replace all placeholders
METABOTICS_LLM_BASE_URL=https://your-provider.example/v1
METABOTICS_LLM_MODEL=your-model-id
METABOTICS_LLM_API_KEY=your-provider-key

The 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.

A clear boundary for every body.

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.

POST /api/v1/endpoints
{
  "soul_id": "YOUR_SOUL_ID",
  "name": "My device gateway",
  "type": "robot",
  "capabilities": [
    "text",
    "memory",
    "speak",
    "gesture"
  ],
  "status": "connected"
}

What the platform handles

Persistent identity, shared or private context, endpoint declarations, policy checks, and a trace for each interaction.

What the adapter handles

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 integration

From a private workspace to your stack.

This 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.

Private hosting access

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.

Local development

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.

Reference runtime v2 · Updated November 26, 2026Back to quickstart