Interested in an on-premise deployment or AI transformation? Calculate your AI costs. Call/text 📞 (571) 293-0242

Platform Integration

Connect your claw server to ibl.ai and manage it through the platform's APIs and applications.

Source: github.com/iblai/iblai-claw-setup

Once connected, your claw instance is accessible from all ibl.ai applications -- Mentor AI, Skills AI, and any custom integration using the REST API. You register the server, bind mentors, configure agent identities and skills, and push configuration -- all through the same API that powers the ibl.ai platform UI.


Integration Flow

1. Register instance        POST claw/instances/
2. Test connectivity        POST claw/instances//test-connectivity/
3. Add model providers      POST claw/model-providers/
4. Push providers           POST claw/instances//push-providers/
5. Bind mentor              POST claw/mentor-configs/
6. Configure agent          PATCH agent-configs//
7. Create skills            POST agent-skills/  +  POST agent-skill-resources/
8. Assign skills            POST mentor-skill-assignments/
9. Push config              POST claw/mentor-configs//push-config/

All API calls use base path /api/ai-mentor/orgs// and require authentication.


Part 1: Connect Your Server to ibl.ai

Register your instance

POST /api/ai-mentor/orgs//claw/instances/
Content-Type: application/json

{
  "name": "My OpenClaw Instance",
  "claw_type": "openclaw",
  "server_url": "https://your-domain.example.com",
  "gateway_token": "your-gateway-token-from-setup"
}
FieldTypeDescription
namestringDisplay name for this instance
claw_typestringInstance type (e.g. "openclaw")
server_urlstringHTTPS URL of your claw server
gateway_tokenstringWrite-only. The token from server setup step 1.3
auth_headersobjectWrite-only. Optional proxy auth headers ({"string": "string"} pairs)
connection_paramsobjectWrite-only. Variant-specific auth (e.g. device identity key for OpenClaw -- see below)

Device identity (required for OpenClaw): The platform needs an Ed25519 keypair for device identity signing. Without it, config push will fail with "missing scope: operator.read". Generate a keypair and include it in connection_params:

{
  "device_identity": {
    "private_key_pem": "-----BEGIN PRIVATE KEY-----\n\n-----END PRIVATE KEY-----\n"
  }
}

See server setup step 5.2 for how to generate the keypair.

Save the id from the response -- you'll need it for subsequent steps.

Response (201 Created):

{
  "id": 1,
  "name": "My OpenClaw Instance",
  "claw_type": "openclaw",
  "provision_mode": "self_hosted",
  "server_url": "https://your-domain.example.com",
  "deployment_backend": null,
  "status": "active",
  "deploy_state": "ready",
  "platform_key": "your-org",
  "last_health_check": null,
  "last_health_status": null,
  "claw_version": null,
  "created_at": "2026-03-18T10:00:00Z",
  "updated_at": "2026-03-18T10:00:00Z"
}

Write-only fields (gateway_token, auth_headers, connection_params) are never returned in responses.

Test connectivity

POST /api/ai-mentor/orgs//claw/instances//test-connectivity/

Response (200 OK):

{
  "checks": [
    {"name": "tls_reachable", "passed": true, "detail": "200 OK"},
    {"name": "health_check", "passed": true, "detail": "healthy"}
  ],
  "all_passed": true
}

If tls_reachable fails: check your domain DNS and Caddy config. If health_check fails: check that the OpenClaw gateway is running (systemctl --user status openclaw-gateway).

Other instance operations

EndpointMethodDescription
claw/instances/GETList all instances. Filters: status, search.
claw/instances//GETRetrieve instance details
claw/instances//PATCHUpdate instance (writable: name, claw_type, server_url, gateway_token, auth_headers, connection_params, deployment_backend)
claw/instances//DELETEDelete instance
claw/instances//health-check/POSTRun health check. Updates last_health_check and last_health_status.
claw/instances//push-providers/POSTPush all enabled model providers to the instance
claw/instances//security-audit/POSTRun security audit (OpenClaw only)
claw/instances//refresh-version/POSTDetect claw version from instance handshake

