Token导航 LogoToken导航

Agent Skill · 研究检索

brainx(brainx 搜索)

brainx 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

brainx 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 6,846。

总安装 20,749周安装 856GitHub Stars 1下载 6,780核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
0.3.5

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:brainx(brainx 搜索)
来源仓库:https://github.com/mdx2025/brainx
安装命令:
openclaw skills install brainx
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install brainx

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

brainx 是一个基于 PostgreSQL + pgvector + OpenAI 嵌入的矢量内存引擎。用于存储、搜索上下文记忆并自动注入 LLM 提示中。通过 clawhub 安装,需结合来源仓库和 README 核验具体用法。安装前建议确认权限范围、维护状态及是否触发联网或数据库操作。

适用于需要长期记忆管理和语义检索的场景。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install brainx;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

brainx 怎么安装?

在终端执行 openclaw skills install brainx。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

brainx 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

brainx 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

brainx 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

brainx 用的人多吗?

公开数据是累计安装 20,749 次,近一周安装 856 次,下载 6,780 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

brainx 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
brainx

brainx 搜索 · 本页

20,7491需要联网MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
BrainX V5 — The First Brain for OpenClaw
description
|
metadata
openclaw
emoji
🧠
requires
bins
["psql"]
env
["DATABASE_URL", "OPENAI_API_KEY"]
primaryEnv
DATABASE_URL
hooks
event
agent:bootstrap
description
Auto-injects relevant memories at session start
user-invocable
true

BrainX V5 — The First Brain for OpenClaw

Persistent memory system using vector embeddings for contextual retrieval in AI agents.

37 Features

#FeatureDescription
1✅ ProductionActive on 32 agent profiles with centralized shared memory (2,400+ memories)
2🧠 Auto-LearningLearns on its own from every conversation without human intervention
3💾 Persistent MemoryRemembers across sessions — PostgreSQL + pgvector
4🤝 Shared MemoryAll agents share the same knowledge pool
5💉 Automatic BriefingPersonalized context injection at each agent startup
6🔎 Semantic SearchSearches by meaning, not exact keywords
7🏷️ Intelligent ClassificationAuto-typed: facts, decisions, learnings, gotchas, notes
8📊 Usage-Based PrioritizationHot/warm/cold tiers — automatic promote/degrade based on access
9🤝 Cross-Agent LearningPropagates important gotchas and learnings across all agents
10🔄 Anti-DuplicatesSemantic deduplication by cosine similarity with intelligent merge
11⚡ Anti-ContradictionsDetects contradictory memories and supersedes the obsolete one
12📋 Session IndexingSearches past conversations (30-day retention)
13🔒 PII ScrubbingAutomatic redaction of sensitive data before storage
14🔮 Pattern DetectionDetects recurring patterns and promotes them automatically
15🛡️ Disaster RecoveryFull backup/restore (DB + configs + hooks + workspaces)
16⭐ Quality ScoringEvaluates memory quality and promotes only what deserves to persist
17⚙️ Fact ExtractionRegex + LLM pipelines capture both operational facts and nuanced learnings
18📦 Context PacksWeekly project packs and bootstrap topic files for fast situational awareness
19📈 TelemetryQuery logs, injection metrics, and health monitoring built in
20🧵 Supersede ChainsOld memories can be replaced cleanly without losing history
21🌀 Memory DistillationConsolidates raw logs into higher-signal memories over time
22🛡️ Pre-Action AdvisoryQueries past mistakes before high-risk tool execution
23👤 Agent ProfilesPer-agent hook injection: boosts/filters memories by agent role
24🔀 Cross-Agent Injection SlotsHook reserves 30% of context slots for other agents' memories
25📊 Metrics DashboardCLI dashboard with top patterns, memory stats, and usage trends
26🔧 Doctor & Auto-FixSchema integrity check + automatic repair of detected issues
27👍 Memory FeedbackMark memories as useful/useless/incorrect to refine quality
28🗺️ Trajectory RecordingRecords problem→solution paths for future reference
29📝 Learning DetailsExtended metadata extraction for learnings and gotchas
30🔄 Lifecycle ManagementAutomatic promotion/degradation of memories by age and usage
31📥 Workspace ImportImports existing MEMORY.md files from all workspaces into the brain
32🧪 Eval Dataset GenerationGenerates evaluation datasets from real memories for quality testing
33🏗️ Session SnapshotsCaptures full agent state at session close for analysis
34🧹 Low-Signal CleanupAutomatic cleanup of low-value, outdated, or redundant memories
35🔃 Memory ReclassificationReclassifies memories with correct types and categories post-hoc
36🔄 Auto-Promotion PipelineDetects high-recurrence patterns and promotes them as rules in workspace files automatically
37📊 15-Step Daily PipelineConsolidated daily pipeline: bootstrap, lifecycle, distiller, harvester, bridge, auto-distiller, consolidation, cross-agent, contradiction, md-harvester, error-harvester, auto-promoter, promotion-applier, memory-enforcer, audit

