Skip to main content

Crate systemprompt

Crate systemprompt 

Source
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::*;
FeatureIncludes
core (default)traits, models, identifiers, extension
databasePostgreSQL abstraction (DbPool)
apiHTTP server and AppContext (requires core + database)
cliCLI entry point
fullEverything: all domain modules + CLI
slackSlack integration (opt-in; not included in full)
teamsMicrosoft 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

FeaturePulls inUse case
core (default)traits, models, identifiers, extension, template-providerAuthor extensions, share types, no I/O.
databasesystemprompt-database, sqlxSQLx-backed DbPool and repository helpers.
configsystemprompt-configProfile, secrets, and credential bootstrap loaders.
mcprmcpImplement Model Context Protocol servers.
apisystemprompt-api, systemprompt-runtime, axum (implies core + database)HTTP server, AppContext, Axum router.
cloudsystemprompt-cloudCloud API client, credentials bootstrap, OAuth.
loggingsystemprompt-loggingTracing setup with the workspace’s layer stack.
loadersystemprompt-loaderFilesystem and module discovery.
eventssystemprompt-eventsIn-process event bus and SSE plumbing.
storagesystemprompt-storageFile storage backends and the shared-mount probe.
clientsystemprompt-clientHTTP API client used by the CLI.
securitysystemprompt-securityJWT, scope/RBAC, secret scanning, rate limit.
clisystemprompt-cliThe systemprompt CLI as a library entry point.
runtimecli + extension injectionRuntimeBuilder for embedding with custom extensions.
analyticssystemprompt-analyticsRequest, conversation, agent, tool, and cost metrics without the rest of full.
slacksystemprompt-slackSlack Events API, slash commands, interactivity. Opt-in: not part of full.
teamssystemprompt-teamsMicrosoft Teams Bot Framework activities. Opt-in: not part of full.
fullapi, 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;runtime
pub use runtime::RuntimeError;runtime

Modules§

agentfull
aifull
analyticsanalytics
apiapi
clicli
clientclient
cloudcloud
configconfig
Profile / secrets / credentials configuration loaders. Drives the ProfileBootstrap → SecretsBootstrap → CredentialsBootstrap → Config sequence.
contentfull
credentialscloud
databasedatabase
eventsevents
extensioncore
filesfull
generatorfull
identifierscore
loaderloader
logginglogging
marketplacefull
mcpfull
modelscore
oauthfull
prelude
Curated re-exports for use systemprompt::prelude::*.
profilecore
Profile types — the on-disk profile schema.
runtimeruntime
Embedding helper for the systemprompt CLI.
schedulerfull
securitysecurity
slackslack
storagestorage
systemapi
Application runtime / AppContext wiring. Construct via AppContextBuilder from the prelude.
teamsteams
template_providercore
Template provider trait surface for custom rendering backends (Tera, Handlebars, MJML, …).
traitscore
usersfull

Enums§

WebAssetsruntime