Documentation
Technical documentation for systemprompt.io - an embedded Rust library for building production AI infrastructure
On this page
systemprompt.io is an embedded Rust library for building production AI infrastructure. Clone the template, wrap your logic around it, and the CLI handles the rest—local development, cloud deployment, and everything in between.
Quick start:
# Clone the template
gh repo create my-ai --template systempromptio/systemprompt-template --clone
# Build
cargo build --release
# Run
just start
The same CLI that works locally also works in production. Your AI clients connect via MCP, your agents coordinate via A2A, and everything is authenticated and auditable out of the box.
Documentation Sections
| Section | Purpose |
|---|---|
| Getting Started | Quick start, coding standards, playbooks |
| Config | Profiles, database, secrets |
| Services | Agents, MCP, AI providers |
| Extensions | Custom Rust code |
| Cloud | Deploy, sync, domains |
Getting Started
The Getting Started section is your entry point for all development work.
| Page | Description |
|---|---|
| Getting Started Overview | Quick start guide, project structure, first steps |
| Coding Standards | Rust patterns, mandatory requirements, anti-patterns |
| Installation | Detailed installation and database setup |
| Licensing | BSL-1.1 license, pricing, and what you can build |
| Playbooks | Machine-readable instruction sets |
For AI agents and automated workflows, start with the playbooks:
systemprompt core playbooks show guide_start
systemprompt core playbooks show guide_coding-standards
The CLI binary is the primary interface. On startup, main.rs calls __force_extension_link() which references each extension's PREFIX constant - this prevents the linker from stripping extensions during LTO optimization. The cli::run() function then initializes the library with all registered extensions.
Config
The .systemprompt/ directory contains deployment and environment configuration, kept separate from runtime services. Profiles define database connections, server settings, JWT secrets, and cloud credentials. The ProfileBootstrap::init() function in the MCP server entry point loads the active profile, followed by SecretsBootstrap::init() for credentials and Config::init() for service configuration.
The Config section includes the Configuration Overview (directory structure and configuration flow), Profiles (environment-specific settings for local, staging, and production), Database (PostgreSQL setup options), and Secrets (API keys and credentials management).
Services
The services/ directory contains YAML configuration for all runtime components. No Rust code lives here—only configuration files and Markdown content. The config_loader.rs module loads navigation from services/web/config/navigation.yaml, homepage sections from homepage.yaml, and feature pages from features/*.yaml. Services are hot-reloadable: edit YAML, sync to database, changes take effect without restart.
The Services section covers Agents (A2A protocol cards and skill assignments), MCP (tool server hosting with OAuth scopes), AI (provider configuration for Anthropic, OpenAI, Gemini), Content (blog posts, documentation, content indexing), Scheduler (background jobs with cron scheduling), and Web (branding, navigation, theme configuration).
Extensions
Extensions add custom functionality via Rust code in extensions/. The library uses the inventory crate for compile-time registration—call register_extension!(MyExtension) and your extension is automatically discovered at startup. The Extension trait defines hooks for page data providers, component renderers, database schemas, API routes, background jobs, and required assets.
The Extensions section includes the Overview (extension types and discovery mechanism), Rust Extensions (API routes, database schemas, background jobs), Web Extensions (page data providers, static generation, assets), CLI Extensions (custom CLI commands with clap integration), MCP Extensions (tool servers implementing the MCP protocol), and Background Jobs (scheduled tasks and async processing).
Cloud
systemprompt.io Cloud provides managed infrastructure for production deployments. The cloud configuration in profile.yaml defines credentials_path and tenants_path for authentication. The cli.rs module executes CLI commands with the auth token injected via environment variables (SYSTEMPROMPT_AUTH_TOKEN), enabling secure cloud operations from MCP servers.
Cloud documentation covers Deployment (one-command deploy with CI/CD integration), Sync (push/pull configuration between local and cloud), Domains (custom domains with automatic TLS via Let's Encrypt), and Secrets (cloud credential management and rotation).
External Resources
The source code and project template are available on GitHub. See the Related Code and Links sections for direct access to repositories and releases. All playbooks are accessible via the CLI with systemprompt core playbooks list.