openclaw-control-center

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

openclaw-control-center

openclaw-control-center

Skill by ara.so — Daily 2026 Skills collection
OpenClaw Control Center transforms OpenClaw from a black box into a local, auditable control center. It provides visibility into agent activity, token spend, task execution chains, cross-session collaboration, memory state, and document sources — with security-first defaults that keep all mutations off by default.
ara.so开发的Skill——2026每日技能合集
OpenClaw控制中心将OpenClaw从“黑盒”转变为本地可审计的控制中心。它提供Agent活动可视化、token消耗统计、任务执行链路、跨会话协作追踪、内存状态及文档来源查看功能——并且默认采用安全优先配置,所有状态变更操作默认关闭。

What It Does

核心功能

  • Overview: System health, pending items, risk signals, and operational summary
  • Usage: Daily/7d/30d token spend, quota, context pressure, subscription window
  • Staff: Who is actively executing vs. queued — not just "has tasks"
  • Collaboration: Parent-child session handoffs and verified cross-session messages (e.g.
    Main ⇄ Pandas
    )
  • Tasks: Task board, approvals, execution chains, run evidence
  • Memory: Per-agent memory health, searchability, and source file editing
  • Documents: Shared and agent-core documents opened from actual source files
  • Settings: Connector wiring status, security risk summary, update status
  • 概览:系统健康状态、待处理项、风险信号及运营汇总
  • 使用情况:每日/7天/30天的token消耗、配额、上下文压力、订阅周期
  • Agent状态:当前正在执行任务与排队中的Agent(而非仅显示“有任务”的Agent)
  • 协作追踪:父子会话交接记录及已验证的跨会话消息(例如
    Main ⇄ Pandas
  • 任务管理:任务看板、审批流程、执行链路、运行证据
  • 内存管理:单Agent内存健康状态、可搜索性及源文件编辑
  • 文档管理:从实际源文件打开的共享文档与Agent核心文档
  • 设置:连接器接线状态、安全风险汇总、更新状态

Installation

安装步骤

bash
git clone https://github.com/TianyiDataScience/openclaw-control-center.git
cd openclaw-control-center
npm install
cp .env.example .env
npm run build
npm test
npm run smoke:ui
npm run dev:ui
Open:
  • http://127.0.0.1:4310/?section=overview&lang=zh
  • http://127.0.0.1:4310/?section=overview&lang=en
Use
npm run dev:ui
over
UI_MODE=true npm run dev
— more stable, especially on Windows shells.
bash
git clone https://github.com/TianyiDataScience/openclaw-control-center.git
cd openclaw-control-center
npm install
cp .env.example .env
npm run build
npm test
npm run smoke:ui
npm run dev:ui
打开以下地址访问:
  • http://127.0.0.1:4310/?section=overview&lang=zh
  • http://127.0.0.1:4310/?section=overview&lang=en
推荐使用
npm run dev:ui
而非
UI_MODE=true npm run dev
——前者稳定性更强,尤其在Windows终端中。

Project Structure

项目结构

openclaw-control-center/
├── control-center/          # All modifications must stay within this directory
│   ├── src/
│   │   ├── runtime/         # Core runtime, connectors, monitors
│   │   └── ui/              # Frontend UI components
│   ├── .env.example
│   └── package.json
├── docs/
│   └── assets/              # Screenshots and documentation images
├── README.md
└── README.en.md
Critical constraint: Only modify files inside
control-center/
. Never modify
~/.openclaw/openclaw.json
.
openclaw-control-center/
├── control-center/          # 所有修改必须限制在此目录内
│   ├── src/
│   │   ├── runtime/         # 核心运行时、连接器、监控器
│   │   └── ui/              # 前端UI组件
│   ├── .env.example
│   └── package.json
├── docs/
│   └── assets/              # 截图及文档图片
├── README.md
└── README.en.md
关键约束:仅允许修改
control-center/
目录内的文件。切勿修改
~/.openclaw/openclaw.json

Environment Configuration

环境配置

Copy
.env.example
to
.env
and configure:
env
undefined
复制
.env.example
.env
并进行配置:
env
undefined

Security defaults — do NOT change without understanding implications

安全默认配置——未理解影响前请勿修改

READONLY_MODE=true LOCAL_TOKEN_AUTH_REQUIRED=true IMPORT_MUTATION_ENABLED=false IMPORT_MUTATION_DRY_RUN=false APPROVAL_ACTIONS_ENABLED=false APPROVAL_ACTIONS_DRY_RUN=true
READONLY_MODE=true LOCAL_TOKEN_AUTH_REQUIRED=true IMPORT_MUTATION_ENABLED=false IMPORT_MUTATION_DRY_RUN=false APPROVAL_ACTIONS_ENABLED=false APPROVAL_ACTIONS_DRY_RUN=true

Connection

连接配置

OPENCLAW_GATEWAY_URL=http://127.0.0.1:PORT OPENCLAW_HOME=~/.openclaw
OPENCLAW_GATEWAY_URL=http://127.0.0.1:PORT OPENCLAW_HOME=~/.openclaw

UI

UI配置

PORT=4310 DEFAULT_LANG=zh
undefined
PORT=4310 DEFAULT_LANG=zh
undefined

Security Flag Meanings

安全配置项说明

FlagDefaultEffect
READONLY_MODE
true
All state-changing endpoints disabled
LOCAL_TOKEN_AUTH_REQUIRED
true
Import/export and write APIs require local token
IMPORT_MUTATION_ENABLED
false
Import mutations blocked entirely
IMPORT_MUTATION_DRY_RUN
false
Dry-run mode for imports when enabled
APPROVAL_ACTIONS_ENABLED
false
Approval actions hard-disabled
APPROVAL_ACTIONS_DRY_RUN
true
Approval actions run as dry-run when enabled
配置项默认值作用
READONLY_MODE
true
禁用所有状态变更接口
LOCAL_TOKEN_AUTH_REQUIRED
true
导入/导出及写入API需要本地token验证
IMPORT_MUTATION_ENABLED
false
完全阻止导入类变更操作
IMPORT_MUTATION_DRY_RUN
false
启用后导入操作仅执行模拟运行
APPROVAL_ACTIONS_ENABLED
false
硬禁用审批操作
APPROVAL_ACTIONS_DRY_RUN
true
启用后审批操作仅执行模拟运行

Key Commands

核心命令

bash
undefined
bash
undefined

Development

开发

npm run dev:ui # Start UI server (recommended) npm run dev # One-shot monitor run, no HTTP UI
npm run dev:ui # 启动UI服务器(推荐方式) npm run dev # 单次监控运行,无HTTP UI

Build & Test

构建与测试

npm run build # TypeScript compile npm test # Run test suite npm run smoke:ui # Smoke test the UI endpoints
npm run build # TypeScript编译 npm test # 运行测试套件 npm run smoke:ui # 对UI端点进行冒烟测试

Lint

代码检查

npm run lint # ESLint check npm run lint:fix # Auto-fix lint issues
undefined
npm run lint # ESLint检查 npm run lint:fix # 自动修复代码检查问题
undefined

TypeScript Code Examples

TypeScript代码示例

Connecting to the Runtime Monitor

连接到运行时监控器

typescript
import { createMonitor } from './src/runtime/monitor';

const monitor = createMonitor({
  gatewayUrl: process.env.OPENCLAW_GATEWAY_URL ?? 'http://127.0.0.1:4310',
  readonlyMode: process.env.READONLY_MODE !== 'false',
  localTokenAuthRequired: process.env.LOCAL_TOKEN_AUTH_REQUIRED !== 'false',
});

// Fetch current system overview
const overview = await monitor.getOverview();
console.log(overview.systemStatus);      // 'healthy' | 'degraded' | 'critical'
console.log(overview.pendingItems);      // number
console.log(overview.activeAgents);      // Agent[]
typescript
import { createMonitor } from './src/runtime/monitor';

const monitor = createMonitor({
  gatewayUrl: process.env.OPENCLAW_GATEWAY_URL ?? 'http://127.0.0.1:4310',
  readonlyMode: process.env.READONLY_MODE !== 'false',
  localTokenAuthRequired: process.env.LOCAL_TOKEN_AUTH_REQUIRED !== 'false',
});

// 获取当前系统概览
const overview = await monitor.getOverview();
console.log(overview.systemStatus);      // 'healthy' | 'degraded' | 'critical'
console.log(overview.pendingItems);      // 数字
console.log(overview.activeAgents);      // Agent[]

Reading Agent Staff Status

读取Agent状态

typescript
import { StaffConnector } from './src/runtime/connectors/staff';

const staff = new StaffConnector({ gatewayUrl: process.env.OPENCLAW_GATEWAY_URL });

// Get agents actively executing (not just queued)
const activeAgents = await staff.getActiveAgents();
activeAgents.forEach(agent => {
  console.log(`${agent.name}: ${agent.status}`);
  // 'executing' | 'queued' | 'idle' | 'blocked'
  console.log(`Current task: ${agent.currentTask?.title ?? 'none'}`);
  console.log(`Last output: ${agent.lastOutput}`);
});

// Get the full staff roster including queue depth
const roster = await staff.getRoster();
typescript
import { StaffConnector } from './src/runtime/connectors/staff';

const staff = new StaffConnector({ gatewayUrl: process.env.OPENCLAW_GATEWAY_URL });

// 获取正在执行任务的Agent(而非仅排队的)
const activeAgents = await staff.getActiveAgents();
activeAgents.forEach(agent => {
  console.log(`${agent.name}: ${agent.status}`);
  // 'executing' | 'queued' | 'idle' | 'blocked'
  console.log(`当前任务: ${agent.currentTask?.title ?? '无'}`);
  console.log(`最后输出: ${agent.lastOutput}`);
});

// 获取包含队列深度的完整Agent列表
const roster = await staff.getRoster();

Tracing Cross-Session Collaboration

追踪跨会话协作

typescript
import { CollaborationTracer } from './src/runtime/connectors/collaboration';

const tracer = new CollaborationTracer({ gatewayUrl: process.env.OPENCLAW_GATEWAY_URL });

// Get parent-child session handoffs
const handoffs = await tracer.getSessionHandoffs();
handoffs.forEach(handoff => {
  console.log(`${handoff.parentSession}${handoff.childSession}`);
  console.log(`Delegated task: ${handoff.taskTitle}`);
  console.log(`Status: ${handoff.status}`);
});

// Get verified cross-session messages (e.g. Main ⇄ Pandas)
const crossSessionMessages = await tracer.getCrossSessionMessages();
crossSessionMessages.forEach(msg => {
  console.log(`${msg.fromAgent}${msg.toAgent}: ${msg.messageType}`);
  // messageType: 'sessions_send' | 'inter-session message'
});
typescript
import { CollaborationTracer } from './src/runtime/connectors/collaboration';

const tracer = new CollaborationTracer({ gatewayUrl: process.env.OPENCLAW_GATEWAY_URL });

// 获取父子会话交接记录
const handoffs = await tracer.getSessionHandoffs();
handoffs.forEach(handoff => {
  console.log(`${handoff.parentSession}${handoff.childSession}`);
  console.log(`委派任务: ${handoff.taskTitle}`);
  console.log(`状态: ${handoff.status}`);
});

// 获取已验证的跨会话消息(例如Main ⇄ Pandas)
const crossSessionMessages = await tracer.getCrossSessionMessages();
crossSessionMessages.forEach(msg => {
  console.log(`${msg.fromAgent}${msg.toAgent}: ${msg.messageType}`);
  // messageType: 'sessions_send' | 'inter-session message'
});

Fetching Token Usage and Spend

获取Token使用与消耗统计

typescript
import { UsageConnector } from './src/runtime/connectors/usage';

const usage = new UsageConnector({ gatewayUrl: process.env.OPENCLAW_GATEWAY_URL });

// Today's usage
const today = await usage.getUsageSummary('today');
console.log(`Tokens used: ${today.tokensUsed}`);
console.log(`Cost: $${today.costUsd.toFixed(4)}`);
console.log(`Context pressure: ${today.contextPressure}`);
// contextPressure: 'low' | 'medium' | 'high' | 'critical'

// Usage trend over 7 days
const trend = await usage.getUsageTrend(7);
trend.forEach(day => {
  console.log(`${day.date}: ${day.tokensUsed} tokens, $${day.costUsd.toFixed(4)}`);
});

// Token attribution by task (who ate the scheduled task tokens)
const attribution = await usage.getTokenAttribution();
attribution.tasks.forEach(task => {
  console.log(`${task.title}: ${task.tokensUsed} (${task.percentOfTotal}%)`);
});
typescript
import { UsageConnector } from './src/runtime/connectors/usage';

const usage = new UsageConnector({ gatewayUrl: process.env.OPENCLAW_GATEWAY_URL });

// 今日使用情况
const today = await usage.getUsageSummary('today');
console.log(`已使用Token: ${today.tokensUsed}`);
console.log(`成本: $${today.costUsd.toFixed(4)}`);
console.log(`上下文压力: ${today.contextPressure}`);
// contextPressure: 'low' | 'medium' | 'high' | 'critical'

// 7天使用趋势
const trend = await usage.getUsageTrend(7);
trend.forEach(day => {
  console.log(`${day.date}: ${day.tokensUsed} tokens, $${day.costUsd.toFixed(4)}`);
});

// 按任务统计Token归属(哪些任务消耗了预定Token)
const attribution = await usage.getTokenAttribution();
attribution.tasks.forEach(task => {
  console.log(`${task.title}: ${task.tokensUsed} (${task.percentOfTotal}%)`);
});

Reading Memory State

读取内存状态

typescript
import { MemoryConnector } from './src/runtime/connectors/memory';

const memory = new MemoryConnector({
  openclawHome: process.env.OPENCLAW_HOME ?? '~/.openclaw',
});

// Get memory health per active agent (scoped to openclaw.json)
const memoryState = await memory.getMemoryState();
memoryState.agents.forEach(agent => {
  console.log(`${agent.name}:`);
  console.log(`  Available: ${agent.memoryAvailable}`);
  console.log(`  Searchable: ${agent.memorySearchable}`);
  console.log(`  Needs review: ${agent.needsReview}`);
});

// Read daily memory for an agent
const dailyMemory = await memory.readDailyMemory('main-agent');
console.log(dailyMemory.content);

// Edit memory (requires READONLY_MODE=false and valid local token)
await memory.writeDailyMemory('main-agent', updatedContent, { token: localToken });
typescript
import { MemoryConnector } from './src/runtime/connectors/memory';

const memory = new MemoryConnector({
  openclawHome: process.env.OPENCLAW_HOME ?? '~/.openclaw',
});

// 获取每个活跃Agent的内存健康状态(基于openclaw.json)
const memoryState = await memory.getMemoryState();
memoryState.agents.forEach(agent => {
  console.log(`${agent.name}:`);
  console.log(`  可用内存: ${agent.memoryAvailable}`);
  console.log(`  可搜索内存: ${agent.memorySearchable}`);
  console.log(`  需要审核: ${agent.needsReview}`);
});

// 读取Agent的每日内存数据
const dailyMemory = await memory.readDailyMemory('main-agent');
console.log(dailyMemory.content);

// 编辑内存(需要READONLY_MODE=false及有效本地token)
await memory.writeDailyMemory('main-agent', updatedContent, { token: localToken });

Checking Wiring Status

检查连接器接线状态

typescript
import { WiringChecker } from './src/runtime/connectors/wiring';

const wiring = new WiringChecker({ gatewayUrl: process.env.OPENCLAW_GATEWAY_URL });

const status = await wiring.getWiringStatus();
status.connectors.forEach(connector => {
  console.log(`${connector.name}: ${connector.status}`);
  // status: 'connected' | 'partial' | 'disconnected'
  if (connector.status !== 'connected') {
    console.log(`  Fix: ${connector.nextStep}`);
  }
});
typescript
import { WiringChecker } from './src/runtime/connectors/wiring';

const wiring = new WiringChecker({ gatewayUrl: process.env.OPENCLAW_GATEWAY_URL });

const status = await wiring.getWiringStatus();
status.connectors.forEach(connector => {
  console.log(`${connector.name}: ${connector.status}`);
  // status: 'connected' | 'partial' | 'disconnected'
  if (connector.status !== 'connected') {
    console.log(`  修复建议: ${connector.nextStep}`);
  }
});

Approving Tasks (Gated Endpoint)

审批任务(受权限控制的接口)

typescript
import { TaskConnector } from './src/runtime/connectors/tasks';

const tasks = new TaskConnector({
  gatewayUrl: process.env.OPENCLAW_GATEWAY_URL,
  approvalActionsEnabled: process.env.APPROVAL_ACTIONS_ENABLED === 'true',
  approvalActionsDryRun: process.env.APPROVAL_ACTIONS_DRY_RUN !== 'false',
});

// This throws if APPROVAL_ACTIONS_ENABLED=false (default)
try {
  const result = await tasks.approveTask('task-id-123', { token: localToken });
  if (result.dryRun) {
    console.log('Dry run — no actual state change');
  }
} catch (err) {
  if (err.code === 'APPROVAL_ACTIONS_DISABLED') {
    console.log('Set APPROVAL_ACTIONS_ENABLED=true to enable approvals');
  }
}
typescript
import { TaskConnector } from './src/runtime/connectors/tasks';

const tasks = new TaskConnector({
  gatewayUrl: process.env.OPENCLAW_GATEWAY_URL,
  approvalActionsEnabled: process.env.APPROVAL_ACTIONS_ENABLED === 'true',
  approvalActionsDryRun: process.env.APPROVAL_ACTIONS_DRY_RUN !== 'false',
});

// 如果APPROVAL_ACTIONS_ENABLED=false(默认值),此代码会抛出错误
try {
  const result = await tasks.approveTask('task-id-123', { token: localToken });
  if (result.dryRun) {
    console.log('模拟运行——未实际变更状态');
  }
} catch (err) {
  if (err.code === 'APPROVAL_ACTIONS_DISABLED') {
    console.log('请设置APPROVAL_ACTIONS_ENABLED=true以启用审批功能');
  }
}

UI Section Navigation

UI板块导航

Navigate via query params:
http://127.0.0.1:4310/?section=overview&lang=zh
http://127.0.0.1:4310/?section=usage&lang=en
http://127.0.0.1:4310/?section=staff&lang=zh
http://127.0.0.1:4310/?section=collaboration&lang=en
http://127.0.0.1:4310/?section=tasks&lang=zh
http://127.0.0.1:4310/?section=memory&lang=en
http://127.0.0.1:4310/?section=documents&lang=zh
http://127.0.0.1:4310/?section=settings&lang=en
Sections:
overview
|
usage
|
staff
|
collaboration
|
tasks
|
memory
|
documents
|
settings
Languages:
zh
(Chinese, default) |
en
(English)
通过查询参数进行导航:
http://127.0.0.1:4310/?section=overview&lang=zh
http://127.0.0.1:4310/?section=usage&lang=en
http://127.0.0.1:4310/?section=staff&lang=zh
http://127.0.0.1:4310/?section=collaboration&lang=en
http://127.0.0.1:4310/?section=tasks&lang=zh
http://127.0.0.1:4310/?section=memory&lang=en
http://127.0.0.1:4310/?section=documents&lang=zh
http://127.0.0.1:4310/?section=settings&lang=en
可选板块:
overview
|
usage
|
staff
|
collaboration
|
tasks
|
memory
|
documents
|
settings
支持语言:
zh
(中文,默认)|
en
(英文)

Integration Patterns

集成模式

Embedding in an Existing OpenClaw Workflow

嵌入现有OpenClaw工作流

If your OpenClaw agent needs to hand off instructions to the control center for setup, use the documented install block:
typescript
// In your OpenClaw agent task
const installInstructions = `
cd openclaw-control-center
npm install
cp .env.example .env
如果你的OpenClaw Agent需要将指令传递给控制中心进行设置,请使用以下标准化安装代码块:
typescript
// 在你的OpenClaw Agent任务中
const installInstructions = `
cd openclaw-control-center
npm install
cp .env.example .env

Edit .env: set OPENCLAW_GATEWAY_URL and OPENCLAW_HOME

编辑.env:设置OPENCLAW_GATEWAY_URL和OPENCLAW_HOME

npm run build && npm test && npm run dev:ui `;
undefined
npm run build && npm test && npm run dev:ui `;
undefined

Adding a Custom Connector

添加自定义连接器

All connectors live in
control-center/src/runtime/connectors/
. Follow this pattern:
typescript
// control-center/src/runtime/connectors/my-connector.ts
import { BaseConnector, ConnectorOptions } from './base';

export interface MyData {
  id: string;
  value: string;
}

export class MyConnector extends BaseConnector {
  constructor(options: ConnectorOptions) {
    super(options);
  }

  async getData(): Promise<MyData[]> {
    // Always check readonly mode for any write operation
    this.assertNotReadonly('getData is readonly-safe');

    const response = await this.fetch('/api/my-endpoint');
    return response.json() as Promise<MyData[]>;
  }
}
所有连接器都位于
control-center/src/runtime/connectors/
目录下,请遵循以下模式开发:
typescript
// control-center/src/runtime/connectors/my-connector.ts
import { BaseConnector, ConnectorOptions } from './base';

export interface MyData {
  id: string;
  value: string;
}

export class MyConnector extends BaseConnector {
  constructor(options: ConnectorOptions) {
    super(options);
  }

  async getData(): Promise<MyData[]> {
    // 对于任何写入操作,务必检查只读模式
    this.assertNotReadonly('getData是只读安全操作');

    const response = await this.fetch('/api/my-endpoint');
    return response.json() as Promise<MyData[]>;
  }
}

Custom UI Section

自定义UI板块

typescript
// control-center/src/ui/sections/MySection.tsx
import React from 'react';
import { useConnector } from '../hooks/useConnector';
import { MyConnector } from '../../runtime/connectors/my-connector';

export const MySection: React.FC = () => {
  const { data, loading, error } = useConnector(MyConnector, 'getData');

  if (loading) return <div>Loading...</div>;
  if (error) return <div>Error: {error.message}</div>;

  return (
    <ul>
      {data?.map(item => (
        <li key={item.id}>{item.value}</li>
      ))}
    </ul>
  );
};
typescript
// control-center/src/ui/sections/MySection.tsx
import React from 'react';
import { useConnector } from '../hooks/useConnector';
import { MyConnector } from '../../runtime/connectors/my-connector';

export const MySection: React.FC = () => {
  const { data, loading, error } = useConnector(MyConnector, 'getData');

  if (loading) return <div>加载中...</div>;
  if (error) return <div>错误: {error.message}</div>;

  return (
    <ul>
      {data?.map(item => (
        <li key={item.id}>{item.value}</li>
      ))}
    </ul>
  );
};

Troubleshooting

故障排查

"Missing src/runtime" or "Missing core source"

"Missing src/runtime"或"Missing core source"

This almost always means the working directory is wrong:
bash
undefined
此问题几乎总是因为工作目录错误导致:
bash
undefined

Ensure you're in the repo root

确保你位于仓库根目录

pwd # should end in /openclaw-control-center ls control-center/src/runtime # should exist

If cloned correctly but still missing: the clone was incomplete. Re-clone:

```bash
git clone https://github.com/TianyiDataScience/openclaw-control-center.git
pwd # 路径应以/openclaw-control-center结尾 ls control-center/src/runtime # 此目录应存在

如果克隆正确但仍出现此问题:说明克隆不完整,请重新克隆:

```bash
git clone https://github.com/TianyiDataScience/openclaw-control-center.git

UI Doesn't Start / Port Conflicts

UI无法启动/端口冲突

bash
undefined
bash
undefined

Check if port 4310 is in use

检查端口4310是否被占用

lsof -i :4310
lsof -i :4310

or on Windows

Windows系统使用以下命令

netstat -ano | findstr :4310
netstat -ano | findstr :4310

Change port in .env

在.env中修改端口

PORT=4311
undefined
PORT=4311
undefined

Data Not Showing (Partial or Empty Sections)

数据未显示(板块内容部分或全部为空)

  1. Open
    Settings
    接线状态 (Wiring Status) — it lists exactly which connectors are connected, partial, or missing.
  2. Common causes:
    • OPENCLAW_GATEWAY_URL
      not set or wrong port
    • OPENCLAW_HOME
      doesn't point to actual
      ~/.openclaw
    • OpenClaw subscription snapshot not at default path
  1. 打开设置接线状态——该板块会列出所有连接器的连接状态(已连接、部分连接或未连接)。
  2. 常见原因:
    • OPENCLAW_GATEWAY_URL
      未设置或端口错误
    • OPENCLAW_HOME
      未指向实际的
      ~/.openclaw
      目录
    • OpenClaw订阅快照未位于默认路径

Token Auth Failures

Token验证失败

bash
undefined
bash
undefined

Generate a local token (see openclaw docs for token location)

生成本地token(请查看OpenClaw文档获取token位置)

cat ~/.openclaw/local-token
cat ~/.openclaw/local-token

Pass via header in API calls

在API调用中通过Header传递token

curl -H "X-Local-Token: <token>" http://127.0.0.1:4310/api/tasks/approve
undefined
curl -H "X-Local-Token: <token>" http://127.0.0.1:4310/api/tasks/approve
undefined

Approval Actions Silently Do Nothing

审批操作无响应

Check your
.env
:
env
APPROVAL_ACTIONS_ENABLED=true   # Must be true
APPROVAL_ACTIONS_DRY_RUN=false  # Must be false for real execution
Both must be explicitly set. Default is disabled + dry-run.
检查你的
.env
配置:
env
APPROVAL_ACTIONS_ENABLED=true   # 必须设置为true
APPROVAL_ACTIONS_DRY_RUN=false  # 必须设置为false才能执行实际操作
两项配置都必须显式设置,默认值为禁用+模拟运行。

Memory Section Shows Inactive Agents

内存板块显示已停用的Agent

The memory section is scoped to agents listed in
openclaw.json
. If deleted agents still appear:
bash
undefined
内存板块的范围基于
openclaw.json
中列出的Agent。如果已删除的Agent仍显示:
bash
undefined

Check active agents

检查活跃Agent列表

cat ~/.openclaw/openclaw.json | grep -A5 '"agents"'

Remove stale entries from `openclaw.json` — the memory section will update on next load.
cat ~/.openclaw/openclaw.json | grep -A5 '"agents"'

从`openclaw.json`中移除失效条目——内存板块会在下次加载时更新。

Windows Shell Issues

Windows终端问题

Prefer
npm run dev:ui
over
UI_MODE=true npm run dev
. Cross-env variable setting behaves differently in PowerShell/CMD. The
dev:ui
script handles this internally.
推荐使用
npm run dev:ui
而非
UI_MODE=true npm run dev
。跨环境变量在PowerShell/CMD中的表现不同,
dev:ui
脚本已内部处理此问题。

Prerequisites

前置条件

  • Node.js + npm
  • A running OpenClaw installation with accessible Gateway
  • Read access to
    ~/.openclaw
    on the local machine
  • (Optional)
    ~/.codex
    and OpenClaw subscription snapshot for full usage data
  • Node.js + npm
  • 已运行的OpenClaw实例,且Gateway可访问
  • 本地机器上
    ~/.openclaw
    目录的读取权限
  • (可选)
    ~/.codex
    及OpenClaw订阅快照以获取完整使用数据