Skip to main content

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.

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.

Licensed under Apache-2.0.

Metadata

Release files for kitaru-langfuse-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)

Source distribution for kitaru-langfuse-importer 0.2.0
File Size Uploaded
kitaru_langfuse_importer-0.2.0.tar.gz 19.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kitaru-langfuse-importer 0.2.0
File Interpreter ABI Platform
kitaru_langfuse_importer-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.5 kB

Release files / kitaru_langfuse_importer-0.2.0.tar.gz

Download URL kitaru_langfuse_importer-0.2.0.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d8c8901a3f2b62337c937134cbb684515ce9a5ac49c4e08109c8eda0ead18bba
BLAKE2b-256 checksum
How to use checksums
59dbc565235573b1e736b3760893b05f71a4d635ab83aec4ee71b92002026607
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

Release files / kitaru_langfuse_importer-0.2.0-py3-none-any.whl

Download URL kitaru_langfuse_importer-0.2.0-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fa9549462468b48c4b6fde210564c3f86a54fb910d77f37ed2f9136151ceb2c
BLAKE2b-256 checksum
How to use checksums
ef9f4b229e8b4e3178b74aa2c9616500dfe74396d1e4fc46ffdfba280b1a878e
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
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