When to Use

✅ USE when:

  • An agent needs to "remember" information from previous sessions
  • You want to give additional context to an LLM about past actions
  • You need semantic search by content
  • You want to store important decisions with metadata

❌ DON'T USE when:

  • Ephemeral information that doesn't need persistence
  • Structured tabular data (use a regular DB)
  • Simple cache (use Redis or in-memory)

Auto-Injection (Hook)

BrainX V5 includes an OpenClaw hook that automatically injects relevant memories when an agent starts.

Production Validation Status

Real validation completed on 2026-03-18:

  • Global hook enabled in ~/.openclaw/openclaw.json
  • Managed hook synced with ~/.openclaw/skills/brainx-v5/hook/ (handler.js re-synced)
  • Active physical database: brainx_v5
  • agent-profiles.json expanded from 10 to 32 profiles (all agents)
  • Cross-agent injection slots (30%) activated in production
  • 20 null embeddings regenerated + 17 duplicate pairs deduped via brainx fix
  • 2 pending migrations applied
  • Doctor: 18/18 passed, 0 warnings
  • Real bootstrap smoke test passed for 10 agents
  • Expected evidence confirmed:

- <!-- BRAINX:START --> block written into MEMORY.md - Updated: timestamp present - Fresh row recorded in brainx_pilot_log

If this validation becomes stale, rerun a bootstrap smoke test before assuming runtime is still healthy.

How it works:

  1. agent:bootstrap event → Hook fires automatically
  2. PostgreSQL query → Fetches hot/warm recent memories
  3. Generates file → Creates BRAINX_CONTEXT.md in the workspace
  4. Agent reads → File is loaded as initial context

Configuration:

In ~/.openclaw/openclaw.json:

{
  "hooks": {
    "internal": {
      "enabled": true,
      "entries": {
        "brainx-auto-inject": {
          "enabled": true,
          "limit": 5,
          "tier": "hot+warm",
          "minImportance": 5
        }
      }
    }
  }
}

Per-agent setup:

Add to AGENTS.md in each workspace:

## Every Session

1. Read `SOUL.md`
2. Read `USER.md`
3. Read `brainx.md`
4. Read `BRAINX_CONTEXT.md` ← Auto-injected context

Available Tools

brainx_add_memory

Saves a memory to the vector brain.

Parameters:

  • content (required) — Memory text
  • type (optional) — Type: note, decision, action, learning (default: note)
  • context (optional) — Namespace/scope
  • tier (optional) — Priority: hot, warm, cold, archive (default: warm)
  • importance (optional) — Importance 1-10 (default: 5)
  • tags (optional) — Comma-separated tags
  • agent (optional) — Name of the agent creating the memory

Example:

brainx add --type decision --content "Use embeddings 3-small to reduce costs" --tier hot --importance 9 --tags config,openai

brainx_search

Searches memories by semantic similarity.

Parameters:

  • query (required) — Search text
  • limit (optional) — Number of results (default: 10)
  • minSimilarity (optional) — Threshold 0-1 (default: 0.3)
  • minImportance (optional) — Filter by importance 0-10
  • tier (optional) — Filter by tier
  • context (optional) — Exact context filter

Example:

brainx search --query "API configuration" --limit 5 --minSimilarity 0.5

Returns: JSON with results.

brainx_inject

Gets memories formatted for direct injection into LLM prompts.

Parameters:

  • query (required) — Search text
  • limit (optional) — Number of results (default: 10)
  • minImportance (optional) — Filter by importance
  • tier (optional) — Tier filter (default: hot+warm)
  • context (optional) — Context filter
  • maxCharsPerItem (optional) — Truncate content (default: 2000)

Example:

brainx inject --query "what decisions were made about openai" --limit 3

Returns: Formatted text ready for injection:

[sim:0.82 imp:9 tier:hot type:decision agent:coder ctx:openclaw]
Use embeddings 3-small to reduce costs...

