langchain-snowloader
ServiceNow document loaders for LangChain, powered by snowloader.
Covers six core ServiceNow tables - Incidents, Knowledge Base, CMDB, Changes, Problems, and Service Catalog - with production-grade features like retry logic, delta sync, CMDB relationship traversal, and HTML cleaning.
Installation
pip install langchain-snowloader
Usage
from snowloader import SnowConnection
from langchain_snowloader import ServiceNowIncidentLoader
conn = SnowConnection(
instance_url="https://mycompany.service-now.com",
username="admin",
password="password",
)
loader = ServiceNowIncidentLoader(connection=conn, query="active=true")
docs = loader.load() # list[langchain_core.documents.Document]
# Use with any vector store
from langchain_community.vectorstores import FAISS
from langchain_openai import OpenAIEmbeddings
vectorstore = FAISS.from_documents(docs, OpenAIEmbeddings())
Available Loaders
| Loader | ServiceNow Table | Description |
|---|---|---|
ServiceNowIncidentLoader |
incident |
IT incidents with optional work notes/comments |
ServiceNowKBLoader |
kb_knowledge |
Knowledge Base articles (HTML auto-cleaned) |
ServiceNowCMDBLoader |
cmdb_ci |
Configuration Items with relationship graph traversal |
ServiceNowChangeLoader |
change_request |
Change requests with implementation windows |
ServiceNowProblemLoader |
problem |
Problems with root cause and known error tracking |
ServiceNowCatalogLoader |
sc_cat_item |
Service catalog items |
CMDB with Relationships
from langchain_snowloader import ServiceNowCMDBLoader
loader = ServiceNowCMDBLoader(
connection=conn,
ci_class="cmdb_ci_server",
include_relationships=True,
)
docs = loader.load()
print(docs[0].page_content)
# Configuration Item: web-prod-01
# Class: cmdb_ci_server
# ...
# Relationships:
# -> db-prod-01 (Depends on::Used by)
# <- load-balancer-01 (Depends on::Used by)
Delta Sync
Only fetch records updated since your last sync:
from datetime import datetime, timezone
loader = ServiceNowIncidentLoader(connection=conn)
docs = loader.load()
last_sync = datetime.now(timezone.utc)
# Next run - only get changes
updated = loader.load_since(last_sync)
Lazy Loading
Stream documents one at a time for memory efficiency:
for doc in loader.lazy_load():
print(f"[{doc.metadata['number']}] {doc.page_content[:100]}")
Authentication
snowloader supports four auth modes:
# Basic Auth (development)
conn = SnowConnection(instance_url="...", username="...", password="...")
# OAuth Client Credentials (recommended for production)
conn = SnowConnection(instance_url="...", client_id="...", client_secret="...")
# OAuth Password Grant
conn = SnowConnection(instance_url="...", client_id="...", client_secret="...",
username="...", password="...")
# Bearer Token
conn = SnowConnection(instance_url="...", token="eyJhbG...")
Author
Created and maintained by Roni Das - thetotaltechnology@gmail.com
Links
Metadata
Release files for langchain-snowloader 0.8.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 | |
|---|---|---|---|
| langchain_snowloader-0.8.1.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_snowloader-0.8.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB
Release files / langchain_snowloader-0.8.1.tar.gz
| Download URL | langchain_snowloader-0.8.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
355bcc07fc9adf44e57d5dd6f014356b1dddb715615275fcd050dff9e74da226
|
|
BLAKE2b-256 checksum How to use checksums |
3682b3ebba11b9fd26dabc1c53982240e8b8dc7773b49b3a76c934920d57fd40
|
| 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 Aug 30, 2026.
Transparency logRelease files / langchain_snowloader-0.8.1-py3-none-any.whl
| Download URL | langchain_snowloader-0.8.1-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ebaed97d82be3b70296dd4600b1e424109f246de4acbfed3006d6319e753bf0c
|
|
BLAKE2b-256 checksum How to use checksums |
dec9c545b2c85876f6a4a88e25dbe59c7a1e4a913d7c5057a124ff91b96d5be0
|
| 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 Aug 30, 2026.
Transparency log