anlyon-langchain
LangChain integration for Anlyon: AnlyonVectorStore and AnlyonRetriever over Anlyon Memory, AnlyonChatMessageHistory over Anlyon Sessions, and AnlyonTracer for nested run/span tracing.
Trace a LangChain invocation
from anlyon import Client
from anlyon_langchain import AnlyonTracer
client = Client(api_key="anlyon_live_...")
tracer = AnlyonTracer(client, application="support-agent")
# Pass the callback to any LangChain runnable/agent invocation.
result = chain.invoke({"question": "Where is my order?"}, config={"callbacks": [tracer]})
The handler creates one Anlyon run for the root callback and parent-linked
workflow_step, model_call, and tool_call spans for nested callbacks. It is
best-effort: Anlyon transport failures never change the application result.
Installation
pip install anlyon-langchain
Retrieval
from anlyon import Client
from anlyon_langchain import AnlyonVectorStore
client = Client() # uses ANLYON_API_KEY
store = AnlyonVectorStore(client, collection="docs")
retriever = store.as_retriever()
Chat history
AnlyonChatMessageHistory puts a chain's conversation in an Anlyon Session durable across processes, and summarized automatically once the thread gets long.
from anlyon import Client
from anlyon_langchain import AnlyonChatMessageHistory
from langchain_core.runnables.history import RunnableWithMessageHistory
client = Client()
chain_with_history = RunnableWithMessageHistory(
chain,
lambda session_id: AnlyonChatMessageHistory(client, session_id),
input_messages_key="input",
history_messages_key="history",
)
# `session_id` is an Anlyon session id create one with client.sessions.create()
chain_with_history.invoke(
{"input": "Where is my order?"},
config={"configurable": {"session_id": "ses_abc123"}},
)
.messages reads the thread back as LangChain messages, .add_messages() appends a turn in one round-trip, and .clear() truncates the thread while keeping the session id usable.
See the Anlyon docs for the full guide.
License
MIT
Metadata
Release files for anlyon-langchain 0.2.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 | Provenance | Actions |
|---|---|---|---|---|
| anlyon_langchain-0.2.0.tar.gz | 10.2 kB | With provenance | Details for anlyon_langchain-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anlyon_langchain-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for anlyon_langchain-0.2.0-py3-none-any.whl |
Total release size: 20.1 kB
Release files / anlyon_langchain-0.2.0.tar.gz
| Download URL | anlyon_langchain-0.2.0.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d61a72782a1fba12abec6752e868eafd1448d96be7f349f9190fcab8ece292e8
|
|
BLAKE2b-256 checksum How to use checksums |
5f4999b0dfc8ee631ba3834ac4c518d1297771beac29df9bdc5ee468b8b576d3
|
| 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 20, 2026.
Transparency logRelease files / anlyon_langchain-0.2.0-py3-none-any.whl
| Download URL | anlyon_langchain-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dfa46562ccec707b6cb738040ce955a34780c561ab992ec840be31d772257552
|
|
BLAKE2b-256 checksum How to use checksums |
7b66a99f8aa46428eb5418d0ff316244f1ee6bd466af351874a55b869742b991
|
| 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 20, 2026.
Transparency logSecurity for anlyon-langchain 0.2.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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for anlyon_langchain-0.2.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 Sep 20, 2026.
Transparency logA 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.