calado-langchain
Drop-in calado observability for LangChain and LangGraph agents.
Install
pip install 'calado-langchain==0.0.1'
Requires Python 3.9+ and langchain-core>=0.2.10,<0.5.
Quick start
import os
from calado_langchain import CaladoCallbackHandler
os.environ["CALADO_API_KEY"] = "cl_..."
handler = CaladoCallbackHandler()
# Per-chain mode
chain.invoke(
{"input": "..."},
config={
"callbacks": [handler],
"metadata": {"session_id": "user-42"},
},
)
The SDK reads session_id from metadata. It also picks up
thread_id (LangGraph convention) and langsmith_session_id /
langchain_session_id automatically, plus a session:<id> tag as
a fallback.
Or set CALADO_ENABLED=true plus CALADO_API_KEY=cl_... and the
handler attaches to every chain in the process automatically. No code
change required.
On the first successful POST a single line lands in stderr:
[calado] Connected. First batch sent. View at https://app.calado.ai/agents/<agent_id>
Public surface
CaladoCallbackHandler(
*,
api_key=None, # or env CALADO_API_KEY
base_url=None, # or env CALADO_BASE_URL, default https://app.calado.ai
batch_size=10,
flush_interval_s=30.0,
max_run_age_s=3600.0,
max_queue_bytes=10 * 1024 * 1024,
debug=False,
mask=None, # callable: dict -> dict | None (sync or async)
)
CaladoAsyncCallbackHandler(...) # same signature, for ainvoke / LangGraph
handler.status() # dict — see docs/transport-spec.md §3
await handler.astatus()
handler.flush(timeout_s=5.0)
handler.shutdown(timeout_s=5.0)
Constructor is keyword-only. The mask callable can be either sync or
async; the SDK detects which without invoking it. Returning None drops
that single child run (per-OV7 granularity). Patterns and recipes live
at https://docs.calado.ai/ingestion/redaction.
Diagnostics
python -m calado_langchain doctor
Prints the installed calado-langchain and langchain-core versions,
the supported range, and the fix command on resolver failure.
Pre-1.0 semver
calado-langchain is pre-1.0. Minor versions (0.x.0) may introduce
breaking changes. Pin exactly until 1.0 ships. See
CHANGELOG.md.
Links
- Docs — https://docs.calado.ai/ingestion/langchain
- Redaction patterns — https://docs.calado.ai/ingestion/redaction
- Shared transport spec —
docs/transport-spec.md - Plan + review trail —
plans/langchain_callback_handler.md
Metadata
Release files for calado-langchain 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| calado_langchain-0.0.1.tar.gz | 31.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| calado_langchain-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.5 kB
Release files / calado_langchain-0.0.1.tar.gz
| Download URL | calado_langchain-0.0.1.tar.gz |
|---|---|
| Size | 31.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a827ea8b5e3f63cf8bbd2a7cdef07ba15fc7cf4a82b0d52b207a7601b7106c39
|
|
BLAKE2b-256 checksum How to use checksums |
d7d65c5c8370f9ad80fe1eca88482874e9136a3bb0a292d69bb90a821c0af5b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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 May 14, 2026.
Transparency logRelease files / calado_langchain-0.0.1-py3-none-any.whl
| Download URL | calado_langchain-0.0.1-py3-none-any.whl |
|---|---|
| Size | 32.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b111f30fafdf0987ac3b41c1b87b87ac6a2263c28224de770f790382ad531dbf
|
|
BLAKE2b-256 checksum How to use checksums |
75653795fdee4f3afb9b1f87930ba6e470f7cb85346cac550d9c8e3a7c8166bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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 May 14, 2026.
Transparency log