Kitaru Braintrust importer
Import Braintrust project-log and UI exports as Kitaru sessions. This package backs the built-in kitaru/braintrust importer and runs on a Kitaru worker, so the export is parsed in your environment.
Most users do not install or call this package directly. Start a Kitaru worker, then select the built-in importer:
kitaru session import braintrust-logs.jsonl \
--importer kitaru/braintrust@latest \
--agent support-agent@latest \
--wait
The importer accepts Braintrust JSON and JSONL export shapes, preserves source hierarchy and evidence when present, and records fidelity warnings for incomplete exports. Re-importing the same source identity skips sessions that Kitaru already stores.
See the Braintrust import guide for accepted formats, grouping parameters, deduplication behavior, and fidelity limits.
Validation limits
Nested node trees support at most 64 nodes along a parent path, counting the root as level 1. Tool-activity scans have a separate limit of 64 container or embedded-JSON decoding steps. Costs must be finite and nonnegative, token counts must be nonnegative, and returned sessions must serialize as JSON.
Conflicting project IDs reject the complete Braintrust trace before grouping. A single explicit project ID anywhere in a trace takes precedence over the source-instance or filename fallback. A failure discovered before grouping leaves other traces available, even when they share a session key. Invalid fields or serialization failures found after grouping reject that grouped session; unrelated sessions still import.
Adapter
Install the package with the adapter extra to use the adapter, which adds the provider SDK it needs:
uv add "kitaru-braintrust-importer[adapter]"
The package also ships an adapter that imports Braintrust traces of wrapped agent runs. The adapter uses the Braintrust logger already configured in your process and the Kitaru connection from your environment. Set BRAINTRUST_API_KEY to the key the trace fetch authenticates with, then wrap your agent entrypoint in a BraintrustAdapter and run it through the adapter.
from kitaru_braintrust_importer.adapter import BraintrustAdapter
adapter = BraintrustAdapter()
result = adapter.run(my_agent, "Hello")
The adapter runs the function inside a Braintrust span, waits for Braintrust to finish ingesting the trace, fetches it, and imports it as one Kitaru session. Use run_async for async functions. When the trace does not complete within the completeness timeout, the adapter creates a failed session carrying the trace id.
Links
Licensed under Apache-2.0.
Metadata
Release files for kitaru-braintrust-importer 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kitaru_braintrust_importer-0.2.0.tar.gz | 16.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kitaru_braintrust_importer-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.8 kB
Release files / kitaru_braintrust_importer-0.2.0.tar.gz
| Download URL | kitaru_braintrust_importer-0.2.0.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b2c32dd304ff0570041920d9f8c3a0a2dd19e9fc0ba1f9d005b9cbe1bb2fd1e
|
|
BLAKE2b-256 checksum How to use checksums |
c944c2975483f0a92ca1f203f0a02f9be069c71e6e33a3b15c0a21da5c6ea5e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency logRelease files / kitaru_braintrust_importer-0.2.0-py3-none-any.whl
| Download URL | kitaru_braintrust_importer-0.2.0-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
090540439d8d49fb60625d5979402fc9a491cb1fbab6358dc9d5cb1a612069c5
|
|
BLAKE2b-256 checksum How to use checksums |
1bef636c5a9c3a6e3045e4b7f693d34bb85136fcdb84f742aa776f96bf200c71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 3, 2026.
Transparency log