Getting Started

Get MoltBrain up and running in minutes. Follow these steps to give your AI agents persistent memory that spans across sessions and platforms.

Installation

Prerequisites

Before installing MoltBrain, ensure you have the following:

  • Node.js 18+ - Required for running the worker service
  • npm or yarn - Package manager for installation
  • An AI agent platform - OpenClaw, MoltBook, or Claude Code
  • API key - For your LLM provider (Claude, OpenAI, etc.)

Quick Install

Install MoltBrain globally using npm:

npm install -g @moltbrain/cli
moltbrain init

This will install the MoltBrain CLI and initialize a configuration file in your home directory.

Alternative: Local Installation

For development or if you prefer local installation:

git clone https://github.com/nhevers/moltbrain.git
cd moltbrain
npm install
npm run build

Basic Setup

1

Start the Worker Service

The worker service is the core of MoltBrain. It handles memory storage, retrieval, and processing.

moltbrain worker start

This starts the MoltBrain worker service on localhost:37777. The service will continue running until you stop it with Ctrl+C.

Tip: For production, consider running the worker as a systemd service or using a process manager like PM2.

2

Configure Your Integration

Choose your integration method based on your agent platform. Each platform has specific setup requirements:

3

Configure Environment Variables

Set up your API keys and configuration:

# Create .env file in your project
MOLTBRAIN_WORKER_PORT=37777
MOLTBRAIN_PROVIDER=claude
ANTHROPIC_API_KEY=your-api-key-here
MOLTBRAIN_CONTEXT_OBSERVATIONS=50

Verify Installation

Verify that MoltBrain is running correctly by checking the health endpoint:

curl http://localhost:37777/health

You should see: { "status": "ok" }

Expected Response

{
  "status": "ok",
  "version": "1.0.0",
  "worker": "running"
}

Next Steps

Learn the Architecture

Understand how MoltBrain's hybrid memory system combines SQLite and ChromaDB for optimal performance.

Explore Integrations

See detailed integration guides for OpenClaw, MoltBook, and Claude Code with step-by-step instructions.

API Reference

Learn about the Worker Service API, MCP tools, and configuration options.

Examples & Use Cases

See real-world examples of how MoltBrain improves agent interactions across different scenarios.

Common Issues

Worker service won't start

Make sure port 37777 is not already in use. Check with:

lsof -i :37777

API key not working

Verify your API key is set correctly in environment variables or configuration file. Check the API Reference for details.