---

[sim:0.71 imp:8 tier:hot type:decision agent:support ctx:brainx]
Create SKILL.md for OpenClaw integration...

brainx_health

Verifies BrainX is operational.

Parameters: none

Example:

brainx health

Returns: PostgreSQL + pgvector connection status.

Backup and Recovery

Create Backup

./scripts/backup-brainx.sh ~/backups

Creates brainx-v5_backup_YYYYMMDD_HHMMSS.tar.gz containing:

  • Full PostgreSQL database (SQL dump)
  • OpenClaw configuration (hooks, .env)
  • Skill files
  • Workspace documentation

Restore Backup

./scripts/restore-brainx.sh backup.tar.gz --force

Fully restores BrainX V5 including:

  • All memories (with embeddings)
  • Hook configuration
  • Environment variables

Full Documentation

See RESILIENCE.md for:

  • Complete disaster scenarios
  • Migration to new VPS
  • Troubleshooting
  • Automatic backup configuration

Configuration

Environment Variables

# Required
DATABASE_URL=postgresql://user:pass@host:5432/brainx_v5
OPENAI_API_KEY=sk-...

# Optional
OPENAI_EMBEDDING_MODEL=text-embedding-3-small
OPENAI_EMBEDDING_DIMENSIONS=1536
BRAINX_INJECT_DEFAULT_TIER=hot+warm
BRAINX_INJECT_MAX_CHARS_PER_ITEM=2000
BRAINX_INJECT_MAX_LINES_PER_ITEM=80

Database Setup

# Schema is in ~/.openclaw/skills/brainx-v5/sql/
# Requires PostgreSQL with pgvector extension

psql $DATABASE_URL -f ~/.openclaw/skills/brainx-v5/sql/v3-schema.sql

Direct Integration

You can also use the unified wrapper that reads the API key from OpenClaw:

cd ~/.openclaw/skills/brainx-v5
./brainx add --type note --content "test"
./brainx search --query "test"
./brainx inject --query "test"
./brainx health

Compatibility: ./brainx-v5 and ./brainx-v5-cli also work as aliases for the main wrapper.

Advisory System (Pre-Action Check)

BrainX includes an advisory system that queries relevant memories, trajectories, and recurring patterns before executing high-risk tools. Helps agents avoid repeating past mistakes.

High-Risk Tools

The following tools automatically trigger advisory checks: exec, deploy, railway, delete, rm, drop, git push, git force-push, migration, cron, message send, email send.

CLI Usage

# Check for advisories before a tool execution
./brainx-v5 advisory --tool exec --args '{"command":"rm -rf /tmp/old"}' --agent coder --json

# Quick check via helper script
./scripts/advisory-check.sh exec '{"command":"rm -rf /tmp/old"}' coder

Agent Integration (Manual)

Since only agent:bootstrap is supported as a hook event, agents should manually call brainx advisory before high-risk tools:

# In agent SKILL.md or AGENTS.md, add:
# Before exec/deploy/delete/migration, run:
cd ~/.openclaw/skills/brainx-v5 && ./scripts/advisory-check.sh <tool> '<args_json>' <agent>

The advisory returns relevant memories, similar past problem→solution paths, and recurring patterns with a confidence score. It's informational — never blocking.

Agent-Aware Hook Injection

The agent:bootstrap hook uses agent profiles (hook/agent-profiles.json) to customize memory injection per agent:

  • coder: Boosts gotcha/error/learning memories; filters by infrastructure/code/deploy/github contexts; excludes notes
  • writer: Boosts decision/learning; filters by content/seo/marketing; excludes errors
  • monitor: Boosts gotcha/error; filters by infrastructure/health/monitoring
  • echo: No filtering (default behavior)

Agents not listed in the profiles file get the default unfiltered injection. Edit hook/agent-profiles.json to add new agent profiles.

Cross-Agent Memory Sharing

The hook reserves ~30% of injection slots for cross-agent memories, ensuring each agent sees relevant learnings from other agents. The cross-agent-learning.js script tags high-importance memories for cross-agent visibility without creating duplicates.

Security & Trust

This skill is flagged with "suspicious patterns" by ClawHub's automated scanner. Here's what each pattern does and why it's necessary:

