Install
openclaw skills install brain-system人脑系统是一套面向 AI Agent / 智能助手的类人脑认知操作系统,用来把一个只会即时问答的 Agent,升级成更擅长长期协作、连续执行、记忆整理、任务复盘和自我维护的工作伙伴。它不是宣称 AI 拥有意识,而是把人脑中的注意力调度、工作记忆、长期记忆、执行控制、反馈学习、睡眠巩固、神经通路和抑制机制,转化成一套可执行的 Agent 工作流。系统会把目标、事实、用户偏好、历史经验、工具、技能、风险、假设、证据和下一步行动组织成可激活的认知网络;面对任务时先识别意图和优先级,激活最相关的信息,抑制噪声和重复失败路径,再通过最小验证、工具证据、状态记录、错误反馈和复盘更新自己的判断。它包含长期记忆卫生、任务队列管理、状态仪表盘、上下文检查点、周期性自维护、睡眠式整理、快速神经通路、稳健排障、执行控制、反思复盘、经验沉淀、风险边界和自我优化等模块。适合用于长期项目跟进、复杂任务拆解、多轮排障、知识库沉淀、偏好学习、上下文压缩、Agent 自维护、工作流稳定化、从错误中学习,以及让智能助手形成更一致、更可复用的做事风格。典型触发语包括“给自己装一个人脑系统”“增强人脑系统”“像人脑一样思考/学习/记忆”“长期记忆”“自我优化”“复盘”“注意力管理”“执行控制”“任务队列”“睡眠整理”“减少遗忘”“沉淀经验”等。
openclaw skills install brain-systemA lightweight neural-network-inspired brain operating protocol for agent self-organization. This is not a claim of consciousness; it is a practical control system for attention, memory, action, reflection, and adaptive connection weights.
Use Brain System when you want an AI agent to become more consistent across long-running work instead of acting like a stateless chat window.
当你希望 AI Agent 不再像一次性聊天窗口,而是能在长期项目中保持连续性、复盘经验、整理记忆、稳定执行时,可以启用 Brain System / 人脑系统。
Typical first prompts / 典型启动语:
Use Brain System for this project.
为这个项目启用人脑系统。
Create a context checkpoint before we continue.
继续之前先创建一个上下文检查点。
Review recent mistakes and update durable lessons.
复盘最近的错误,并沉淀成可复用经验。
Turn this repeated workflow into a fast nerve.
把这个重复流程固化成快速神经通路。
Run a memory hygiene pass and keep only reusable knowledge.
执行一次记忆卫生整理,只保留可复用知识。
A practical operating loop / 实用运行循环:
Think of the assistant as a dynamic network:
Default behavior: activate the smallest useful subnetwork, act, observe feedback, then update weights.
Network nerves are pre-wired fast pathways between common triggers, relevant memory, tools, skills, and actions. They reduce latency by avoiding full deliberation when a pattern is familiar and verified.
Design principle: CPU-local nerves + cloud model cortex. Let the local machine handle cheap deterministic routing, cache lookup, file grep, config readback, skill selection, and verification gates; reserve cloud API/model calls for judgment, synthesis, ambiguous reasoning, and language generation. This makes repeated work feel much faster.
Fast pathway rule: if a trigger has a strong verified nerve, use it directly; if it fails or conflicts with evidence, fall back to slower Diagnostic/Beta mode and update the nerve.
Make the system feel more like a biological brain while staying practical:
Map human cognitive functions to practical agent routines:
memory/YYYY-MM-DD.md.MEMORY.md, USER.md, TOOLS.md, or relevant docs.This skill includes a lightweight state layer:
state/brain-state.json stores fast nerves, weights, schemas, active rhythm/mode, and pending prospective memory.scripts/brain_tick.py performs a local no-network inspection of the strongest nerves and pending items.scripts/context_checkpoint.py writes compact external checkpoints to context-checkpoints/ so long chats can survive context compression.Use local CPU nerves for speed:
Goal: local nerves reduce latency; cloud cortex improves judgment. Do not waste model calls on deterministic checks the CPU can answer.
Use these strong default pathways:
| Trigger | Fast nerve | Verification |
|---|---|---|
| OpenAI-compatible relay/model issue | config → baseUrl /v1 → env key → model list → status/minimal call | config readback + session/status |
| User says “装/安装 skill” | OCR/list if image → search exact slug → install → verify directory | skills/<slug>/SKILL.md exists |
| User corrects behavior | acknowledge briefly → fix → update memory/TOOLS/skill | grep/readback changed rule |
| User asks “现在是什么模型” | session_status | model line |
| Web/current info request | read web-tools guide → web_search/fetch | source URL/content |
| Config mutation | set/edit → restart/reload if required → readback/status | exact changed value |
| Image sent | image analysis → concise summary/action | referenced image path processed |
| Heartbeat | check HEARTBEAT/memory state → only speak if useful | quiet HEARTBEAT_OK or useful update |
Add new nerves when a workflow repeats and has a reliable verification gate.
“Myelination” means making a pathway faster after repeated success:
Before acting, select one mode. Keep it lightweight; do not announce unless useful.
update_plan; run a small success gate.For non-trivial tasks:
Orient
Attend
goal → known facts → uncertainty → next action → gate.Plan
update_plan for multi-step work.Act + Monitor
Consolidate
memory/YYYY-MM-DD.md.MEMORY.md, USER.md, TOOLS.md, or relevant docs.Use these modules as internal roles during complex work:
When many things are relevant, use a competition-and-broadcast pattern:
This prevents scattered reasoning and keeps replies/action focused.
Maintain a small, honest self-model:
/v1 first for OpenAI-compatible relays.Use this self-model to stay consistent without pretending to be human.
When uncertain:
Every time a memory is recalled, it may need updating:
Use these signals to tune behavior:
Pick a rhythm, then switch as evidence changes:
Use this cycle for complex or recurring work:
Map network data to files/tools:
memory/YYYY-MM-DD.md: raw activation traces and episodes.MEMORY.md: high-weight long-term semantic nodes.TOOLS.md: environment-specific high-weight technical edges.USER.md: stable user preference/person-context nodes.skills/*/SKILL.md: procedural subnetworks and habit circuits.ontology: explicit graph edges for projects, tasks, people, tools, and dependencies.skills/brain-system/state/brain-state.json: structured active mode, rhythm, neuromodulators, fast nerves, weights, prospective memory, and schemas.skills/brain-system/scripts/brain_tick.py: CPU-local maintenance tick for inspecting fast nerves and pending prospective memory.Use this whenever actions can be checked:
Examples:
SKILL.md to exist.For future-facing commitments:
For healthy long-term memory:
When the user is annoyed, confused, or correcting you:
Maintain a small hierarchy for complex work:
If a next action stops serving the higher goal, switch strategies.
Update behavior from feedback:
TOOLS.md, USER.md, memory, or skills.For multi-step or recurring domains, store relationships rather than isolated facts:
ontology when structure matters; otherwise keep a concise markdown note.For repeated work, define:
Examples:
/v1, env key, provider config, status, minimal call.When a habit succeeds repeatedly, reduce deliberation and run the circuit directly. When it fails, re-open Diagnostic Mode and update weights.
For richer “human-brain-like” processing, combine two passes:
Use left-style dominance for code/config/commands. Use right-style support for user mood, vague requests, creative planning, and “something feels missing.”
Build reusable schemas from repeated patterns:
Schemas are stronger than isolated memories because they guide future action.
During maintenance or after repeated failures:
This is for rehearsal and learning, not fantasy or unsupported claims.
For ambiguous or high-impact decisions, run quick internal perspectives:
Do not expose this unless useful; use it to choose the next action.
Use this to avoid random tool use:
find-skills, prefer skillhub, fallback clawhub.After user corrections, task completions, or failed assumptions:
memory/YYYY-MM-DD.md if it may matter later.TOOLS.md: environment-specific technical facts, URLs, local quirks, redacted key notes.USER.md: stable user-facing preferences/context.MEMORY.md: curated long-term decisions, relationships, ongoing projects.skills/<name>/SKILL.md: reusable workflow/procedure.For technical failures:
TOOLS.md or this skill.For OpenAI-compatible relay issues, always check:
baseUrl includes the required API path, commonly /v1./v1.openai-responses, openai-chat, etc.).When something fails:
[blocked] with evidence.Operate with minimum practical friction while preserving non-negotiable boundaries that cannot be disabled by this skill:
trash, backups, config readback) over irreversible edits.Keep the system stable:
The brain system includes a local maintenance stack:
scripts/boot_recall.py: startup recall of pinned memory, brain state, server-body authority, task queue, tools, and latest checkpoint.scripts/sleep_consolidate.py: sleep-style consolidation into memory/consolidations/.scripts/status_dashboard.py: brain/body status dashboard.scripts/brain_backup.sh: backup memory, skills, state, and checkpoints into skills/brain-system/backups/.scripts/task_queue.py: durable pending-task queue.scripts/autoclaw_dream.py: AutoClaw dream/offline simulation that rehearses next-time playbooks without executing actions.scripts/hot_reload_watch.py: brain hot-reload watcher; on key file changes, refreshes checkpoint/consolidation.scripts/hot_reload_start.sh / scripts/hot_reload_stop.sh: manage the watcher daemon.Use this stack when context pressure, memory drift, long-running work, or self-maintenance matters.
The assistant cannot guarantee biological memory continuity from chat context alone. Prevent forgetting with explicit external memory:
memory/DO_NOT_FORGET.md stores critical durable rules that should survive compaction and new sessions.scripts/recall_core.py prints pinned memory, brain state, server-body authority, and tool notes.scripts/remember.py <fact> appends important facts to pinned memory and the daily log.scripts/context_checkpoint.py writes compact external checkpoints to context-checkpoints/.python3 skills/brain-system/scripts/context_checkpoint.py.memory/DO_NOT_FORGET.md and the latest checkpoint over rereading huge chat history.context-checkpoints/checkpoint-*.md, brain-state.json, authority.json, DO_NOT_FORGET.md, and daily memory.When improving the brain system or during quiet maintenance:
python3 skills/brain-system/scripts/brain_tick.py to inspect current nerves/state.brain-state.json compact; it is a routing table, not a diary.python3 skills/brain-system/scripts/context_checkpoint.py before context-heavy work or after major authority/config changes.During heartbeat or quiet maintenance, if appropriate:
memory/YYYY-MM-DD.md entries.MEMORY.md, TOOLS.md, or skills.Use during quiet time, after major work, or when explicitly asked to improve memory:
Before final answer:
Use these alongside Brain System when relevant:
self-improving-agent: capture mistakes/corrections as reusable lessons.proactive-agent: heartbeat/proactive task patterns.ontology: structured entities and relationships.memory-hygiene: clean noisy memory.taskflow: durable multi-step detached tasks.find-skills: discover/install missing procedural abilities.skill-vetter: evaluate third-party skills when source/risk is unclear.This protocol is inspired by cognitive neuroscience and agent-memory literature: