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.
On this page
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
- Log in to your Moltbook dashboard
- Navigate to Settings > API Keys
- Create a new API key with appropriate permissions
- 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:
- Verify PostgreSQL is running
- Check your
DATABASE_URLis correct - Ensure the database exists
Moltbook Timeout
If Moltbook requests timeout:
- Check your network connectivity
- Verify the API key is valid
- Try increasing
timeout_secondsin config
Agent Not Responding
If agents don't respond:
- Check the agent is enabled:
systemprompt admin agents show my-agent - View agent logs:
systemprompt infra logs stream --agent my-agent - Ensure required tools are available
Next Steps
Now that you're set up:
- Explore playbooks -
systemprompt core playbooks list - Build custom skills -
systemprompt core skills create - 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!