Why OpenClaw Is More Than an AI Assistant – Your Personal AI Infrastructure
This article walks through configuring OpenClaw as a personal AI infrastructure, covering session isolation, multi‑agent and Feishu bot setups, exposing a standard OpenAI‑compatible API, and automating tasks with custom skills and scheduled jobs.
Introduction
OpenClaw is presented as a personal AI infrastructure rather than a simple chat assistant. The author updates recent experiences, noting that the latest official version integrates a built‑in Feishu plugin, adds new model integrations, and releases daily updates that can be applied with npm install -g openclaw@latest or openclaw update.
1. Session Isolation
When multiple users share a single Feishu bot, messages are merged into one session, which is undesirable for distinct user contexts. OpenClaw’s session.dmScope configuration controls isolation strategies. The recommended per‑channel‑peer strategy isolates sessions by channel and sender ID.
main (default): shared session for continuity.
per‑peer : isolates by sender ID across channels.
per‑channel‑peer : isolates by channel + sender (recommended for multi‑user inboxes).
per‑account‑channel‑peer : isolates by account + channel + sender (recommended for multi‑account inboxes).
Setting session.identityLinks maps provider‑prefixed peer IDs to canonical identities, allowing the same person to share sessions across channels when needed.
2. Multi‑Agent and Multi‑Feishu Bot Setup
OpenClaw’s session key format consists of three parts: scenario identifier, agent identifier, and session scope. By assigning different agentId values, separate workspaces are created on disk, enabling distinct personal assistants for life, work, entertainment, etc.
Examples of session keys: agent:mainKey – default continuous session across devices. agent:<agentId>:dm:<peerId> – per‑peer isolation. agent:<agentId>:<channel>:dm:<peerId> – per‑channel‑peer isolation.
Configuration screenshots illustrate how to map each Feishu robot to a specific agentId and channel, creating independent AI assistants.
3. Exposing OpenClaw via an OpenAI‑Compatible Interface
OpenClaw provides a local gateway at http://127.0.0.1:18789/v1/chat/completions that follows the OpenAI API schema. To use it, set the gateway token as the API key and include the headers x-openclaw-session-key and x-openclaw-agent-id to target a specific agent and session.
curl --location --request POST 'http://127.0.0.1:18789/v1/chat/completions' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--header 'x-openclaw-session-key: agent:haizei002-agentid:00000000001' \
--header 'x-openclaw-agent-id: haizei002-agentid' \
--data-raw '{
"model": "openclaw",
"messages": [{"role": "user", "content": "查询下北京今天的天气"}]
}'Postman tests confirm that the API returns chat completions and that conversation logs appear in OpenClaw’s backend UI.
4. Automation and Custom Skills
OpenClaw can proactively send messages to Feishu, enabling scheduled tasks and skill execution without user prompts. The author demonstrates creating a cron job that posts a weather query, which appears in the Feishu chat after execution.
OpenClaw can also install and run custom skills from the Skills.sh marketplace, such as:
NanoBananaPro image generation (requires APIYI_API_KEY).
PDF‑to‑image conversion.
Juejin article ranking retrieval.
Installation is performed via the find-skills command, e.g.:
帮我通过find-skills安装这三个技能:nano-banana-pro-image-gen、pdf-to-image-preview、juejin-article-trendsAfter installation, the assistant can generate images, convert PDFs, and fetch Juejin trends, with results displayed in Feishu and screenshots showing successful execution.
Summary of Core Capabilities
Session Isolation – prevents cross‑user message mixing.
Agent Workspaces – supports multiple independent AI assistants.
OpenAI‑compatible Interface – allows any system to call OpenClaw as a standard AI service.
IM Proactive Push – enables the assistant to initiate messages and automate workflows.
Combined, these features transform OpenClaw from a simple chatbot into a plug‑and‑play personal AI infrastructure that can be integrated into scripts, custom UIs, or other business systems.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Ubiquitous Tech
A ubiquitous public account for pirate enthusiasts, regularly sharing curated experiences, tech learning, and growth insights. Currently publishing articles on AI RAG customer service, AI MCP technology, and open-source design. Personal free Knowledge Planet: Awakening New World Programmer.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