PatternFileWhy
child_process.execFilehook/handler.jsInvokes the BrainX CLI to query memories during agent bootstrap. No arbitrary command execution.
process.env accesslib/db.js, lib/openai-rag.js, lib/cli.jsReads DATABASE_URL and OPENAI_API_KEY to connect to PostgreSQL and generate embeddings. Standard for any database-backed skill.
fetch('https://api.openai.com')lib/openai-rag.jsCalls OpenAI Embeddings API to generate vector representations. Single endpoint, no other network calls.
File read/writehook/handler.jsWrites BRAINX_CONTEXT.md and updates MEMORY.md in the agent's workspace during bootstrap injection.

No secrets are stored in code. All credentials come from environment variables. No data leaves the system except embedding requests to OpenAI.

Notes

  • Memories are stored with vector embeddings (1536 dimensions)
  • Search uses cosine similarity
  • inject is the most useful tool for giving context to LLMs
  • Tier hot = fast access, cold/archive = long-term storage
  • Memories are persistent in PostgreSQL (independent of OpenClaw)
  • Auto-injection hook fires on every agent:bootstrap

Feature Status (Tables)

✅ All Operational

TableFunctionStatus
brainx_memoriesCore: stores memories with embeddings✅ Active (2,400+)
brainx_query_logTracks search/inject queries✅ Active
brainx_pilot_logTracks auto-inject per agent✅ Active
brainx_context_packsPre-generated context packages✅ Active
brainx_patternsDetects recurring errors/issues✅ Active
brainx_session_snapshotsCaptures state at session close✅ Active
brainx_learning_detailsExtended metadata for learning/gotcha memories✅ Active
brainx_trajectoriesRecords problem→solution paths✅ Active
8/8 tables operational. Population scripts implemented 2026-03-06.

Full Feature Inventory (35)

CLI Core (brainx <cmd>)

#CommandFunction
1addSave memory (7 types, 20+ categories, V5 metadata)
2searchSemantic search by cosine similarity
3injectFormatted memories for LLM prompt injection
4fact / factsShortcut to save/list infrastructure facts
5resolveMark pattern as resolved/promoted/wont_fix
6promote-candidatesDetect memories eligible for promotion
7lifecycle-runDegrade/promote memories by age/usage
8metricsMetrics dashboard and top patterns
9doctorFull diagnostics (schema, integrity, stats)
10fixAuto-repair issues detected by doctor
11feedbackMark memory as useful/useless/incorrect
12healthPostgreSQL + pgvector connection status

Processing Scripts (scripts/)

#ScriptFunction
13memory-bridge.jsSyncs memory between sessions/agents
14memory-distiller.jsDistills sessions into new memories
15session-harvester.jsHarvests info from past sessions
16session-snapshot.jsCaptures state at session close
17pattern-detector.jsDetects recurring errors/issues
18learning-detail-extractor.jsExtracts metadata from learnings/gotchas
19trajectory-recorder.jsRecords problem→solution paths
20fact-extractor.jsExtracts facts from conversations
21contradiction-detector.jsDetects contradicting memories
22cross-agent-learning.jsShares learnings between agents
23quality-scorer.jsScores memory quality
24context-pack-builder.jsGenerates pre-built context packages
25reclassify-memories.jsReclassifies memories with correct types/categories
26cleanup-low-signal.jsCleans up low-value memories
27dedup-supersede.jsDetects and marks duplicates
28eval-memory-quality.jsEvaluates dataset quality
29generate-eval-dataset-from-memories.jsGenerates evaluation dataset
30memory-feedback.jsPer-memory feedback system
31import-workspace-memory-md.jsImports from workspace MEMORY.md files
32migrate-v2-to-v3.jsSchema migration V2→V3
33promotion-applier.jsLast-mile auto-promotion: distills patterns via LLM and writes rules to workspace files

Hooks and Infrastructure

#ComponentFunction
34brainx-auto-injectAuto-injection hook at each agent bootstrap
35backup-brainx.shFull backup (DB + config + skills)
36restore-brainx.shFull restore from backup
37promotion-applier.jsPipeline step 13: writes promoted patterns to workspace files

V5 Metadata

  • sourceKind — Origin: user_explicit, agent_inference, tool_verified, llm_distilled, etc.
  • sourcePath — Source file/URL
  • confidence — Score 0-1
  • expiresAt — Automatic expiration
  • sensitivity — normal/sensitive/restricted
  • Automatic PII scrubbing (BRAINX_PII_SCRUB_ENABLED)
  • Similarity-based dedup (BRAINX_DEDUPE_SIM_THRESHOLD)

平台分布

OpenClaw

97.37%
按下载量换算6,602

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills