| Crates.io | systemprompt-provider-contracts |
| lib.rs | systemprompt-provider-contracts |
| version | 0.0.11 |
| created_at | 2026-01-21 17:12:21.223199+00 |
| updated_at | 2026-01-25 21:41:22.860113+00 |
| description | Provider trait contracts for systemprompt.io - LLM, Tool, Job, Template, Component providers |
| homepage | https://systemprompt.io |
| repository | https://github.com/systempromptio/systemprompt-core |
| max_upload_size | |
| id | 2059715 |
| size | 51,910 |
Provider trait contracts for systemprompt.io - LLM, Tool, Job, Template, Component providers.
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.
Add to your Cargo.toml:
[dependencies]
systemprompt-provider-contracts = "0.0.1"
use systemprompt_provider_contracts::{
LlmProvider, ChatRequest, ChatResponse, LlmProviderResult,
ToolProvider, ToolDefinition, ToolCallRequest, ToolCallResult,
};
use async_trait::async_trait;
struct MyLlmProvider;
#[async_trait]
impl LlmProvider for MyLlmProvider {
async fn chat(&self, request: ChatRequest) -> LlmProviderResult<ChatResponse> {
// Implementation
todo!()
}
}
| 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 |
| Crate | Purpose |
|---|---|
systemprompt-identifiers |
Typed identifiers |
| Crate | Purpose |
|---|---|
async-trait |
Async trait support |
inventory |
Compile-time registration |
serde |
Serialization |
FSL-1.1-ALv2 - See LICENSE for details.