Storage, AI & Real-time

Read-through storage, the AI SDK and agents, JSON:API resources, broadcasting, and mail.

Storage

Storage is a facade over object_store 0.14 (S3/GCS/Azure) with a local disk on tokio::fs.

CapabilityDetail
Read-throughPrimary plus fallback disk, with optional copy-on-read
Path confinementStorage::path() never escapes the disk root
Configurationconfig/storage.toml drives StorageManager::from_toml
SFTPPure-Rust russh disk behind the opt-in storage-sftp feature
bash
cargo artisan make:controller UploadController

AI SDK

rustasea-ai defines a provider-agnostic trait with real HTTP adapters via reqwest. provider_from_env() supports OpenAI, Anthropic, Azure, Groq, xAI, DeepSeek, Mistral, Ollama, OpenRouter, and OpenAI-compatible endpoints. Gemini and Bedrock have no adapter yet and return AiError::UnknownProvider.

Agents and tools are first-class:

bash
cargo artisan make:agent SupportAgent
cargo artisan make:tool SearchOrders
FeatureDetail
ContractsAgent trait with structured output and streaming
CompositionSub-agents, middleware, anonymous agents
Deferred loadingSimilaritySearch, FileStorage, ToolSearch
QueueingAgentRunJob for background agent runs
MCPClient and registry for consuming external MCP servers
rust
let agent = SupportAgent::new()
    .with_tool(SearchOrders)
    .stream("Where is my order?")
    .await?;

JSON:API resources

JsonApiResource is serde-based and renders Content-Type: application/vnd.api+json, with sparse fieldsets, relationship inclusion, links, and headers.

Broadcasting and real-time

ChannelDetail
WebSocketaxum ws feature (enabled by default in rustasea-broadcast)
SSEResponse::eventStream
TraitShouldBroadcast
Fan-outbroadcast-redis and broadcast-pusher features
SecurityChannel authorization

config/broadcasting.toml selects the connection; the in-process hub is the zero-dependency default, and pusher/redis connections are feature-gated.

Presentation layers

CratePurpose
rustasea-viewaskama (default, build-time compile) and minijinja (opt-in, runtime)
rustasea-inertia + -client + -adaptersInertia server, WASM client, and React/Vue/Svelte adapters
rustasea-livewireaskama components with HTMX swaps

Mail and notifications

rustasea-mail provides Mailable, Mailer implementations (ArrayMailer, LogMailer, SmtpMailer), and queued notifications with #[deleteWhenMissingModels].

Observability

Both are off by default:

  • rustasea-debugbar — per-request SQL/cache/event capture into an in-memory ring buffer with a JSON/HTML surface.
  • rustasea-queue-dashboard — live queue depth and age, queue_metrics history with retention, failed-job retry/forget, and worker heartbeats.

Last updated Sep 22, 2026