Instance status values: active, inactive, error Deploy state values: pending, deploying, ready, teardown, failed


Part 2: Configure and Call from ibl.ai

Once your server is registered, you manage everything through the ibl.ai API. This means all ibl.ai applications -- Mentor AI chat, Skills AI, custom integrations -- can use your claw instance. Configuration, agent identities, skills, and model providers are all pushed from the platform to your server.

Set up a model provider (optional)

If you want to use a different LLM provider (e.g. OpenRouter) instead of the default Anthropic:

POST /api/ai-mentor/orgs//claw/model-providers/
Content-Type: application/json

{
  "server": 1,
  "name": "openrouter",
  "base_url": "https://openrouter.ai/api/v1",
  "api_type": "openai-completions",
  "credential_name": "openrouter",
  "credential_key": "key",
  "model_catalog": [
    {"id": "anthropic/claude-sonnet-4-6", "name": "Claude Sonnet"},
    {"id": "meta-llama/llama-3.2-3b-instruct:free", "name": "Llama 3.2 (free)"}
  ],
  "enabled": true,
  "models_mode": "merge"
}
FieldTypeDescription
serverintegerClaw instance ID
namestringProvider name
base_urlstringProvider API base URL
api_typestring"openai-completions" or provider-specific type
credential_namestringReferences an LLMCredential by name on the platform
credential_keystringJSON key within the credential value that contains the API key
model_catalogarrayList of {"id": "model-id", "name": "display name"} entries
models_modestring"merge" (adds to built-in models) or "replace" (uses only configured providers)

Then push providers to the instance:

POST /api/ai-mentor/orgs//claw/instances//push-providers/

Response (202 Accepted):

{"queued": true, "message": "Provider push queued."}

The credential_resolved field in provider responses indicates whether an LLMCredential with the given credential_name exists on the platform.

Bind a mentor to the instance

POST /api/ai-mentor/orgs//claw/mentor-configs/
Content-Type: application/json

{
  "mentor": "",
  "server": 1,
  "enabled": true
}

This automatically creates an AgentConfig for the mentor if one doesn't exist.

Response (201 Created):

{
  "id": 1,
  "mentor": "6f29a5eb-c657-4a76-8a19-4ea58175d008",
  "server": 1,
  "server_name": "My OpenClaw Instance",
  "agent_config": {},
  "enabled": true,
  "auto_push": false,
  "last_config_push": null,
  "last_config_push_status": null,
  "last_push_warnings": []
}
EndpointMethodDescription
claw/mentor-configs/GETList bindings. Filter: enabled.
claw/mentor-configs//GETRetrieve binding
claw/mentor-configs//PATCHUpdate binding
claw/mentor-configs//DELETEDelete binding
claw/mentor-configs//push-config/POSTPush configuration to the instance

Configure the agent

Agent configuration defines the workspace files and settings that get pushed to the claw instance. Each text field maps to a markdown file in the agent's workspace:

PATCH /api/ai-mentor/orgs//agent-configs//
Content-Type: application/json

{
  "identity": "Name: Study Buddy\nVibe: Friendly and patient",
  "soul": "Always encourage the student. Be concise.",
  "model": "anthropic/claude-sonnet-4-6"
}
FieldTypePushed asDescription
identitytextIDENTITY.mdAgent persona -- name, visual description, vibe
soultextSOUL.mdBehavioral guidelines -- personality, values, boundaries
user_contexttextUSER.mdUser-specific environment details
toolstextTOOLS.mdEnvironment-specific reference notes for tool usage
agentstextAGENTS.mdMulti-agent routing configuration
bootstraptextBOOTSTRAP.mdOne-time first-run instructions (consumed after use)
heartbeattextHEARTBEAT.mdPeriodic awareness checklist content
memorytextMEMORY.mdSeed memory -- long-term curated facts
modelstringconfig.patchLLM model identifier
configJSONconfig.patchInstance settings (heartbeat schedule, session isolation, skill toggles)

