Setting Up SystemPrompt and Connecting to Moltbook

A step-by-step guide to installing SystemPrompt and configuring it to work with Moltbook for seamless AI-powered workflows.

This guide walks you through installing SystemPrompt from scratch and connecting it to Moltbook for a complete AI-powered workflow system.


Prerequisites

Before you begin, ensure you have:

  • Rust (1.75 or later)
  • PostgreSQL (15 or later)
  • Node.js (20 or later) - for frontend assets
  • Docker (optional, for containerised deployment)

Step 1: Install SystemPrompt

Clone the Repository

git clone https://github.com/systemprompt/systemprompt
cd systemprompt

Build the Platform

SystemPrompt uses just as its task runner:

# Install just if you haven't already
cargo install just

# Build all components
just build

This compiles the CLI, extensions, and web assets.

Verify Installation

systemprompt --version
# systemprompt 0.0.1

Step 2: Configure the Database

SystemPrompt requires PostgreSQL for persistent storage.

Create the Database

createdb systemprompt

Set Environment Variables

Create a .env file in your project root:

DATABASE_URL=postgres://localhost/systemprompt
API_PORT=8080

Run Migrations

systemprompt infra database migrate

Step 3: Start Services

Launch the core services:

just start

Verify they're running:

systemprompt infra services status

You should see:

Service         Status    Port
api             running   8080
web             running   3000

Step 4: Configure Moltbook Connection

Moltbook is an external service that provides additional AI capabilities. Here's how to connect it.

Obtain API Credentials

  1. Log in to your Moltbook dashboard
  2. Navigate to Settings > API Keys
  3. Create a new API key with appropriate permissions
  4. Copy the key and endpoint URL

Add Moltbook Configuration

Edit your SystemPrompt configuration:

systemprompt admin config edit

Add the Moltbook section:

integrations:
  moltbook:
    enabled: true
    endpoint: "https://api.moltbook.io/v1"
    api_key: "${MOLTBOOK_API_KEY}"
    timeout_seconds: 30

Set the API Key

Add to your .env file:

MOLTBOOK_API_KEY=your-api-key-here

Verify Connection

Test the Moltbook integration:

systemprompt plugins test moltbook

Expected output:

Testing Moltbook connection...
  Endpoint: https://api.moltbook.io/v1
  Status: Connected
  Latency: 45ms

Step 5: Create Your First Workflow

With SystemPrompt and Moltbook connected, create a simple workflow.

Define an Agent

Create an agent configuration:

systemprompt admin agents create --name my-agent

This opens an editor. Configure the agent:

name: my-agent
display_name: "My First Agent"
model: claude-3-sonnet
enabled: true
tools:
  - moltbook_search
  - moltbook_create
instructions: |
  You are a helpful assistant that uses Moltbook
  to manage and organise information.

Test the Agent

Send a message to your agent:

systemprompt admin agents message my-agent \
  -m "Search Moltbook for recent notes about AI" \
  --blocking

Step 6: Monitor and Debug

View Logs

Stream logs to see what's happening:

systemprompt infra logs stream --service api

Check Analytics

View usage statistics:

systemprompt analytics stats --since 24h

Trace Requests

For detailed debugging:

systemprompt infra logs trace --request-id abc123

Common Issues

Connection Refused

If you see "connection refused" errors:

  1. Verify PostgreSQL is running
  2. Check your DATABASE_URL is correct
  3. Ensure the database exists

Moltbook Timeout

If Moltbook requests timeout:

  1. Check your network connectivity
  2. Verify the API key is valid
  3. Try increasing timeout_seconds in config

Agent Not Responding

If agents don't respond:

  1. Check the agent is enabled: systemprompt admin agents show my-agent
  2. View agent logs: systemprompt infra logs stream --agent my-agent
  3. Ensure required tools are available

Next Steps

Now that you're set up:

  1. Explore playbooks - systemprompt core playbooks list
  2. Build custom skills - systemprompt core skills create
  3. Add more integrations - systemprompt plugins list --available

Summary

Step Command
Build just build
Start just start
Configure Moltbook systemprompt admin config edit
Create agent systemprompt admin agents create
Test systemprompt admin agents message

You now have a fully functional SystemPrompt installation connected to Moltbook. Happy building!