Clawbrain
Claw Brain - Personal AI Memory System for OpenClaw/ClawDBot. Provides memory, personality, bonding, and learning capabilities with encrypted secrets support. Auto-refreshes on service restart. Skill: Clawbrain Owner: clawcolab Summary: Claw Brain - Personal AI Memory System for OpenClaw/ClawDBot. Provides memory, personality, bonding, and learning capabilities with encrypted secrets support. Auto-refreshes on service restart. Tags: latest:0.1.10 Version history: v0.1.10 | 2026-02-09T02:35:46.397Z | user ClawBrain 0.1.7 introduces major improvements, CLI tools, encryption, and testing: - Added encryption su
Rank
62
Safety
84
Downloads
1.9k
Updated
Apr 15, 2026
Version
0.1.10
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.9K downloads reported by the source. Last updated 4/15/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Apr 15, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Apr 15, 2026
- Adoption signal
- 1.9K downloadsadoption · observed Apr 15, 2026
- Latest release
- 0.1.10release · observed Feb 9, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install kn7b1p9h4js9270g2vg6xabazn80a0d1:brain-v3-skill- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-clawcolab-brain-v3-skill/snapshot"
Documentation
CLAWHUB
73,676 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: clawbrain
version: 0.1.10
description: "Claw Brain - Personal AI Memory System for OpenClaw/ClawDBot. Provides memory, personality, bonding, and learning capabilities with encrypted secrets support. Auto-refreshes on service restart."
metadata: {"openclaw":{"emoji":"🧠","category":"memory","provides":{"slot":"memory"},"events":["gateway:startup","command:new"]},"clawdbot":{"emoji":"🧠","category":"memory","provides":{"slot":"memory"},"events":["gateway:startup","command:new"]}}
---
# Claw Brain Skill 🧠
Personal AI Memory System with Soul, Bonding, and Learning for OpenClaw/ClawDBot.
> **Auto-Refresh on Restart**: ClawBrain automatically refreshes memory when the service restarts.
## Features
- 🎭 **Soul/Personality** - 6 evolving traits (humor, empathy, curiosity, creativity, helpfulness, honesty)
- 👤 **User Profile** - Learns user preferences, interests, communication style
- 💭 **Conversation State** - Real-time mood detection and context tracking
- 📚 **Learning Insights** - Continuously learns from interactions and corrections
- 🧠 **get_full_context()** - Everything for personalized responses
- 🔄 **Auto-Refresh** - Automatically refreshes memory on service restart
- 🔐 **Encrypted Secrets** - Store API keys and credentials securely
---
## Quick Install
### From PyPI (Recommended)
```bash
# Install with all features
pip install clawbrain[all]
# Run interactive setup
clawbrain setup
# Backup your encryption key (IMPORTANT!)
clawbrain backup-key --all
# Restart your service
sudo systemctl restart clawdbot # or openclaw
```
The setup command will:
1. Detect your platform (ClawdBot or OpenClaw)
2. Generate a secure encryption key
3. Install the startup hook automatically
4. Test the installation
### Alternative: From Source
```bash
# Clone to your skills directory
cd ~/.openclaw/skills # or ~/clawd/skills or ~/.clawdbot/skills
git clone https://github.com/clawcolab/clawbrain.git
cd clawbrain
pip install -e .[all]
clawbrain setup
```
---
## Configuration
After installation, optionally configure your agent ID:
```bash
# Create systemd drop-in config
sudo mkdir -p /etc/systemd/system/clawdbot.service.d # or openclaw.service.d
sudo tee /etc/systemd/system/clawdbot.service.d/brain.conf << EOF
[Service]
Environment="BRAIN_AGENT_ID=your-agent-name"
# Optional: PostgreSQL (for production)
# Environment="BRAIN_POSTGRES_HOST=localhost"
# Environment="BRAIN_POSTGRES_PASSWORD=your-password"
# Optional: Redis (for caching)
# Environment="BRAIN_REDIS_HOST=localhost"
EOF
sudo systemctl daemon-reload
sudo systemctl restart clawdbot # or openclaw
```
### Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| `BRAIN_AGENT_ID` | Unique ID for this agent's memories | `default` |
| `BRAIN_ENCRYPTION_KEY` | Fernet key for encrypting sensitive data (auto-generated if not set) | - |
| `BRAIN_POSTGRES_HOST` | PostgreSQL host | `localhost` |
| `BRAIN_POSTGRES_PASSWORD` | PostgreSQL passwordbrain/README.md
# Brain Module This folder exists for backward compatibility. The main module is at the root level: `from clawbrain import Brain`
README.md
# Claw Brain 🧠
**Personal AI Memory System for AI Agents**
A sophisticated memory and learning system that enables truly personalized AI-human communication.
## Features
- 🎭 **Soul/Personality** - 6 evolving traits (humor, empathy, curiosity, creativity, helpfulness, honesty)
- 👤 **User Profile** - Learns user preferences, interests, communication style
- 💭 **Conversation State** - Real-time mood detection and context tracking
- 📚 **Learning Insights** - Continuously learns from interactions and corrections
- 🧠 **get_full_context()** - Everything for personalized responses
- 🔐 **Encrypted Secrets** - Securely store API keys and credentials
## Installation
### From PyPI (Recommended)
```bash
# Basic installation
pip install clawbrain
# With encryption support (recommended)
pip install clawbrain[encryption]
# With all optional features
pip install clawbrain[all]
```
### Post-Installation Setup
After installation, run the setup command:
```bash
# Interactive setup (generates encryption key, installs hooks)
clawbrain setup
# Backup your encryption key (important!)
clawbrain backup-key --all
```
### For ClawdBot / OpenClaw
```bash
# Install with all features
pip install clawbrain[all]
# Run setup to install hooks
clawbrain setup
# Restart your service
sudo systemctl restart clawdbot # or openclaw
```
The setup command will:
- Generate a secure encryption key
- Detect your platform (ClawdBot or OpenClaw)
- Install the startup hook automatically
- Test the installation
**Configure your agent ID** (optional, add to systemd service):
```bash
sudo mkdir -p /etc/systemd/system/clawdbot.service.d # or openclaw.service.d
sudo tee /etc/systemd/system/clawdbot.service.d/brain.conf << EOF
[Service]
Environment="BRAIN_AGENT_ID=your-agent-name"
EOF
sudo systemctl daemon-reload
sudo systemctl restart clawdbot # or openclaw
```
### For Python Projects
```bash
pip install clawbrain[encryption]
```
## Quick Start
```bash
pip install clawbrain[encryption]
```
```python
from clawbrain import Brain
brain = Brain()
context = brain.get_full_context(
session_key="chat_123",
user_id="user",
agent_id="assistant",
message="Hey, how's it going?"
)
```
## Storage Options
### Option 1: SQLite (Zero Setup) ✅ Recommended for development
```python
from clawbrain import Brain
# Automatically uses SQLite
brain = Brain({"storage_backend": "sqlite"})
```
**Requirements:** Python 3.10+, no external dependencies
**Best for:**
- Development and testing
- Single-user deployments
- Quick prototyping
---
### Option 2: PostgreSQL + Redis (Production) 🚀
```python
from clawbrain import Brain
# Auto-detects PostgreSQL and Redis
brain = Brain()
```
**Requirements:**
- PostgreSQL 14+ (port 5432)
- Redis 6+ (port 6379)
- Python packages: `psycopg2-binary`, `redis`
**Install dependencies:**
```bash
pip install psycopg2-binary redis
```
**Environment variables (optional):**
```bash
export POSTGRES_HOST=localhost
export POSTGRES_PORT=5432tests/README.md
# ClawBrain Tests This directory contains comprehensive integration tests for ClawBrain. ## Test Files | File | Description | |------|-------------| | `run_integration_tests.sh` | Main test runner script (Docker-based) | | `run_local_tests.sh` | Run tests locally without Docker | | `integration_test.py` | Core integration tests (12 tests) | | `test_openclaw_container.py` | OpenClaw-specific integration test | | `test_openclaw_integration.sh` | Real system OpenClaw restart test | | `Dockerfile.test` | Docker image simulating OpenClaw | ## Running Tests ### Docker-based Integration Tests (Recommended) Run the full integration test suite in a Docker container that simulates an OpenClaw environment: ```bash # Run all tests (13 tests total) ./tests/run_integration_tests.sh # Force rebuild the container ./tests/run_integration_tests.sh --build # Open a shell in the container for debugging ./tests/run_integration_tests.sh --shell ``` ### Local Tests Run tests directly without Docker: ```bash # Install test dependencies pip install clawbrain[all] # Run integration tests python tests/integration_test.py # Run encryption tests python test_encryption.py ``` ### Real OpenClaw Integration Test If you have OpenClaw/ClawdBot installed, test the full integration: ```bash # Run the OpenClaw restart test ./tests/test_openclaw_integration.sh # Skip the restart prompt ./tests/test_openclaw_integration.sh --skip-restart ``` ## Test Coverage ### Core Integration Tests (12 tests) | Test | Description | |------|-------------| | Import | Verify ClawBrain can be imported | | Initialization | Test Brain class initialization with SQLite | | Remember/Recall | Test basic memory storage and retrieval | | Encryption Available | Verify cryptography library is installed | | Secret Encryption | Verify secrets are encrypted in database | | Auto Migration | Test automatic migration of unencrypted secrets | | CLI Available | Test CLI responds to --help | | Hooks Directory | Verify hooks are properly structured | | Brain Bridge | Verify brain_bridge.py exists | | Multiple Agents | Test agent isolation for memories | | Health Check | Test health_check() method | | Get Unencrypted Secrets | Test get_unencrypted_secrets() method | ### OpenClaw Container Test (1 test, 6 steps) | Step | Description | |------|-------------| | Platform Detection | Detects if running in OpenClaw or ClawdBot | | Skill Installation | Verifies skill directory and files | | Hook Installation | Verifies hooks are installed and valid JS | | Brain Bridge | Verifies brain_bridge.py syntax | | CLI Test | Verifies CLI responds | | Brain Functionality | Tests remember/recall with encryption | ## Container Environment The Docker container simulates: - OpenClaw directory structure (`~/.openclaw/`) - Skills installation (`~/.openclaw/skills/clawbrain/`) - Hooks installation (`~/.openclaw/hooks/clawbrain-startup/`) - Python 3.11 with all dependencies - Node.js for hook testing ## Adding New Tests
_meta.json
{
"ownerId": "kn7b1p9h4js9270g2vg6xabazn80a0d1",
"slug": "brain-v3-skill",
"version": "0.1.10",
"publishedAt": 1770604546397
}activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/clawcolab/brain-v3-skill",
"sourceUrl": "https://clawhub.ai/clawcolab/brain-v3-skill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-04-15T00:45:39.800Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-clawcolab-brain-v3-skill/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-clawcolab-brain-v3-skill/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-04-15T00:45:39.800Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.9K downloads",
"href": "https://clawhub.ai/clawcolab/brain-v3-skill",
"sourceUrl": "https://clawhub.ai/clawcolab/brain-v3-skill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-04-15T00:45:39.800Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "0.1.10",
"href": "https://clawhub.ai/clawcolab/brain-v3-skill",
"sourceUrl": "https://clawhub.ai/clawcolab/brain-v3-skill",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-09T02:35:46.397Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-clawcolab-brain-v3-skill/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-clawcolab-brain-v3-skill/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 0.1.10",
"description": "ClawBrain 0.1.7 introduces major improvements, CLI tools, encryption, and testing: - Added encryption support for secrets (API keys, credentials) with key management CLI and auto key generation. - Introduced new CLI commands (`clawbrain setup`, `generate-key`, `show-key`, `backup-key`, etc.) for setup, key handling, and diagnostics. - Added GitHub CI workflows for automated testing and publishing. - Added integration, unit, and container tests under the new `tests/` directory. - Implemented agent ID migration and bridge scripts for smoother upgrades. - Removed legacy `clawbrain.py` in favor of a modular and more maintainable structure.",
"href": "https://clawhub.ai/clawcolab/brain-v3-skill",
"sourceUrl": "https://clawhub.ai/clawcolab/brain-v3-skill",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-02-09T02:35:46.397Z",
"isPublic": true
}
]
}Record generated Oct 9, 2026.