All text fields are optional and default to empty string. The config field defaults to {}.

Blocked config paths (rejected on write): gateway.auth, gateway.controlUi.dangerouslyDisableDeviceAuth, tools.exec.host, sandbox.mode, hooks.allowUnsafeExternalContent.

Push configuration to the instance

POST /api/ai-mentor/orgs//claw/mentor-configs//push-config/

Response (202 Accepted):

{"queued": true, "message": "Config push queued."}

A successful push sets workspace files (IDENTITY.md, SOUL.md, etc.) and applies config patches on the instance. The gateway restarts itself after a config patch.

Device pairing

The first time the platform pushes config, the instance may require device pairing approval. If the push fails with a pairing error:

  1. SSH into your server
  2. Run: openclaw devices list
  3. Find the pending request and approve it: openclaw devices approve

This only needs to be done once per platform connection. See Device Re-Pairing if pairing is lost after updates.


Skills Management

Skills are reusable capabilities that can be assigned to mentors. When config is pushed, enabled skill assignments are sent to the instance.

Create a skill

POST /api/ai-mentor/orgs//agent-skills/
Content-Type: application/json

{
  "name": "Web Research",
  "slug": "web-research",
  "description": "Research topics using web search",
  "version": "1.0.0",
  "instruction": "## Instructions\n1. Search for the topic\n2. Summarize key findings\n3. Cite sources",
  "metadata": {
    "openclaw": {
      "requires": {"bins": ["curl"]}
    }
  },
  "enabled": true
}
FieldTypeDescription
namestringDisplay name
slugstringUnique identifier per platform
instructiontextThe SKILL.md body (agent runbook)
metadataJSONSKILL.md frontmatter (requirements, env vars, etc.)

Add resources to a skill

Skills can have attached files -- scripts, references, or binary assets:

For scripts and references (text content):

POST /api/ai-mentor/orgs//agent-skill-resources/
Content-Type: application/json

{
  "skill": 1,
  "file_type": "script",
  "filename": "fetch_data.py",
  "content": "import requests\n\ndef fetch(url):\n    return requests.get(url).text"
}

For assets (binary files): Use multipart form with a file field instead of content.

File typeContentDescription
scripttext (content field)Executable scripts
referencetext (content field)Reference documents
assetbinary (file field)Binary assets

Assign skills to mentors

POST /api/ai-mentor/orgs//mentor-skill-assignments/
Content-Type: application/json

{
  "mentor": "",
  "skill": 1,
  "enabled": true
}

A mentor can only be assigned to the same skill once. Enabled assignments are pushed as skills.entries when you push config.

EndpointMethodDescription
agent-skills/GETList skills. Filters: enabled, search.
agent-skills//GET/PATCH/DELETEManage a skill
agent-skill-resources/GETList resources. Filters: file_type, skill.
agent-skill-resources//GET/PATCH/DELETEManage a resource
mentor-skill-assignments/GETList assignments. Filters: enabled, skill, mentor.
mentor-skill-assignments//GET/PATCH/DELETEManage an assignment

Complete Example

Here's a full walkthrough: register a server, bind a mentor, configure it, and push.

1. Register the instance

curl -X POST https://platform.ibl.ai/api/ai-mentor/orgs/my-org/claw/instances/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Token YOUR_API_TOKEN" \
  -d '{
    "name": "Production OpenClaw",
    "claw_type": "openclaw",
    "server_url": "https://claw.mycompany.com",
    "gateway_token": "abc123..."
  }'
# Save the returned "id" (e.g. 1)

2. Test connectivity

curl -X POST https://platform.ibl.ai/api/ai-mentor/orgs/my-org/claw/instances/1/test-connectivity/ \
  -H "Authorization: Token YOUR_API_TOKEN"
