Expand description
§systemprompt
The governance engine behind AI infrastructure you actually own. One Rust binary, one PostgreSQL, every agent and tool call through one audited path. This is the facade crate: it re-exports the systemprompt-core workspace behind feature flags.
§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.29.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.
systemprompt.io · Documentation · Guides · Live Demo · Template · crates.io · docs.rs · Discord
Rent your control plane and you rent your audit trail. This one compiles.
| 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. |
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. |
test-utils | cloud | Enables cloud for test scaffolding; not for production. |
full | All of the above plus all domain crates (agent, ai, mcp, oauth, users, content, analytics, evaluation, scheduler, generator, files) | Building a product binary. |
systemprompt = { version = "0.29.0", features = ["full"] }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;runtimepub use crate::prelude::*;
Modules§
- agent
full - Agent-to-Agent (A2A) protocol: message types, task lifecycle, streaming server, agent registry.
- ai
full - Provider selection, request/response types, cost accounting.
- analytics
full - Request, conversation, agent, tool, and cost metrics.
- api
api - HTTP server entry: Axum router, middleware stack, listener bootstrap.
- cli
cli - CLI entry surface:
run,CliConfig,OutputFormat,ColorMode,VerbosityLevel. - client
client - HTTP API client used by the CLI and external tooling to drive a running instance.
- cloud
cloud - Credentials bootstrap, tenant management, deployment.
- config
config - Profile / secrets / credentials configuration loaders. Drives the
ProfileBootstrap → SecretsBootstrap → CredentialsBootstrap → Configsequence. - content
full - Pages, articles, markdown ingestion.
- credentials
cloud - Loads OAuth client credentials and tenant identity at startup.
- database
database - SQLx-backed database abstraction:
DbPool,DatabaseProvider, repositories, introspection. - evaluation
evaluation - Evaluation framework: judge runs over production AI traffic, failure replay with repair hints, and the auto-improve loop.
- events
events - In-process event bus and SSE broadcasting.
- extension
core - Compile-time extension framework: the
Extensiontrait, typed variants,register_extension!macro, and registry. - files
full - generator
full - Tera-based renderer driving the
webCLI domain. - identifiers
core UserId,AgentId,TaskId,TraceId, and the rest of the wrappers.- loader
loader - Filesystem and module discovery for services, plugins, and config files.
- logging
logging - Tracing/logging setup helpers (startup-mode gating, layered subscribers).
- marketplace
full - The
MarketplaceFiltertrait, which gates per-user visibility of plugins, skills, agents, and managed MCP servers in the bridge manifest. - mcp
full - Server orchestrator, network/proxy layer, RBAC middleware.
- models
core - I/O-free: config structs, profile types, domain DTOs.
- oauth
full - OAuth2, OIDC, and WebAuthn flows.
- prelude
- Curated re-exports for
use systemprompt::prelude::*. Curated re-exports foruse systemprompt::prelude::*. - profile
core - Profile types — the on-disk profile schema (
Profile,CloudConfig,ProfileStyle,CloudValidationMode) plus theProfileBootstraploader when theconfigfeature is enabled. - runtime
runtime RuntimeBuilderfor embedding the platform with compile-time injected extensions and a custom web-asset strategy. Embedding helper for thesystempromptCLI.- scheduler
full - security
security - Security primitives: JWT verification, scope/RBAC, secret scanning, rate-limit middleware.
- slack
slack - Inbound Events API, slash commands, and Block Kit interactivity dispatched to governed agents.
- system
api - Application runtime /
AppContextwiring. Construct viaAppContextBuilderfrom the prelude. - teams
teams - Inbound Bot Framework activities, token validation, Adaptive Card rendering.
- template_
provider core - Template provider trait surface for custom rendering backends (Tera, Handlebars, MJML, …).
- traits
core - Includes
LlmProvider,ToolProvider,Job, and the typed error contracts (ApiError,ExtensionError,McpErrorData). - users
full - Accounts, roles, scopes.
Enums§
- WebAssets
runtime - Controls how the runtime serves the static web bundle: in-binary, on-disk,
or disabled.
Web-asset serving strategy re-exported from
systemprompt-extension.