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.

Links

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.3.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.3.0
File Size Uploaded
kitaru_langsmith_importer-0.3.0.tar.gz 18.4 kB Details

Built distribution (wheel)

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

Total release size: 35.8 kB

Release files / kitaru_langsmith_importer-0.3.0.tar.gz

Download URL kitaru_langsmith_importer-0.3.0.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
be29db758dc607627c89701d7fc617b563717b9ddd72c227a563088a71d2fcac
BLAKE2b-256 checksum
How to use checksums
24ef194b992173d2eec5f00c09b1c849e205fd3ca6d9d71fd8787c37cabea07f
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 10, 2026.

Transparency log

Release files / kitaru_langsmith_importer-0.3.0-py3-none-any.whl

Download URL kitaru_langsmith_importer-0.3.0-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
932030318367f327e6a61206e7d4ad3137a69689e72fcfaf4c3aac621d13e9f8
BLAKE2b-256 checksum
How to use checksums
c2dfe7361be461899875514fa4ffca2e7473608e0dbd51935583c55f424832d4
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 10, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

2 release files

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

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