Kitaru Langfuse importer
Import Langfuse JSON and JSONL trace exports as Kitaru sessions. This package backs the built-in kitaru/langfuse 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 langfuse-export.jsonl \
--importer kitaru/langfuse@latest \
--agent support-agent@latest \
--wait
The importer understands Langfuse trace, observation, and ingestion-event records. It preserves hierarchy, timing, models, token usage, cost, and source payloads when the export provides them. Re-importing the same source identity skips sessions that Kitaru already stores.
If the export has no embedded project ID, pass --params '{"source_instance":"my-langfuse-project"}' (or use the project_id alias). Reuse the same value for subsequent exports from that project. Filenames do not determine source identity. An explicit source_instance takes precedence over project_id, followed by the embedded project ID.
See the Langfuse import guide for accepted formats, parameters, deduplication behavior, and fidelity limits.
Malformed exports
The importer rejects a grouped session with invalid costs, token counts, model fields, or payload text that cannot be serialized, while preserving unrelated sessions. Costs must be finite and nonnegative, token counts must be nonnegative, and optional model/provider fields must be strings or null. A trace rejected before session grouping does not invalidate another trace sharing its session ID.
Nested observation trees support up to 64 nodes along any root-to-leaf path, counting the root as depth 1. The limit applies before and after inferred tool links. Tool-call scanning also has a cumulative depth budget of 64 across containers and decoded JSON strings; exceeding it rejects the session instead of silently dropping links. An outer document that cannot be decoded is rejected as an upload.
Adapter
Install the package with the adapter extra to use the adapter, which adds the provider SDK it needs:
uv add "kitaru-langfuse-importer[adapter]"
The package also ships an adapter that imports Langfuse traces of wrapped agent runs. The adapter uses the Langfuse client already configured in your process and the Kitaru connection from your environment. Wrap your agent entrypoint in a LangfuseAdapter and run it through the adapter.
from kitaru_langfuse_importer.adapter import LangfuseAdapter
adapter = LangfuseAdapter()
result = adapter.run(my_agent, "Hello")
The adapter runs the function inside a Langfuse trace, waits for Langfuse 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.
Project identity values must be strings. Leading and trailing whitespace is removed; null, empty, and whitespace-only values are absent. Invalid identity types and conflicting embedded projects are rejected even when an explicit parameter would override them. API query fields select what to fetch; import params select the identity used by the parser. File and API imports use the same identity rules.
Metadata
Release files for kitaru-langfuse-importer 0.4.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_langfuse_importer-0.4.0.tar.gz | 24.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kitaru_langfuse_importer-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.6 kB
Release files / kitaru_langfuse_importer-0.4.0.tar.gz
| Download URL | kitaru_langfuse_importer-0.4.0.tar.gz |
|---|---|
| Size | 24.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6749b51d462443aabf8f86dfde9a9aa40800235632812cc37ad7df69452e64e6
|
|
BLAKE2b-256 checksum How to use checksums |
313a810ad29536f87fe9c94afc2b30f199d1f0931f3c48a2b81ba83a998a87df
|
| 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 21, 2026.
Transparency logRelease files / kitaru_langfuse_importer-0.4.0-py3-none-any.whl
| Download URL | kitaru_langfuse_importer-0.4.0-py3-none-any.whl |
|---|---|
| Size | 23.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db86e9e9cea6bb2f834c71d8e68a4f6779577434625f9948a8767f37b70b04c6
|
|
BLAKE2b-256 checksum How to use checksums |
8741c1ec6b1d9af887798195d9b9f648c2cee57440740347cbea20475c2ae6c7
|
| 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 21, 2026.
Transparency log