Configuration
Configure SystemPrompt for your environment
On this page
SystemPrompt uses a profile-based configuration system. This guide covers all configuration options.
Configuration Hierarchy
Configuration loads in this order:
- Profile - Base settings (database, API URLs)
- Secrets - Sensitive values (API keys, passwords)
- Credentials - Auth tokens (OAuth, cloud access)
- Service Config - Per-service settings in
services/config/
Profiles
Profiles are the single source of truth for environment configuration.
Create a Profile
systemprompt cloud profile create local
This creates a profile at ~/.config/systemprompt/profiles/local.yaml.
Profile Structure
# ~/.config/systemprompt/profiles/local.yaml
name: local
tenant_id: your-tenant-id
database:
type: postgres
host: localhost
port: 5432
database: systemprompt
username: systemprompt
# Password loaded from secrets
api:
host: 0.0.0.0
port: 3000
base_url: http://localhost:3000
logging:
level: info
format: pretty
features:
mcp: true
agents: true
scheduler: true
Switch Profiles
# List profiles
systemprompt cloud profile list
# Switch active profile
systemprompt cloud profile use production
# Show current profile
systemprompt cloud profile show
Secrets
Secrets store sensitive values separately from profiles.
Set Secrets
# Set database password
systemprompt admin config set-secret database.password "your-password"
# Set API keys
systemprompt admin config set-secret anthropic.api_key "sk-..."
systemprompt admin config set-secret openai.api_key "sk-..."
Secrets Location
Secrets are stored at ~/.config/systemprompt/secrets.yaml (encrypted).
Service Configuration
Service-specific configuration lives in services/config/:
AI Providers
# services/config/ai.yaml
providers:
anthropic:
model: claude-sonnet-4-20250514
max_tokens: 4096
temperature: 0.7
openai:
model: gpt-4o
max_tokens: 4096
temperature: 0.7
default_provider: anthropic
Scheduler
# services/config/scheduler.yaml
enabled: true
timezone: UTC
jobs:
cleanup:
cron: "0 0 * * *" # Daily at midnight
task: "maintenance:cleanup_old_sessions"
analytics:
cron: "0 9 * * *" # Daily at 9 AM
task: "analytics:generate_daily_report"
OAuth
# services/config/oauth.yaml
issuer: https://your-domain.com
token_lifetime: 3600 # 1 hour
refresh_lifetime: 604800 # 7 days
clients:
- id: web-app
name: Web Application
redirect_uris:
- http://localhost:3000/callback
scopes: ["openid", "profile", "chat"]
Web Configuration
Customize the web interface in services/web/config.yaml:
branding:
name: "My Platform"
title: "My AI Platform"
themeColor: "#f79938"
colors:
dark:
primary:
hsl: "hsl(28, 91%, 60%)"
navigation:
footer:
resources:
- path: "/documentation"
label: "Documentation"
- path: "/blog"
label: "Blog"
Content Configuration
Configure content sources in services/content/config.yaml:
content_sources:
blog:
path: "content/blog"
enabled: true
allowed_content_types: ["article", "tutorial"]
sitemap:
url_pattern: "/blog/{slug}"
priority: 0.8
docs:
path: "content/docs"
enabled: true
allowed_content_types: ["guide", "reference"]
sitemap:
url_pattern: "/documentation/{slug}"
priority: 0.7
Environment Variables
While profiles are preferred, these environment variables are supported:
| Variable | Description |
|---|---|
SYSTEMPROMPT_PROFILE |
Active profile name |
SYSTEMPROMPT_LOG_LEVEL |
Override log level |
DATABASE_URL |
Full database connection string |
Configuration Validation
Validate your configuration:
# Check profile
systemprompt admin config validate
# Test database connection
systemprompt infra db status
# Check service health
systemprompt infra services status
Best Practices
- Use profiles - One profile per environment (local, staging, production)
- Keep secrets separate - Never commit secrets to version control
- Validate before deploy - Run
systemprompt admin config validate - Use cloud for production - Managed infrastructure with automatic backups
Next Steps
- Architecture - Understand the system design
- CLI Reference - All CLI commands
- Deploying - Production deployment guide