上級者向けFAQ / Advanced FAQ
- 日本語
- English
- 简体中文
🔬 パワーユーザーのための深掘りQ&A
Q: 複数のAIプロバイダーを同時に使い分けることはできますか?
A: はい、可能です。auth-profiles.json に複数のAPIキーを登録しておき、Cronジョブごとや指示の中で「このタスクにはCerebrasを使って」「これはGeminiで」と指定できます。エージェントはプロンプトに基づいて適切なプロバイダーへルーティングします。
{
"api_keys": {
"CEREBRAS_API_KEY": "csk-xxxxx",
"OPENAI_API_KEY": "sk-xxxxx",
"GOOGLE_API_KEY": "AIzaSyxxxxx"
}
}
Q: エージェントの「記憶(メモリ)」はどのように管理されていますか?
A: OpenClawのエージェントは agents/main/memory/ 以下に長期記憶(KI: Knowledge Items)を保存します。過去のセッションで学んだことを蓄積しており、新たなセッション開始時に関連する記憶を自動的に呼び出します。メモリの肥大化が気になる場合は、不要なKIファイルを手動で削除することもできます(ただし慎重に)。
Q: プロダクション用のVPSでエージェントを24時間稼働させたいのですが?
A: 推奨される構成は以下です:
graph TD;
VPS[VPS / クラウドサーバー] --> Docker[Dockerコンテナ];
Docker --> Agent[OpenClawエージェント];
Agent --> Cron[Cronで定期起床];
Agent --> Discord[Discord通知];
Agent --> GitHub[GitHub監視];
- Docker内で稼働させることで、ホストOSを汚さず安全に運用できます。
- systemd や pm2 を使ってプロセスが落ちた時の自動再起動を設定します。
- APIキーは環境変数経由で注入し(ファイルに直書きしない)、セキュリティを確保します。
Q: OpenClawをアップデートしたら設定が壊れることはありますか?
A: 基本的にワークスペース内のファイル(設定・記憶・スキル)はアップデートの影響を受けません。ただし、メジャーバージョンアップ時に設定ファイルのスキーマが変わることがあります。アップデート前に agents/ フォルダのバックアップを取ることを強く推奨します。
# アップデート前のバックアップ例
cp -r agents/ agents-backup-$(date +%Y%m%d)/
npm update -g openclaw
Q: 自分独自のMCPツールサーバーを作ってエージェントに接続できますか?
A: はい、MCPプロトコルに準拠した独自のサーバーを立ち上げれば、エージェントが新しいツールとして自律的に発見・利用できます。基本的には、JSON-RPCベースの標準インターフェースを公開するNode.jsまたはPythonサーバーを実装します。
🔬 Deep-Dive Q&A for Power Users
Q: Can I use multiple AI providers at the same time?
A: Yes. Register multiple API keys in auth-profiles.json, then specify per-task which provider to use (e.g., "Use Cerebras for this," "Use Gemini for that"). The agent routes to the appropriate provider based on your prompt.
{
"api_keys": {
"CEREBRAS_API_KEY": "csk-xxxxx",
"OPENAI_API_KEY": "sk-xxxxx",
"GOOGLE_API_KEY": "AIzaSyxxxxx"
}
}
Q: How is the agent's "memory" managed?
A: The agent stores long-term memories (KI: Knowledge Items) under agents/main/memory/. It accumulates learned information from past sessions and automatically recalls relevant memories at the start of new ones. You can manually delete unnecessary KI files if memory bloat concerns you (but do so cautiously).
Q: I want to run the agent 24/7 on a production VPS. What's the recommended setup?
A: The recommended architecture:
graph TD;
VPS[VPS / Cloud Server] --> Docker[Docker Container];
Docker --> Agent[OpenClaw Agent];
Agent --> Cron[Scheduled Wakeups via Cron];
Agent --> Discord[Discord Notifications];
Agent --> GitHub[GitHub Monitoring];
- Run inside Docker to keep the host OS clean and secure.
- Use systemd or pm2 for automatic restart if the process crashes.
- Inject API keys via environment variables (never hardcode) for security.
Q: Will updating OpenClaw break my configurations?
A: Generally, your workspace files (config, memory, skills) are unaffected by updates. However, major version upgrades may change config file schemas. Always back up your agents/ folder before upgrading.
# Backup before update
cp -r agents/ agents-backup-$(date +%Y%m%d)/
npm update -g openclaw
Q: Can I build a custom MCP tool server and connect it to my agent?
A: Yes. By launching a server compliant with the MCP protocol standard, your agent can autonomously discover and use it as a new tool. Essentially, you implement a Node.js or Python server that exposes a JSON-RPC-based standard interface.
🔬 高级用户深度问答
Q:可以同时使用多个 AI 提供商吗?
A:可以。在 auth-profiles.json 中注册多个 API 密钥,然后在每个任务的指令中指定使用哪个提供商(例如:"这个任务用 Cerebras","那个用 Gemini")。代理将根据您的提示语自动路由到合适的提供商。
{
"api_keys": {
"CEREBRAS_API_KEY": "csk-xxxxx",
"OPENAI_API_KEY": "sk-xxxxx",
"GOOGLE_API_KEY": "AIzaSyxxxxx"
}
}
Q:代理的"记忆(Memory)"是如何管理的?
A:代理将长期记忆(KI:知识条目)存储在 agents/main/memory/ 目录下。它积累了从过去会话中学到的信息,并在新会话开始时自动调用相关记忆。如果担心记忆膨胀,可以手动删除不需要的 KI 文件(请谨慎操作)。
Q:我想在生产 VPS 上让代理 24/7 全天候运行,推荐的架构是什么?
A:推荐配置如下:
graph TD;
VPS[VPS / 云服务器] --> Docker[Docker 容器];
Docker --> Agent[OpenClaw 代理];
Agent --> Cron[通过 Cron 定期唤醒];
Agent --> Discord[Discord 通知];
Agent --> GitHub[GitHub 监控];
- 在 Docker 内运行,以保持宿主操作系统干净且安全。
- 使用 systemd 或 pm2 实现进程崩溃时的自动重启。
- 通过环境变量注入 API 密钥(切勿硬编码在文件中),以确保安全。
Q:升级 OpenClaw 会破坏我的配置吗?
A:通常情况下,您工作空间中的文件(配置、记忆、技能)不受更新影响。但是,主要版本升级可能会更改配置文件的架构。强烈建议在更新前备份 agents/ 文件夹。
# 更新前的备份示例
cp -r agents/ agents-backup-$(date +%Y%m%d)/
npm update -g openclaw
Q:我能构建自己的 MCP 工具服务器并连接到代理吗?
A:可以。启动一个符合 MCP 标准的自有服务器后,代理就能自主发现并将其作为新工具使用。本质上是实现一个暴露 JSON-RPC 标准接口的 Node.js 或 Python 服务器。