systemprompt 0.14.1

Self-hosted AI governance infrastructure. The Rust library behind systemprompt.io: MCP-native tool-call governance, 6-tier RBAC, secret detection, full audit trails, SIEM-ready events. Provider-agnostic across Anthropic, OpenAI, Gemini, and local models. PostgreSQL, air-gap capable, BSL-1.1.
Documentation

systemprompt

The facade crate for systemprompt-core: a self-hosted platform for running AI agents and MCP servers under one governed boundary.

Crates.io Docs.rs License: BSL-1.1 Rust 1.85+ PostgreSQL 18+

This README mirrors the systemprompt-core root README and is published to docs.rs. systemprompt re-exports the workspace crates behind feature flags; see the full project documentation in the documentation/ directory.


systemprompt-core compiles to a single Rust binary that you run on your own infrastructure, backed by a PostgreSQL database you own. It hosts AI agents (A2A protocol), MCP servers, an OAuth2/OIDC authorization server, and a provider gateway behind one HTTP surface. Every request passes through one authenticated, authorized, and audited path. The binary holds no durable state and makes no outbound calls for governance operation; PostgreSQL is the only state, and secrets stay under your own key-management lifecycle.

Capabilities

Capability What it provides
A2A agents A standalone agent server speaking the agent-to-agent JSON-RPC protocol with SSE streaming and .well-known discovery.
MCP servers Model Context Protocol servers hosted natively over streamable HTTP, each with scoped tools, OAuth2, and an access log.
OAuth2 / OIDC A built-in authorization server with OIDC discovery, PKCE (S256), and WebAuthn. JWTs are RS256.
Provider gateway A /v1 proxy (POST /v1/messages, GET /v1/models) that routes model patterns to a configured upstream provider.
Extensions Compile-time Extension implementations registered with the inventory crate. No runtime plugin loading.
Governance Fail-closed (default-deny) authorization hook, rate limiting, and structured audit logging correlated by trace_id.

Requirements

  • Rust 1.85+ (the workspace is edition 2024).
  • PostgreSQL 18+.

Use as a library

[dependencies]
systemprompt = { version = "0.14.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

Quickstart (building from source)

git clone https://github.com/systempromptio/systemprompt-core.git
cd systemprompt-core
just build

./target/debug/systemprompt admin setup --environment local --migrate --yes
./target/debug/systemprompt infra services start --api
curl -i http://127.0.0.1:8080/health   # 200 when the process and database are up
curl -s http://127.0.0.1:8080/api/v1   # discovery document of mounted surfaces

The full walkthrough is in documentation/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. See LICENSE. Licensing enquiries: ed@systemprompt.io.

Security

Report vulnerabilities to ed@systemprompt.io, not via public issues. See SECURITY.md.