# Both checks should pass

3. Bind a mentor

curl -X POST https://platform.ibl.ai/api/ai-mentor/orgs/my-org/claw/mentor-configs/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Token YOUR_API_TOKEN" \
  -d '{
    "mentor": "6f29a5eb-c657-4a76-8a19-4ea58175d008",
    "server": 1,
    "enabled": true
  }'
# Save the returned "id" (e.g. 1)

4. Configure the agent

curl -X PATCH https://platform.ibl.ai/api/ai-mentor/orgs/my-org/agent-configs/1/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Token YOUR_API_TOKEN" \
  -d '{
    "identity": "Name: Study Buddy\nVibe: Friendly and patient tutor",
    "soul": "Always encourage the student. Never give answers directly. Be concise.",
    "model": "anthropic/claude-sonnet-4-6",
    "config": {
      "heartbeat": {"every": "30m"},
      "session": {"dmScope": "per-channel-peer"}
    }
  }'

5. Push config

curl -X POST https://platform.ibl.ai/api/ai-mentor/orgs/my-org/claw/mentor-configs/1/push-config/ \
  -H "Authorization: Token YOUR_API_TOKEN"
# Response: {"queued": true, "message": "Config push queued."}

6. Approve device pairing (first time only)

# SSH into your claw server
ssh root@claw.mycompany.com
openclaw devices list
openclaw devices approve 

7. Chat

Open the mentor in any ibl.ai application and send a message. Responses stream from your OpenClaw instance through the platform to the user.


API Reference Summary

All endpoints are tenant-scoped under /api/ai-mentor/orgs//. Responses are JSON. List endpoints support limit and offset pagination.

Claw Instances

MethodEndpointDescription
POSTclaw/instances/Create instance
GETclaw/instances/List instances
GETclaw/instances//Retrieve instance
PATCHclaw/instances//Update instance
DELETEclaw/instances//Delete instance
POSTclaw/instances//test-connectivity/Test connectivity
POSTclaw/instances//health-check/Run health check
POSTclaw/instances//push-providers/Push model providers
POSTclaw/instances//security-audit/Security audit (OpenClaw only)
POSTclaw/instances//refresh-version/Detect claw version

Mentor Configs

MethodEndpointDescription
POSTclaw/mentor-configs/Create binding
GETclaw/mentor-configs/List bindings
GETclaw/mentor-configs//Retrieve binding
PATCHclaw/mentor-configs//Update binding
DELETEclaw/mentor-configs//Delete binding
POSTclaw/mentor-configs//push-config/Push configuration

Agent Configs

MethodEndpointDescription
POSTagent-configs/Create config
GETagent-configs/List configs
GETagent-configs//Retrieve config
PATCHagent-configs//Update config
DELETEagent-configs//Delete config

Agent Skills

MethodEndpointDescription
POSTagent-skills/Create skill
GETagent-skills/List skills
GETagent-skills//Retrieve skill
PATCHagent-skills//Update skill
DELETEagent-skills//Delete skill

Skill Resources

MethodEndpointDescription
POSTagent-skill-resources/Create resource
GETagent-skill-resources/List resources
GETagent-skill-resources//Retrieve resource
PATCHagent-skill-resources//Update resource
DELETEagent-skill-resources//Delete resource

Mentor Skill Assignments

MethodEndpointDescription
POSTmentor-skill-assignments/Create assignment
GETmentor-skill-assignments/List assignments
GETmentor-skill-assignments//Retrieve assignment
PATCHmentor-skill-assignments//Update assignment
DELETEmentor-skill-assignments//Delete assignment

Model Providers

MethodEndpointDescription
POSTclaw/model-providers/Create provider
GETclaw/model-providers/List providers
GETclaw/model-providers//Retrieve provider
PATCHclaw/model-providers//Update provider
DELETEclaw/model-providers//Delete provider

Copyright © ibl.ai | support@iblai.zendesk.com