Skip to content

Agentsflare openclaw配置方案

OpenclawOpenclaw 是一款与能真正干活的人工智能。

安装配置Openclaw

安装Openclaw

bash
curl -fsSL https://openclaw.ai/install.sh | bash
bash
npm i -g openclaw
openclaw onboard
bash
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --install-method git

其他安装方式详见Openclaw安装文档

启动服务

启动Openclaw

bash
openclaw start

如有其他问题按照提示操作即可。

在浏览器输入 http://localhost:18789/?token=123456 即可访问openclaw页面。

配置Openclaw

1.修改配置文件~/.openclaw/openclaw.json

{
  "meta": {
    "lastTouchedVersion": "2026.2.3-1",
    "lastTouchedAt": "2026-02-09T05:24:26.533Z"
  },
  "models": {
    "mode": "merge",
    "providers": {
      "AgentsFlare": {
        "baseUrl": "https://api.agentsflare.com/v1",
        "apiKey": "YOUR-KEY",
        "api": "openai-completions",
        "models": [
          {
            "id": "claude-3-haiku-20240307",
            "name": "claude-3-haiku-20240307",
            "api": "openai-completions",
            "reasoning": false,
            "input": [
              "text"
            ],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 64000,
            "maxTokens": 4096
          },
          {
            "id": "claude-opus-4-6",
            "name": "claude-opus-4-6",
            "api": "openai-completions",
            "reasoning": true,
            "input": ["text"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 200000,
            "maxTokens": 32000
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "AgentsFlare/claude-3-haiku-20240307"
      },
      "compaction": {
        "mode": "safeguard"
      },
      "maxConcurrent": 4,
      "subagents": {
        "maxConcurrent": 8
      }
    }
  },
  "messages": {
    "ackReactionScope": "group-mentions"
  },
  "commands": {
    "native": "auto",
    "nativeSkills": "auto"
  },
  "gateway": {
    "port": 18789,
    "mode": "local",
    "auth": {
      "token": "123456"
    }
  },
  "skills": {
    "entries": {
      "coding-agent": {
        "enabled": true
      },
      "skill-creator": {
        "enabled": true
      }
    }
  }
}

2.通过web页面配置Openclaw模型 点击右侧Settings->Config,在弹出的框中选择Models,右侧选择All。在下方添加base url和api key。 Openclaw web console

调试

bash
openclaw gateway run --token 123456

前台运行,通过输入日志判断错误原因。

本文档遵循 CC BY-SA 4.0 协议。