Skip to main content

Kitaru LangSmith importer

Import LangSmith run-query and bulk-export records as Kitaru sessions. This package backs the built-in kitaru/langsmith 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 langsmith-runs.jsonl \
  --importer kitaru/langsmith@latest \
  --agent support-agent@latest \
  --wait

The importer accepts LangSmith JSON and JSONL export shapes, reconstructs run hierarchy, and groups traces using thread-like metadata or an explicit grouping path. Re-importing the same source identity skips sessions that Kitaru already stores.

For exports without project identity, pass --params '{"source_instance":"my-project"}' or use the project_name alias. source_instance takes precedence over project_name, and both override embedded project identity. Reuse the same value for repeated exports from the same project.

See the LangSmith 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.

Duplicate run IDs reject the complete LangSmith trace before grouping, including identical repeated records. Reusing a run ID in another trace remains valid; a self-parent link is treated as a root. 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-langsmith-importer[adapter]"

The package also ships an adapter that imports LangSmith traces of wrapped agent runs. The adapter uses the LangSmith SDK already configured in your process and the Kitaru connection from your environment. Set LANGSMITH_API_KEY (plus LANGSMITH_ENDPOINT for a self-hosted instance) to the credentials the trace fetch authenticates with, then wrap your agent entrypoint in a LangSmithAdapter and run it through the adapter.

from kitaru_langsmith_importer.adapter import LangSmithAdapter

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

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

Embedded session_id and project_id values take precedence over session_name and project_name across related runs. Conflicting IDs reject the trace or grouped session; names are compared only when no embedded ID is present.

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-langsmith-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-langsmith-importer 0.5.0
File Size Uploaded Provenance Actions
kitaru_langsmith_importer-0.5.0.tar.gz 20.7 kB With provenance Details for kitaru_langsmith_importer-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 40.2 kB

Release files / kitaru_langsmith_importer-0.5.0.tar.gz

Download URL kitaru_langsmith_importer-0.5.0.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cc68ce64181c00363bdba772e42e5e1b44fafc75b1f532f5991279fdf53bcd8d
BLAKE2b-256 checksum
How to use checksums
90a28ddd17d69e6a8ec2b14ef846e40aba0e7c936b04b39432816adc64b4a42d
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_langsmith_importer-0.5.0-py3-none-any.whl

Download URL kitaru_langsmith_importer-0.5.0-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75e77b974fa974da2a3793508baf6702f222f9e183183ba7c699a324f1b5d081
BLAKE2b-256 checksum
How to use checksums
1f1fdc8a73c1665ef5bb0d04ee02ab01506980f56068000c464ac806d3730be0
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-langsmith-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_langsmith_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