BrainX V5 — The First Brain for OpenClaw
v0.3.5Vector memory engine with PostgreSQL + pgvector + OpenAI embeddings. Stores, searches, and injects contextual memories into LLM prompts. Includes auto-inject...
⭐ 1· 603·2 current·3 all-time
by@mdx2025
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description (vector memory + Postgres + OpenAI embeddings) matches the declared requirements: it needs psql, DATABASE_URL, and OPENAI_API_KEY and contains CLI, DB, embedding and hook code. Required binaries and env vars are proportionate to the stated purpose.
Instruction Scope
SKILL.md and other docs instruct the agent/operator to read and write OpenClaw config and workspace files (~/.openclaw/openclaw.json, ~/.openclaw/.env, MEMORY.md, BRAINX_CONTEXT.md, workspace memory files) and to run cron/maintenance scripts that harvest session logs and markdown files. Those actions are within the memory-engine purpose but are broad (capture of agent sessions, automatic ingestion, and writing per-agent MEMORY.md) and can surface sensitive data if not configured carefully.
Install Mechanism
No remote download/install spec — the package is distributed with its code files and hooks. That lowers supply-chain risk. However, the repo includes hook/handler.js and many scripts that, when installed/synced, will be executed on agent bootstrap and by cron if enabled; the user should inspect those files before copying them into their managed hooks directory.
Credentials
The two required env vars (DATABASE_URL, OPENAI_API_KEY) are appropriate for a vector DB + embedding service. The code also supports optional BRAINX_ENV and recommends reading ~/.openclaw/.env; loading an external env file means the skill could access other secrets if that file contains them. The docs also reference optional cloud sync (rclone) and backups — these are operator-controlled but expand the data-handling surface.
Persistence & Privilege
always:false and normal model invocation behavior. The skill includes an auto-inject hook (agent:bootstrap) that, when installed, will modify per-agent files (MEMORY.md / BRAINX_CONTEXT.md) and share memories across agents. This is expected for a shared memory engine, but it is persistent and cross-agent by design — review sharing/PII settings before enabling in multi-user or sensitive environments.
Assessment
What to check before installing/activating BrainX V5:
- Review the hook and ingestion scripts (hook/handler.js, lib/openai-rag.js, lib/db.js, and cron/harvester scripts). Those are the runtime code that will read workspace/session files and call the embeddings API.
- Understand data flow: conversations, session logs, and workspace MEMORY.md files may be read and stored into the Postgres DB, and text is sent to OpenAI's embeddings endpoint using OPENAI_API_KEY. If that data may contain PII or secrets, either disable auto-ingest or enable/validate the PII-scrub config (BRAINX_PII_SCRUB_ENABLED and related settings) and test it in a sandbox.
- Keep the BrainX database isolated: use a dedicated Postgres instance and user with least privileges, and do not reuse production DB credentials that grant broader access.
- Protect the OPENAI_API_KEY: it will be used to send data to OpenAI; confirm your data-handling policy and consider using an API key with appropriate organization/billing and retention settings.
- Inspect BRAINX_ENV / .env usage: the skill can load env files; ensure those files do not contain other unrelated secrets or tokens you don't want the skill to read.
- Backup/restore and optional cloud sync steps are operator-run. If you plan to enable automatic backup-to-cloud, verify those scripts to avoid accidental exfiltration.
- If you do not want cross-agent sharing or automatic learning, do not enable the managed hook/crons or change config to restrict injection/auto-learning.
If you want further assurance, provide specific files (hook/handler.js and lib/openai-rag.js) for a quick targeted review of network calls, data redaction code paths, and any external endpoints beyond OpenAI.lib/embedding-client.js:8
Environment variable access combined with network send.
Confirmed safe by external scanners
Static analysis detected API credential-access patterns, but both VirusTotal and OpenClaw confirmed this skill is safe. These patterns are common in legitimate API integration skills.Like a lobster shell, security has layers — review code before you run it.
latestvk978qjpyjw501rm0kz5v496a9d83hyv9
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
Runtime requirements
🧠 Clawdis
Binspsql
EnvDATABASE_URL, OPENAI_API_KEY
Primary envDATABASE_URL
