Tardis Runtime Docs
Practical reference for the AI SDK, ingestion pipeline, and Runtime API.
This repository is split into three boundaries:
- AI SDK (
packages/ai): provider-agnostic inference interface. - Runtime API (
apps/server): Conversation + Turn orchestration over HTTP. - DB/Ingestion layer (
packages/db): persists Messages, Turns, Inference Requests, and inference lifecycle events.
Domain model at a glance
- A Conversation contains many Messages and many Turns.
- A Turn starts from one user Message and may execute one or more Inference Requests.
- Each Turn records one Committed Assistant Message (the reply shown to the user).
- An Inference Request stores attempt-level telemetry and status.
Data flow
- Client calls
POST /conversations/:id/messages(or/stream) on the Runtime API. - Runtime persists the user Message and creates a pending Turn.
- Runtime builds request context from Conversation Message history.
- Runtime invokes
aiSdk.stream(...). - Canonical stream events are normalized and persisted as
inference_events. - Runtime finalizes the Inference Request, writes the Committed Assistant Message, and completes the Turn.
- Inspection endpoints expose request/event history and latency metrics.