systemprompt 0.9.2

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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Stub showing how to construct an `ApiServer` from a bare `axum::Router`.
//!
//! Run with: `cargo run -p systemprompt --example api --features api`
//!
//! In a real deployment you would build the router via the runtime's
//! `AppContext` plumbing; this example focuses on the surface re-exported
//! through the facade.

use systemprompt::api::ApiServer;
use systemprompt::prelude::Router;

#[tokio::main(flavor = "current_thread")]
async fn main() {
    tracing_subscriber::fmt::init();
    let router: Router = Router::new();
    let server = ApiServer::new(router, None);
    tracing::info!(?server, "constructed ApiServer");
}