Skip to main content

ServiceNow data reader for LlamaIndex — load Incidents, CMDB, KB, Changes, Problems, and Catalog into LlamaIndex Documents.

Project description

LlamaIndex Readers Integration: snowloader

ServiceNow data readers for LlamaIndex, 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 llama-index-readers-snowloader

Usage

from snowloader import SnowConnection
from llama_index.readers.snowloader import ServiceNowIncidentReader

conn = SnowConnection(
    instance_url="https://mycompany.service-now.com",
    username="admin",
    password="password",
)

# Load active incidents
reader = ServiceNowIncidentReader(connection=conn, query="active=true")
documents = reader.load_data()

# Build an index
from llama_index.core import VectorStoreIndex

index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
response = query_engine.query("What incidents are related to email?")

Available Readers

Reader ServiceNow Table Description
ServiceNowIncidentReader incident IT incidents with optional work notes/comments
ServiceNowKBReader kb_knowledge Knowledge Base articles (HTML auto-cleaned)
ServiceNowCMDBReader cmdb_ci Configuration Items with relationship graph traversal
ServiceNowChangeReader change_request Change requests with implementation windows
ServiceNowProblemReader problem Problems with root cause and known error tracking
ServiceNowCatalogReader sc_cat_item Service catalog items

CMDB with Relationships

from llama_index.readers.snowloader import ServiceNowCMDBReader

reader = ServiceNowCMDBReader(
    connection=conn,
    ci_class="cmdb_ci_server",
    include_relationships=True,
)

for doc in reader.load_data():
    print(doc.text)
    # -> 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

reader = ServiceNowIncidentReader(connection=conn)
docs = reader.load_data()
last_sync = datetime.now(timezone.utc)

# Next run — only get changes
updated = reader.load_data_since(last_sync)

Authentication

snowloader supports four auth modes:

# Basic Auth
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_readers_snowloader-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_readers_snowloader-0.1.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_snowloader-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a18f318f1a89bfdcdc77a557117b784992ede07b1f877f71c13ac08c4a769ef7
MD5 a592a959a8fd776650e7496164495556
BLAKE2b-256 325455893e8c1bddedff41463273c4eb7456bd798a52a3533573648875db2190

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_readers_snowloader-0.1.0.tar.gz:

Publisher: publish.yml on ronidas39/llama-index-readers-snowloader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llama_index_readers_snowloader-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_snowloader-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76bb86c4d9b3efc146fa696aef131c0eb215d8d3bd85351f0beee362e2b61489
MD5 698299b8c5f7e2d7a54a53d2bfa0a3ff
BLAKE2b-256 c949d9f42af72b16cbaf760476383248ea7ee5983939a8ee3479ad313cd6fd9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_readers_snowloader-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ronidas39/llama-index-readers-snowloader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page