Expand description
§What this crate is
systemprompt is the facade over the systemprompt-core workspace: one dependency and one feature matrix in place of thirty-odd systemprompt-* crates. Depend on it to build extensions, embed the governance pipeline, or drive the API server from your own binary.
For what the platform is and why it exists, see the repository README. To evaluate it end to end without writing code, start with the MIT-licensed systemprompt-template, whose scripted demo suite runs every published claim on your laptop.
§Use as a library
[dependencies]
systemprompt = { version = "0.59.0", features = ["full"] }use systemprompt::prelude::*;| Feature | Includes |
|---|---|
core (default) | traits, models, identifiers, extension |
database | PostgreSQL abstraction (DbPool) |
api | HTTP server and AppContext (requires core + database) |
cli | CLI entry point |
full | Everything: all domain modules + CLI |
slack | Slack integration (opt-in; not included in full) |
teams | Microsoft Teams integration (opt-in; not included in full) |
The full per-feature matrix, including the finer-grained flags (config, mcp, events, security, runtime, and the rest), is on the docs.rs crate root.
§Requirements
- Rust 1.94+ (the workspace is edition 2024).
- PostgreSQL 18+ for every feature above
core.
Running the server rather than depending on it is covered in getting-started.md.
§License
Business Source License 1.1 (BSL-1.1). Source-available for evaluation, testing, and non-production use; production use requires a commercial license. Each version converts to Apache-2.0 four years after its publication. You will always be able to read, audit, and eventually own this code. See LICENSE. Licensing enquiries: ed@systemprompt.io.
§Security
Report vulnerabilities to ed@systemprompt.io, not via public issues. See SECURITY.md.
§Feature flags
| Feature | Pulls in | Use case |
|---|---|---|
core (default) | traits, models, identifiers, extension, template-provider | Author extensions, share types, no I/O. |
database | systemprompt-database, sqlx | SQLx-backed DbPool and repository helpers. |
config | systemprompt-config | Profile, secrets, and credential bootstrap loaders. |
mcp | rmcp | Implement Model Context Protocol servers. |
api | systemprompt-api, systemprompt-runtime, axum (implies core + database) | HTTP server, AppContext, Axum router. |
cloud | systemprompt-cloud | Cloud API client, credentials bootstrap, OAuth. |
logging | systemprompt-logging | Tracing setup with the workspace’s layer stack. |
loader | systemprompt-loader | Filesystem and module discovery. |
events | systemprompt-events | In-process event bus and SSE plumbing. |
storage | systemprompt-storage | File storage backends and the shared-mount probe. |
client | systemprompt-client | HTTP API client used by the CLI. |
security | systemprompt-security | JWT, scope/RBAC, secret scanning, rate limit. |
cli | systemprompt-cli | The systemprompt CLI as a library entry point. |
runtime | cli + extension injection | RuntimeBuilder for embedding with custom extensions. |
analytics | systemprompt-analytics | Request, conversation, agent, tool, and cost metrics without the rest of full. |
slack | systemprompt-slack | Slack Events API, slash commands, interactivity. Opt-in: not part of full. |
teams | systemprompt-teams | Microsoft Teams Bot Framework activities. Opt-in: not part of full. |
full | api, mcp, cloud, cli, config, logging, loader, events, storage, client, security, analytics, and the domain crates (agent, ai, mcp, oauth, users, content, marketplace, scheduler, generator, files) | Building a product binary. slack and teams stay opt-in. |
systemprompt = { version = "0.59.0", features = ["full"] }Every crate is reachable as a module of the same name
(systemprompt::models, systemprompt::agent, …) gated on its feature. The
curated prelude is opt-in — use systemprompt::prelude::* — and is not
re-exported at the crate root, so the root namespace stays the module map.
Copyright (c) systemprompt.io — Business Source License 1.1. See https://systemprompt.io for licensing details.
Re-exports§
pub use runtime::RuntimeBuilder;runtimepub use runtime::RuntimeError;runtime
Modules§
- agent
full - ai
full - analytics
analytics - api
api - cli
cli - client
client - cloud
cloud - config
config - Profile / secrets / credentials configuration loaders. Drives the
ProfileBootstrap → SecretsBootstrap → CredentialsBootstrap → Configsequence. - content
full - credentials
cloud - database
database - events
events - extension
core - files
full - generator
full - identifiers
core - loader
loader - logging
logging - marketplace
full - mcp
full - models
core - oauth
full - prelude
- Curated re-exports for
use systemprompt::prelude::*. - profile
core - Profile types — the on-disk profile schema.
- runtime
runtime - Embedding helper for the
systempromptCLI. - scheduler
full - security
security - slack
slack - storage
storage - system
api - Application runtime /
AppContextwiring. Construct viaAppContextBuilderfrom the prelude. - teams
teams - template_
provider core - Template provider trait surface for custom rendering backends (Tera, Handlebars, MJML, …).
- traits
core - users
full
Enums§
- WebAssets
runtime