Production infrastructure for AI agents
Website · Documentation · Guides · Core · Template · Discord
systemprompt-identifiers
Typed newtype identifiers (UserId, TraceId, AgentId, McpServerId, and more) for systemprompt.io AI governance infrastructure. Enforces type-safe IDs across every boundary in the MCP governance pipeline, preventing accidental mixing of different ID types at compile time.
Layer: Shared — foundational types/traits with no dependencies on other layers. Part of the systemprompt-core workspace.
Overview
Provides strongly-typed wrappers for all domain identifiers, ensuring type safety and preventing accidental mixing of different ID types.
Architecture
SessionId— User session identifierUserId— User identifierAgentId— Agent UUID identifierAgentName— Agent name stringTaskId— Task identifierContextId— Conversation context identifierTraceId— Distributed tracing identifierClientId— OAuth client identifierMcpExecutionId— MCP execution tracking IDMcpServerId— MCP server nameSkillId— Skill identifierSourceId— Content source identifierCategoryId— Content category identifierJwtToken— JWT token wrapper
Usage
[]
= "0.2.1"
use ;
let user_id = new;
let task_id = new;
let context_id = new;
println!;
use ;
Types
All ID types implement:
Clone,Debug,PartialEq,Eq,HashSerialize,Deserialize(with#[serde(transparent)])AsRef<str>,Display
Feature Flags
| Feature | Default | Description |
|---|---|---|
sqlx |
No | SQLx type implementations for database queries |
Dependencies
serde— Serializationuuid— UUID generationschemars— JSON schema generation
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.