Build AI agents that interact with ServiceNow for IT service management (ITSM), customer service (CSM), and HR service delivery using the Table API, Flow Designer, and Now Assist AI skills.
Scanned 9/6/2026
Install to Claude Code
npx -y skills add frank-luongt/faos-skills-marketplace --skill servicenow-now-assist --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Servicenow Now Assist?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/frank-luongt-servicenow-now-assist-faos-skills-marketplace)More formats (shields.io, HTML) on the badges page.
<!-- AUTO-GENERATED by export-skills.py — DO NOT EDIT -->
---
name: servicenow-now-assist
description: ServiceNow Now Assist and AI Agent integration patterns. Use when building AI agents for ITSM (incidents, changes, CMDB), CSM, HR service delivery, or integrating with ServiceNow's Flow Designer and Table API.
---
> **Platform Note:** This skill was designed for multi-agent execution. In Codex, treat sub-agent instructions as sequential steps to complete thoroughly within a single agent context.
# ServiceNow Now Assist Integration
Build AI agents that interact with ServiceNow for IT service management (ITSM), customer service (CSM), and HR service delivery using the Table API, Flow Designer, and Now Assist AI skills.
## When to Use
- Automating incident creation, triage, and resolution from AI agents
- Querying CMDB for configuration items and relationships
- Triggering ServiceNow flows and approvals from AI workflows
- Building autonomous IT agents that resolve common issues (password resets, access requests)
- Integrating with Now Assist AI skills (summarization, classification, generation)
## Now Assist Pre-Built AI Skills
| Domain | Skills |
|---|---|
| **ITSM** | Incident summarization, resolution note generation, KB article generation, classification, similar incident matching |
| **ITOM** | Alert summarization, root cause analysis, change risk assessment |
| **CSM** | Case summarization, chat summarization, email response generation, sentiment analysis |
| **HRSD** | HR case summarization, policy Q&A, onboarding assistance |
| **Creator** | Flow generation, app generation, code assist, test generation |
## Patterns
### 1. Table API (CRUD Operations)
```python
import requests
from typing import Any
class ServiceNowClient:
def __init__(self, instance: str, username: str, password: str):
self.base_url = f"https://{instance}.service-now.com/api/now"
self.auth = (username, password)
self.headers = {"Content-Type": "application/json", "Accept": "application/json"}
def _request(self, method: str, endpoint: str, **kwargs) -> dict:
response = requests.request(
method, f"{self.base_url}/{endpoint}",
auth=self.auth, headers=self.headers, **kwargs
)
response.raise_for_status()
return response.json()
# --- Incidents ---
def create_incident(self, short_description: str, description: str = "",
urgency: str = "3", impact: str = "3",
category: str = "inquiry", caller_id: str = "") -> dict:
return self._request("POST", "table/incident", json={
"short_description": short_description,
"description": description,
"urgency": urgency,
"impact": impact,
"category": category,
"caller_id": caller_id,
})["result"]
def get_incident(self, number: str) -> dict:
result = self._request("GET", "table/incident", params={
"sysparm_query": f"number={number}",
"sysparm_limit": 1,
})
return result["result"][0] if result["result"] else {}
def update_incident(self, sys_id: str, updates: dict) -> dict:
return self._request("PATCH", f"table/incident/{sys_id}", json=updates)["result"]
def search_incidents(self, query: str, limit: int = 10) -> list[dict]:
return self._request("GET", "table/incident", params={
"sysparm_query": f"short_descriptionLIKE{query}^ORdescriptionLIKE{query}",
"sysparm_limit": limit,
"sysparm_fields": "number,short_description,state,priority,assigned_to,sys_id",
})["result"]
# --- CMDB ---
def query_cmdb(self, ci_class: str = "cmdb_ci_server", query: str = "", limit: int = 20) -> list[dict]:
params = {"sysparm_limit": limit}
if query:
params["sysparm_query"] = query
return self._request("GET", f"table/{ci_class}", params=params)["result"]
# --- Knowledge Base ---
def search_knowledge(self, query: str, limit: int = 5) -> list[dict]:
return self._request("GET", "table/kb_knowledge", params={
"sysparm_query": f"textLIKE{query}^workflow_state=published",
"sysparm_limit": limit,
"sysparm_fields": "number,short_description,text,sys_id",
})["result"]
# --- Change Requests ---
def create_change_request(self, short_description: str, description: str,
type: str = "normal", risk: str = "moderate") -> dict:
return self._request("POST", "table/change_request", json={
"short_description": short_description,
"description": description,
"type": type,
"risk": risk,
})["result"]
```
### 2. Agent Tool Functions
```python
# Tool functions for AI agent integration
def resolve_it_issue(issue_description: str) -> dict:
"""AI agent tool: attempt to resolve an IT issue autonomously."""
sn = get_servicenow_client()
# 1. Search for similar resolved incidents
similar = sn.search_incidents(issue_description)
resolved = [i for i in similar if i.get("state") == "7"] # State 7 = Closed
# 2. Search knowledge base
kb_articles = sn.search_knowledge(issue_description)
# 3. Create incident if no self-service resolution
if not kb_articles and not resolved:
incident = sn.create_incident(
short_description=issue_description[:160],
description=issue_description,
category="software",
)
return {"action": "created_incident", "number": incident["number"]}
return {
"action": "found_resolution",
"similar_incidents": [{"number": i["number"], "description": i["short_description"]} for i in resolved[:3]],
"kb_articles": [{"number": a["number"], "title": a["short_description"]} for a in kb_articles[:3]],
}
```
### 3. ServiceNow OAuth 2.0 Authentication
```python
def get_servicenow_token(instance: str, client_id: str, client_secret: str,
username: str, password: str) -> str:
"""Get OAuth token for ServiceNow API access."""
response = requests.post(
f"https://{instance}.service-now.com/oauth_token.do",
data={
"grant_type": "password",
"client_id": client_id,
"client_secret": client_secret,
"username": username,
"password": password,
},
)
response.raise_for_status()
return response.json()["access_token"]
```
### 4. Flow Designer Trigger (via REST)
```python
def trigger_flow(instance: str, token: str, flow_id: str, inputs: dict) -> dict:
"""Trigger a ServiceNow Flow Designer flow via REST API."""
response = requests.post(
f"https://{instance}.service-now.com/api/sn_flow/sc/flow/{flow_id}",
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
json={"inputs": inputs},
)
response.raise_for_status()
return response.json()
```
## LLM Support
ServiceNow supports multiple LLM backends via AI Controller:
- **Now LLM** (proprietary, purpose-built for ITSM)
- **OpenAI GPT-4** (direct integration)
- **Anthropic Claude** (via AWS Bedrock)
- **Google Gemini** (via partnership)
- **Meta Llama** (for on-premises deployments)
## Anti-Patterns
- Using admin credentials for API access -- use OAuth with scoped roles
- Querying without `sysparm_limit` -- can return millions of records
- Creating incidents without checking for duplicates -- always search first
- Bypassing ServiceNow workflows -- use Flow Designer triggers, not direct record manipulation
- Ignoring ACLs -- ServiceNow enforces row-level security; test with appropriate user roles
## References
- [ServiceNow REST API](https://developer.servicenow.com/dev.do#!/reference/api/washingtondc/rest/)
- [ServiceNow Now Assist](https://www.servicenow.com/products/now-assist.html)
- [ServiceNow AI Agents](https://www.servicenow.com/products/ai-agents.html)
- [Now Assist Skills Documentation](https://docs.servicenow.com/bundle/washingtondc-now-assist/page/administer/now-assist/concept/now-assist-skills.html)
<!-- Source: .faos/custom/skills/integrations/servicenow-now-assist/SKILL.md -->
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!