systemprompt-provider-contracts
Provider trait contracts for systemprompt.io - LLM, Tool, Job, Template, Component providers.
Overview
Defines the core provider trait contracts used throughout systemprompt.io. These traits establish the interface boundaries for LLM providers, tool executors, job runners, template providers, and component renderers. Implementations live in domain crates while contracts remain in the shared layer for maximum composability.
Part of the Shared layer in the systemprompt.io architecture.
Installation
Add to your Cargo.toml:
[]
= "0.0.1"
Quick Example
use ;
use async_trait;
;
Core Types
| Type | Description |
|---|---|
LlmProvider |
Trait for LLM chat completions |
ToolProvider |
Trait for tool discovery and execution |
Job |
Trait for background job execution |
TemplateProvider |
Trait for template loading |
ComponentRenderer |
Trait for component rendering |
PageDataProvider |
Trait for page data injection |
TemplateDataExtender |
Trait for extending template context |
Dependencies
Internal
| Crate | Purpose |
|---|---|
systemprompt-identifiers |
Typed identifiers |
External
| Crate | Purpose |
|---|---|
async-trait |
Async trait support |
inventory |
Compile-time registration |
serde |
Serialization |
License
FSL-1.1-ALv2 - See LICENSE for details.