Skip to main content

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.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 langchain-snowloader 0.3.0
File Size Uploaded
langchain_snowloader-0.3.0.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-snowloader 0.3.0
File Interpreter ABI Platform
langchain_snowloader-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / langchain_snowloader-0.3.0.tar.gz

Download URL langchain_snowloader-0.3.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
af6125e10212d2e4510054bdc48dbfa329ca9c118dcfdbd48c9bafe21e445d6f
BLAKE2b-256 checksum
How to use checksums
ba315a1dcde95f9bcc458a7fe06d35cf07e522d145ab94b5d661bb55adaac390
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 27, 2026.

Transparency log

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

Download URL langchain_snowloader-0.3.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6dec4d836179e7de71ec304342bc7e80f35eb144d4b24f897fd867916335176b
BLAKE2b-256 checksum
How to use checksums
0ae5028a39a552c52ed93c1655d3e63bda9a14885874ddbf0116097671cb3f32
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 27, 2026.

Transparency log

Release history Release notifications | RSS feed

0.8.1

2 release files

0.6.0

2 release files

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.1

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