OpenClaw - Self-Hosted AI Smart Assistant Platform
OpenClaw Tutorial — Install OpenClaw, integrate with AIGC558, and quickly set up a self-hosted AI assistant. An open-source project supporting multi-channel integration like Telegram, Discord, WhatsApp.
Project Introduction
OpenClaw is an open-source, self-hosted personal AI assistant platform that connects messaging apps to AI agents running on your own hardware. Designed for developers and advanced users, it allows you to have an autonomous AI assistant without giving up control of your data.
- Official Homepage: https://openclaw.ai
- Project Documentation: https://docs.openclaw.ai
- GitHub: https://github.com/openclaw/openclaw
OpenClaw is completely open source. You can browse the source code, submit issues, or contribute at OpenClaw's GitHub repository. This tutorial covers the complete steps for installation, configuration, and integrating OpenClaw with AIGC558.
🌟 Core Features
Multi-Channel Integration
- Multi-channel integration: Supports various messaging channels like Telegram, Discord, WhatsApp, iMessage, and can be extended to more platforms via plugins.
- Single Gateway: Unified management of all channels through a single Gateway process.
- Voice Support: Supports macOS/iOS/Android voice interaction.
- Canvas Interface: Capable of rendering interactive Canvas interfaces.
Self-Hosting and Data Security
- Fully Self-Hosted: Runs on your own machine or server.
- Open Source & Transparent: MIT open-source license, fully transparent code.
- Data Localization: Context and skills are stored on your local computer, not in the cloud.
Smart Agent Capabilities
- Continuous Operation: Supports persistent background operation with long-term memory.
- Scheduled Tasks: Supports cron-based scheduled tasks.
- Session Isolation: Isolates sessions by agent/workspace/sender.
- Multi-Agent Routing: Supports collaborative work among multiple agents.
- Tool Calling: Native support for tool calling and code execution.
📦 Pre-integration Preparation
Preparation Information
- Node.js 22 or higher
- An available AIGC558 address (usually ending with
/v1) - An available AIGC558 API Key
Before integrating with AIGC558, it's recommended to first get the Gateway and Control UI running according to OpenClaw's currently recommended official process. This makes it easier to distinguish whether OpenClaw itself hasn't started or if the model provider configuration is incorrect when troubleshooting later.
1. Install OpenClaw (macOS/Linux)
curl -fsSL https://openclaw.ai/install.sh | bashFor other installation methods, refer to the OpenClaw official documentation: Getting Started.
2. Run the Onboarding Wizard
openclaw onboard --install-daemonThis wizard completes basic authentication, Gateway setup, and optional channel initialization. The goal here is to get OpenClaw running first, then switch the default model to AIGC558 later.
3. Check Gateway and Control UI
openclaw gateway statusopenclaw dashboardIf your browser can open the Control UI, it means OpenClaw's basic operation is normal. At this stage, there's no need to configure messaging channels like Telegram, Discord, or Feishu yet.
4. Locate the Configuration File
OpenClaw's configuration file is usually located at ~/.openclaw/openclaw.json. You can continue to modify it based on what the onboarding wizard generates.
Path-Related Environment Variables
If you run OpenClaw under a dedicated service account, or wish to customize the configuration/state directory, you can use:
OPENCLAW_HOMEOPENCLAW_STATE_DIROPENCLAW_CONFIG_PATH
For detailed explanations, see the official environment variables documentation: Environment Variables.
🚀 Using AIGC558 as a Model Provider
OpenClaw supports integrating custom or OpenAI-compatible model gateways via models.providers. For AIGC558, the most common approach is to add it as a custom provider to the configuration, then point the default model to aigc558/MODEL_ID.
Integration Approach
- Declare a
aigc558provider undermodels.providers. - Point
baseUrlto your AIGC558 address, ensuring it includes/v1. - Set
apitoopenai-completions. - List the model IDs you want OpenClaw to use in
models. - Switch the default model to
aigc558/...inagents.defaults.model.primary.
Recommended Practice: Store API Keys in Environment Variables
First, provide your AIGC558 key in the current shell, service environment, or a .env file readable by OpenClaw:
export AIGC558_API_KEY="sk-your-aigc558-key"Then, add or modify the following snippet in openclaw.json:
{
models: {
mode: "merge",
providers: {
aigc558: {
baseUrl: "https://<your-aigc558-domain>/v1",
apiKey: "${AIGC558_API_KEY}",
api: "openai-completions",
models: [
{ id: "gemini-2.5-flash", name: "Gemini 2.5 Flash" },
{ id: "kimi-k2.5", name: "Kimi K2.5" },
],
},
},
},
agents: {
defaults: {
model: {
primary: "aigc558/gemini-2.5-flash",
fallbacks: ["aigc558/kimi-k2.5"],
},
models: {
"aigc558/gemini-2.5-flash": { alias: "flash" },
"aigc558/kimi-k2.5": { alias: "kimi" },
},
},
},
}This is not a complete configuration to be copied verbatim, but rather the most critical part for integrating AIGC558. As long as the provider, model ID, and default model references are correctly matched, OpenClaw will be able to call the model resources you expose via AIGC558.
Key Configuration Explanation
| Configuration Item | Description |
|---|---|
models.mode | Recommended to set to merge to append aigc558 while retaining OpenClaw's built-in providers. |
models.providers.aigc558.baseUrl | Your AIGC558 address, usually needs to include /v1. |
models.providers.aigc558.apiKey | AIGC558 key, recommended to inject via ${AIGC558_API_KEY}. |
models.providers.aigc558.api | For OpenAI-compatible gateways like AIGC558, use openai-completions. |
models.providers.aigc558.models | The model IDs listed here must match the actual model names exposed by your AIGC558. |
agents.defaults.model.primary | Default primary model, format must be provider/model-id. |
agents.defaults.model.fallbacks | Fallback model list, automatically switches if the primary model fails. |
agents.defaults.models | Optional, used to create aliases for models, convenient for referencing in UI or conversations. |
Verify Successful Integration
After completing the configuration, return to or reopen the Control UI:
openclaw dashboardIf you can initiate conversations normally in OpenClaw and the default model has become aigc558/..., then the integration is successful. You can also use:
openclaw models listto confirm that models with the aigc558/ prefix appear in the selectable list.
Common Issues
baseUrlwithout/v1: This is one of the most common integration errors.- Incorrect model ID:
primaryandfallbacksmust correspond to theidinmodels.providers.aigc558.models. - Key only effective in the current terminal: If Gateway runs as a background service, ensure the service process can also read
AIGC558_API_KEY. - For foreground troubleshooting: You can use the official foreground running method
openclaw gateway --port 18789to observe logs and errors.
CC Switch - All-in-One AI CLI Management Tool
CC Switch tutorial — a cross-platform tool for unified management of Claude Code, Codex & Gemini CLI provider configs, MCP servers, and system prompts. One-click import from AIGC558.
Claude Code
Claude Code configuration guide — use Anthropic's terminal-based coding agent with AIGC558. Supports code understanding, multi-file editing, and IDE integration.