Build with LedgeKit
See what your models did. Use real application inputs to make the next version better.
LedgeKit records your app's model calls and brings their inputs, responses, timing, and errors into one place. Add tracing to an Apple Foundation Models session, inspect the result in the console, and turn useful inputs into evaluation datasets.
Record your first request
Connect the Swift SDK and see a Foundation Models response in the console.
Explore the Swift SDK
Trace structured responses, multi-turn sessions, and agent workflows.
Evaluate real inputs
Save captured inputs and evaluate your application against them.
Use the HTTP API
Upload traces and evaluations, read traces, and download datasets.
From a request to a better result
- Record a model request. Wrap your existing Foundation Models session. Your app still receives Apple's original response.
- Inspect what happened. Open the trace to see native model input/output, agent version, timing, and errors.
- Save an input. Add a useful trace or span's captured application input to a dataset in the console.
- Evaluate your current code. Download the dataset into your test target, execute your application's current implementation, and score its results.
- Review the report. Upload the original native evaluation file and inspect its samples and metrics.
Choose an integration
LedgeKit provides the Foundation Models adapter and durable trace delivery. The optional LedgeKitTesting product provides datasets and evaluation reporting. Start with the quickstart.
Model attempts are captured through Foundation Models sessions. The SDK owns their inputs and outputs; applications cannot supply manual model recordings.
What gets recorded
A trace groups model calls. Each span records the agent's identity and version, its model input/output, native capture, timing, and outcome. Your app can also attach original inputs, prompt templates, and output references.
Read traces, agents, and spans to understand how the records relate to the trace and span views in the console.