Skip to main content

Kitaru Logfire importer

Import Logfire records-query JSON and NDJSON exports as Kitaru sessions. This package backs the built-in kitaru/logfire 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 logfire-records.jsonl \
  --importer kitaru/logfire@latest \
  --agent support-agent@latest \
  --wait

The importer rebuilds span hierarchy and conservatively identifies model and tool calls from OpenTelemetry attributes. Source identity uses source_instance, then the project_id parameter alias, then the embedded record project_id. Values must be strings; surrounding whitespace is removed, and empty values are absent. If none is available, the affected trace fails: retry with --params '{"source_instance":"my-logfire-project"}'. Conflicting embedded project IDs remain errors even with an override. File and API imports use the same identity rules; API credentials do not supply a project identity. Keep the identity stable across imports to preserve deduplication.

See the Logfire import guide for accepted formats, parameters, deduplication behavior, and fidelity limits.

Nested span paths support up to 64 levels, counting a root as level 1. Invalid costs, token counts, embedded JSON, and text that cannot serialize reject the affected grouped session; unrelated sessions continue. A trace rejected before grouping does not prevent a valid sibling trace from importing into the same session.

Adapter

Install the package with the adapter extra to use the adapter, which adds the provider SDK it needs:

uv add "kitaru-logfire-importer[adapter]"

The package also ships an adapter that imports Logfire traces of wrapped agent runs. The adapter uses the Logfire SDK already configured in your process and the Kitaru connection from your environment. Set LOGFIRE_TOKEN to the write token the SDK records traces with.

The trace fetch goes through the Logfire Query API, which authenticates with a read token, a separate credential from the SDK's write token. Create one under your Logfire project settings and set it as LOGFIRE_READ_TOKEN. Then wrap your agent entrypoint in a LogfireAdapter and run it through the adapter.

from kitaru_logfire_importer.adapter import LogfireAdapter

adapter = LogfireAdapter()
result = adapter.run(my_agent, "Hello")

The adapter runs the function inside a Logfire trace, waits for Logfire 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.

Licensed under Apache-2.0.

Metadata

Release files for kitaru-logfire-importer 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kitaru-logfire-importer 0.5.0
File Size Uploaded Provenance Actions
kitaru_logfire_importer-0.5.0.tar.gz 18.8 kB With provenance Details for kitaru_logfire_importer-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kitaru-logfire-importer 0.5.0
File Interpreter ABI Platform Actions
kitaru_logfire_importer-0.5.0-py3-none-any.whl Python 3 none any Details for kitaru_logfire_importer-0.5.0-py3-none-any.whl

Total release size: 36.6 kB

Release files / kitaru_logfire_importer-0.5.0.tar.gz

Download URL kitaru_logfire_importer-0.5.0.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ba30c5bef0dba6c03f992fa3a62d8c30027a401a296ebea4321d3c9c7229ab19
BLAKE2b-256 checksum
How to use checksums
e3feadc4723c9ed4b4b7da79176804de41203b1b6c8ccbe31b33b4266e9f8cde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 25, 2026.

Transparency log

Release files / kitaru_logfire_importer-0.5.0-py3-none-any.whl

Download URL kitaru_logfire_importer-0.5.0-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d385b6c32da15cf1eafef589047f90fe2211a70864fb9fda11715cba4eaf685b
BLAKE2b-256 checksum
How to use checksums
e524ddc255c9908153d9591e1eee0e1b1064ba359cab1f31caf896307e47e5ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 25, 2026.

Transparency log

Security for kitaru-logfire-importer 0.5.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kitaru_logfire_importer-0.5.0.tar.gz

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 Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page