{
 "schema": "aiblocks-page/1",
 "id": "agency-engineering-servicenow-developer-mentor",
 "type": "agent",
 "name": "ServiceNow troubleshooting specialist",
 "summary": "Find why a ServiceNow script, rule or flow fails. Get the cause with log evidence, a fix, and steps to test it on a non-production instance.",
 "headline": "ServiceNow troubleshooting specialist",
 "subhead": "Describe the broken record or script, and paste the logs and code. It finds the cause from the evidence, says whether the fault is standard ServiceNow or your custom work, and teaches the fix step by step.",
 "job": {
  "id": "test-and-fix-code",
  "name": "Test and fix code"
 },
 "level": "intermediate",
 "thinking": "high",
 "tested": true,
 "updated": "2026-11-03",
 "first_published": "2026-10-26",
 "inputs": [
  {
   "type": "question",
   "required": true,
   "label": "Question",
   "what": "the problem, decision or piece of work you want help with, and what a good outcome looks like"
  },
  {
   "type": "source_text",
   "required": false,
   "label": "Source text",
   "what": "a long source in full: an article, a video or talk transcript, or notes from a book, with its title, author and link"
  }
 ],
 "outputs": [
  {
   "type": "audit_report",
   "required": true,
   "label": "Audit report",
   "what": "findings with evidence, severity, missing inputs and next actions"
  },
  {
   "type": "code_change",
   "required": true,
   "label": "Code change",
   "what": "a change to the code, with what it fixes and how it was checked"
  }
 ],
 "you_give": [
  "What is wrong, in one or two sentences, and what should happen instead",
  "One record or user where it fails (the table and record number, not private data)",
  "The suspect script, rule or flow, pasted as text",
  "Log lines, script debugger output or an error message (optional, but it makes the cause certain)",
  "Whether you have a non-production instance to test on, and your ServiceNow version (optional)"
 ],
 "you_get": [
  "The most likely cause, with the log line or value that supports it",
  "Whether the fault is standard ServiceNow or custom, and the steps to prove it",
  "A fix in the right place, such as a Script Include or Business Rule, with a note on why",
  "How to test the fix on the failing record and on a second record, and how to undo it",
  "What to collect next, if the evidence is not enough yet"
 ],
 "use_when": [
  "A Business Rule fires twice, or not at all, and you don't know why.",
  "A form or list got slow after someone added a script, and you need to find which one.",
  "A user can't see or edit a record, and you suspect an ACL (an access rule).",
  "You want to write a script, such as a record count, the right way and learn why it is the right way."
 ],
 "skip_when": [
  "You want to fix a live production outage right now. Use the Incident response coordinator to run the incident, and make code changes on a non-production instance first.",
  "You need the support or process side of ServiceNow, such as tickets, SLAs or change flow. Use the IT Service Manager agent.",
  "You want the AI to log in and change your instance. It can't. It gives steps you run yourself.",
  "You can't get logs or a failing example. Expect a list of what to collect first, not a fix."
 ],
 "output_sample": {
  "input": [
   "What is wrong and what should happen",
   "One failing record or user, as a table and number",
   "The suspect script, rule or flow, as text",
   "Log lines or an error message (optional)"
  ],
  "prerequisites": [
   "Access to a non-production ServiceNow instance, to reproduce and test"
  ],
  "output": [
   {
    "name": "Problem",
    "contains": "The failing case in one place, with expected and actual results and what is missing."
   },
   {
    "name": "Evidence",
    "contains": "The log lines or values the diagnosis rests on, and what you still need to capture."
   },
   {
    "name": "Diagnosis",
    "contains": "Whether the fault is standard or custom, the cause, and how it was proven."
   },
   {
    "name": "Fix",
    "contains": "The script or setting change, why that tool was chosen, and what else it touches."
   },
   {
    "name": "Test and rollback",
    "contains": "Checks on the failing record and a second one, plus how to undo the change."
   },
   {
    "name": "Next steps",
    "contains": "What to collect if the cause is not proven, and the ServiceNow docs to check."
   }
  ]
 },
 "output_shape": "PROBLEM\n  expected <what should happen> | actual <what happens> | scope <one form, one flow, all users> | ASSUMED: <list> | MISSING: <list>\n\nEVIDENCE\n  <log line, value or rule that fired> | where it came from <log, debugger, script> | NOT SEEN: <what is still needed>\n\nDIAGNOSIS\n  standard or custom <which> | cause <one sentence> | how it was confirmed <steps> | confidence <confirmed, likely, guess>\n\nFIX\n  <script or setting change> | why this tool <reason> | side effects <records touched, notices sent>\n\nTEST AND ROLLBACK\n  test on the failing record | test on a second record | undo steps <prior values to save first>\n\nNEXT STEPS\n  <what to gather or do next> | docs to check <ServiceNow docs page>",
 "how_to_use": [
  "Download the pack from this page and add it to your AI as a skill. Or paste SKILL.md into a new chat, then paste references/source-agent.md after it.",
  "Describe the problem and paste the script or rule involved, with the log lines. Remove names, emails and any private data first.",
  "Follow the steps it gives you on a non-production instance. It will ask you to reproduce the fault and to switch custom items off one at a time.",
  "Paste back what you see. Wait for it to name the cause and the evidence before you change any code.",
  "Apply the fix on the non-production instance. Test it on the failing record and on a second, unrelated record.",
  "Note what each changed record held before, so you can undo it. Then move the change through your normal release steps."
 ],
 "checks": [
  "The result addresses your actual task and cites the evidence used.",
  "Examples, role-play experience and targets are kept separate from verified results.",
  "Claims of tests, memory, tool access or completed actions match what actually happened."
 ],
 "next": [
  {
   "name": "Bug root cause finder",
   "url": "https://useaiblocks.com/skills/bug-root-cause-finder",
   "why": "Bug root cause finder"
  }
 ],
 "source": {
  "by": "Michael Sitarzewski and Agency Agents contributors",
  "repo": "msitarzewski/agency-agents",
  "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/engineering/engineering-servicenow-developer-mentor.md",
  "licence": "MIT",
  "original_name": "ServiceNow Developer & Mentor",
  "commit": "b37b5bb33b78f2c1d6567d98e25ca818e3259219"
 },
 "credits": [
  {
   "title": "ServiceNow Developer & Mentor",
   "by": "Michael Sitarzewski and Agency Agents contributors",
   "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/engineering/engineering-servicenow-developer-mentor.md",
   "used": "Original agent profile, preserved in references/source-agent.md; AI Blocks adds setup and review instructions."
  }
 ],
 "files": [
  "LICENSE",
  "references/source-agent.md",
  "SETUP.md",
  "source.json"
 ],
 "links": {
  "page": "https://useaiblocks.com/agents/agency-engineering-servicenow-developer-mentor",
  "markdown": "https://useaiblocks.com/agents/agency-engineering-servicenow-developer-mentor.md",
  "json": "https://useaiblocks.com/agents/agency-engineering-servicenow-developer-mentor.json",
  "instructions": "https://useaiblocks.com/skills/agency-engineering-servicenow-developer-mentor/SKILL.md",
  "download": "https://useaiblocks.com/skills/agency-engineering-servicenow-developer-mentor.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/agency-engineering-servicenow-developer-mentor",
  "api_document": "https://useaiblocks.com/api/v1/documents/agent/agency-engineering-servicenow-developer-mentor",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
