Production infrastructure for AI agents
Website · Documentation · Guides · Core · Template · Discord
systemprompt-extension
Compile-time extension framework for systemprompt.io AI governance infrastructure. Built on the inventory crate — registers schemas, API routes, jobs, and providers in the MCP governance pipeline. Extensions can add new routes, services, and capabilities to the platform.
Layer: Shared — foundational types/traits with no dependencies on other layers. Part of the systemprompt-core workspace.
Overview
Provides the compile-time framework for building and loading systemprompt.io extensions. Extensions declare schemas, API routes, jobs, providers, and assets through the Extension trait, are registered via the inventory crate, and are collected by the host runtime at startup.
Module Map
| Module | Purpose |
|---|---|
any |
Type-erased wrappers (AnyExtension, ApiExtensionWrapper, SchemaExtensionWrapper). |
asset |
AssetDefinition, AssetDefinitionBuilder, AssetPaths, AssetType. |
builder |
ExtensionBuilder — fluent builder enforcing dependency ordering via typestate. |
capabilities |
CapabilityContext, FullContext, and Has* capability traits. |
context |
ExtensionContext and DynExtensionContext. |
error |
LoaderError, ConfigError. |
hlist |
Heterogeneous list machinery (TypeList, Contains, Subset, NotSame). |
metadata |
ExtensionMetadata, ExtensionRole, SchemaDefinition. |
migration |
Migration value type for versioned extension migrations. |
registry |
ExtensionRegistry, ExtensionRegistration, discovery, queries, validation. |
router |
ExtensionRouter, ExtensionRouterConfig, SiteAuthConfig. |
runtime_config |
Runtime configuration surface for extensions. |
traits |
The Extension trait and register_extension! macro. |
typed |
Compile-time-checked sub-traits: SchemaExtensionTyped, ApiExtensionTyped, ConfigExtensionTyped, JobExtensionTyped, ProviderExtensionTyped. |
typed_registry |
TypedExtensionRegistry and RESERVED_PATHS. |
types |
Dependencies, DependencyList, ExtensionMeta, ExtensionType, MissingDependency, NoDependencies. |
Usage
[]
= "0.9.2"
use *;
;
register_extension!;
Feature Flags
None. This crate has no Cargo features; everything compiles into every build.
Dependencies
inventory— Compile-time extension registration.axum— Router types forExtensionRouter.reqwest— HTTP client types exposed through capability traits.serde/serde_json— Metadata and configuration serialisation.thiserror— Typed error enums.tracing— Structured logging.systemprompt-provider-contracts— Provider trait definitions re-exported from the prelude.systemprompt-traits— Core shared traits (withwebfeature).
License
BSL-1.1 (Business Source License). 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 publication. See LICENSE.
systemprompt.io · Documentation · Guides · Live Demo · Template · crates.io · docs.rs · Discord
Shared layer · Own how your organization uses AI.