ServiceNow document loaders for LangChain — load Incidents, CMDB, KB, Changes, Problems, and Catalog into LangChain Documents.
Project description
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...")
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_snowloader-0.1.0.tar.gz.
File metadata
- Download URL: langchain_snowloader-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d85c035d718be965dfc98eeb777371c9b694b60d77747c9af05fa8b85f46dbb6
|
|
| MD5 |
2b55716478ccf1b774e46874609429be
|
|
| BLAKE2b-256 |
7c2c79ae5e83ee826b129c007979508727b12520602e60e2100252b498616f51
|
Provenance
The following attestation bundles were made for langchain_snowloader-0.1.0.tar.gz:
Publisher:
publish.yml on ronidas39/langchain-snowloader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_snowloader-0.1.0.tar.gz -
Subject digest:
d85c035d718be965dfc98eeb777371c9b694b60d77747c9af05fa8b85f46dbb6 - Sigstore transparency entry: 1183387531
- Sigstore integration time:
-
Permalink:
ronidas39/langchain-snowloader@faffd4d105c99eee6f422cd2f1aa71fbfb3eb0e6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ronidas39
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@faffd4d105c99eee6f422cd2f1aa71fbfb3eb0e6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file langchain_snowloader-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_snowloader-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18511882ac73a29915263658f0ee879403c52a245e02c11f187bf628c7b5fb3a
|
|
| MD5 |
8781c8e55650a75aa0cf1f6feec16673
|
|
| BLAKE2b-256 |
b41df50f8ad5ef98e854af42cb045c2de5a71aacd6ea074b067b4b07e1c76040
|
Provenance
The following attestation bundles were made for langchain_snowloader-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on ronidas39/langchain-snowloader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_snowloader-0.1.0-py3-none-any.whl -
Subject digest:
18511882ac73a29915263658f0ee879403c52a245e02c11f187bf628c7b5fb3a - Sigstore transparency entry: 1183387553
- Sigstore integration time:
-
Permalink:
ronidas39/langchain-snowloader@faffd4d105c99eee6f422cd2f1aa71fbfb3eb0e6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ronidas39
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@faffd4d105c99eee6f422cd2f1aa71fbfb3eb0e6 -
Trigger Event:
push
-
Statement type: