Logo vun Build Agent

Build Agent

Organisatioun
Happy-Technologies-LLC
build-agent

Build custom AI agents for ServiceNow including agent capabilities, knowledge sources, tool access, conversational flows, and guardrails

Iwwersiicht

EditeurHappy-Technologies-LLC
Repositoryhappy-platform-skills
Skill-Nummbuild-agent
Stären
41
Forks
14
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum Happy-Technologies-LLC op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Build Agent an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/Happy-Technologies-LLC/happy-platform-skills/tree/main/skills/genai/build-agent
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Happy-Technologies-LLC/happy-platform-skills.git /tmp/happy-platform-skills
mkdir -p .claude/skills
cp -r /tmp/happy-platform-skills/skills/genai/build-agent .claude/skills/build-agent
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Build Agent an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Build Agent automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Build Agent net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Build Custom AI Agents

Overview

This skill provides a comprehensive guide to building custom AI agents in ServiceNow:

  • Defining agent capabilities and scope of responsibility
  • Configuring knowledge sources for agent grounding (KB articles, catalog items, documentation)
  • Setting up tool access so agents can perform actions (create records, query data, trigger flows)
  • Designing conversational flows with intent recognition and entity extraction
  • Implementing guardrails for safety, accuracy, and compliance
  • Testing and iterating on agent behavior before production deployment

When to use: When building a new virtual agent topic, extending Now Assist skill capabilities, creating a domain-specific AI assistant, or configuring agent tool access for automated task execution.

Prerequisites

  • Roles: admin, va_admin, or now_assist_admin
  • Plugins: com.glide.cs.chatbot (Virtual Agent), com.snc.now_assist (Now Assist) recommended
  • Access: Write access to sys_cs_topic, sys_cs_intent, sys_cs_entity, sys_cb_topic, kb_knowledge tables
  • Knowledge: Understanding of conversational AI concepts (intents, entities, slots, fulfillment)
  • Related Skills: genai/agent-miner for discovering what to automate, genai/skill-kit-custom for Now Assist skills

Procedure

Step 1: Define Agent Scope and Capabilities

Document the agent's purpose, target users, and boundaries.

=== AGENT DEFINITION ===
Name: [Agent Name]
Domain: [IT Support / HR / Facilities / Custom]
Target Users: [Employee / Customer / Technician]

CAPABILITIES (What the agent CAN do):
- [ ] Answer questions about [topic]
- [ ] Create [record type] on behalf of users
- [ ] Look up [information type]
- [ ] Trigger [workflow/process]
- [ ] Escalate to [team] when needed

BOUNDARIES (What the agent CANNOT do):
- [ ] Access [restricted data/system]
- [ ] Approve [request type]
- [ ] Modify [critical records]
- [ ] Share [sensitive information]

SUCCESS METRICS:
- Deflection Rate Target: [%]
- User Satisfaction Target: [score]
- Resolution Rate Target: [%]
- Average Handle Time Target: [minutes]

Step 2: Configure Knowledge Sources

Set up the knowledge base articles and data sources the agent will use for grounding.

MCP Approach:

Tool: SN-Query-Table
Parameters:
  table_name: kb_knowledge
  query: kb_knowledge_base=[KB_SYS_ID]^workflow_state=published^active=true
  fields: sys_id,number,short_description,kb_category,article_type
  limit: 100

REST Approach:

GET /api/now/table/kb_knowledge
  ?sysparm_query=kb_knowledge_base=[KB_SYS_ID]^workflow_state=published^active=true
  &sysparm_fields=sys_id,number,short_description,kb_category,article_type
  &sysparm_limit=100

Verify knowledge coverage for each agent capability:

CapabilityKB ArticlesGaps Identified
Password resetKB001, KB002None
VPN setupKB010Missing macOS instructions
Software requestNoneNeed catalog mapping article

Step 3: Create Agent Topic

Build the primary topic that defines the agent's conversational scope.

MCP Approach:

Tool: SN-Create-Record
Parameters:
  table_name: sys_cs_topic
  data:
    name: "IT Support Assistant"
    description: "Handles common IT support requests including password resets, VPN access, and software installations"
    state: draft
    category: IT
    greeting_message: "Hi! I'm your IT Support Assistant. I can help with password resets, VPN access, software requests, and general IT questions. What do you need help with?"
    no_match_message: "I'm not sure I understand. Could you rephrase your request, or would you like me to connect you with a live agent?"
    max_retries: 3

REST Approach:

POST /api/now/table/sys_cs_topic
Body: {
  "name": "IT Support Assistant",
  "description": "Handles common IT support requests",
  "state": "draft",
  "category": "IT",
  "greeting_message": "Hi! I'm your IT Support Assistant...",
  "no_match_message": "I'm not sure I understand...",
  "max_retries": "3"
}

Step 4: Define Intents and Training Utterances

Create intents that the agent should recognize and respond to.

MCP Approach:

Tool: SN-Create-Record
Parameters:
  table_name: sys_cs_intent
  data:
    name: "Reset Password"
    topic: [TOPIC_SYS_ID]
    description: "User wants to reset their password for any system"
    training_utterances: |
      I need to reset my password
      My password expired
      I can't log in
      Password not working
      Forgot my password
      Need a new password
      Locked out of my account
      Account locked
      Can't access my account
      Reset credentials

Repeat for each capability:

IntentSample UtterancesEntity Slots
Reset Password"reset my password", "locked out"system_name, username
VPN Access"connect to VPN", "VPN not working"vpn_type, device_type
Software Install"install software", "need [app]"software_name, justification
General Question"how do I...", "what is..."topic_keyword

Step 5: Define Entities for Slot Filling

Create entities to extract structured data from user messages.

MCP Approach:

Tool: SN-Create-Record
Parameters:
  table_name: sys_cs_entity
  data:
    name: "system_name"
    topic: [TOPIC_SYS_ID]
    type: "list"
    prompt: "Which system do you need the password reset for?"
    required: true
    values: |
      Active Directory|AD|Windows login
      Email|Outlook|Exchange
      VPN|Cisco AnyConnect
      SAP|ERP
      Salesforce|CRM

REST Approach:

POST /api/now/table/sys_cs_entity
Body: {
  "name": "system_name",
  "topic": "[TOPIC_SYS_ID]",
  "type": "list",
  "prompt": "Which system do you need the password reset for?",
  "required": "true"
}

Step 6: Configure Tool Access and Actions

Define what actions the agent can perform in ServiceNow.

MCP Approach:

Tool: SN-Create-Record
Parameters:
  table_name: sys_cb_action
  data:
    topic: [TOPIC_SYS_ID]
    name: "Create Incident for Password Reset"
    action_type: "create_record"
    table: "incident"
    field_values: |
      category=inquiry
      subcategory=password
      short_description=Password reset request: ${system_name}
      assignment_group=IT Help Desk
      caller_id=${sys_user}
      urgency=3
      impact=3

REST Approach:

POST /api/now/table/sys_cb_action
Body: {
  "topic": "[TOPIC_SYS_ID]",
  "name": "Create Incident for Password Reset",
  "action_type": "create_record",
  "table": "incident",
  "field_values": "category=inquiry^subcategory=password^short_description=Password reset request"
}

Common Action Types:

Action TypePurposeConfiguration
create_recordCreate a new recordtable, field_values
update_recordUpdate existing recordtable, sys_id, field_values
query_recordLook up recordstable, query, return_fields
run_flowTrigger a Flow Designer flowflow_sys_id, inputs
run_scriptExecute server-side scriptscript body
kb_searchSearch knowledge basequery, kb_base
escalateTransfer to live agentqueue, message

Step 7: Implement Guardrails

Configure safety boundaries and compliance controls.

Input Guardrails:

Tool: SN-Create-Record
Parameters:
  table_name: sys_cs_topic_goal
  data:
    topic: [TOPIC_SYS_ID]
    name: "Input Validation"
    type: "guardrail"
    configuration: |
      BLOCKED_INTENTS:
      - Requests for other users' personal data
      - Attempts to bypass approval processes
      - Requests for admin/root access

      INPUT_SANITIZATION:
      - Strip HTML/script tags from user input
      - Validate employee ID format before lookup
      - Limit free-text input to 500 characters

      AUTHENTICATION:
      - Require verified session for record creation
      - Verify caller identity before sharing account details
      - MFA challenge for sensitive operations

Output Guardrails:

RESPONSE RULES:
- Never expose sys_id values or internal table names to users
- Never share other employees' personal information
- Always confirm destructive actions before executing
- Include disclaimer for estimated timeframes
- Redirect compliance/legal questions to appropriate teams
- Log all agent actions for audit trail

ESCALATION TRIGGERS:
- User expresses frustration (sentiment < -0.5)
- 3 consecutive failed intent matches
- Request involves VIP or executive user
- Security-related request (account compromise)
- Agent confidence score below threshold (< 0.7)

Step 8: Design Conversation Flows

Map out the full conversational flow for each intent.

CONVERSATION FLOW: Password Reset

[User Message] -> Intent Recognition -> "Reset Password" (confidence > 0.8)
  |
  v
[Slot: system_name] -> "Which system?" -> User provides system
  |
  v
[Slot: username] -> "What is your username?" -> User provides username
  |
  v
[Validation] -> Verify user exists in system
  |-- User found -> Proceed
  |-- User not found -> "I couldn't find that username. Please verify and try again."
  |
  v
[Action] -> Trigger password reset flow
  |-- Success -> "Your password has been reset. Check your email for the temporary password."
  |-- Failure -> "I wasn't able to reset your password. Let me connect you with a live agent."
  |
  v
[Follow-up] -> "Is there anything else I can help you with?"

Step 9: Test the Agent

Validate agent behavior with test scenarios.

MCP Approach:

Tool: SN-Query-Table
Parameters:
  table_name: sys_cs_topic
  query: sys_id=[TOPIC_SYS_ID]
  fields: sys_id,name,state,test_status,last_tested

Test Matrix:

Test CaseInputExpected BehaviorResult
Happy path"Reset my AD password"Collect username, trigger reset
Missing entity"Reset my password"Ask which system
Unknown intent"What's the weather?"No-match response
Guardrail trigger"Reset John's password"Refuse, explain why
Escalation"This isn't working, get me a human"Transfer to live agent
Edge caseEmpty messagePrompt for input

Step 10: Deploy and Monitor

Publish the agent and set up monitoring.

MCP Approach:

Tool: SN-Update-Record
Parameters:
  table_name: sys_cs_topic
  sys_id: [TOPIC_SYS_ID]
  data:
    state: published

Post-Deployment Monitoring Queries:

Tool: SN-Query-Table
Parameters:
  table_name: sys_cs_conversation
  query: topic=[TOPIC_SYS_ID]^sys_created_on>=javascript:gs.daysAgo(7)
  fields: sys_id,state,live_agent,transfer_reason,user_satisfaction,sys_created_on
  limit: 100

Tool Usage

ToolPurposeWhen to Use
SN-Query-TableFind existing topics, intents, and knowledge articlesDiscovery and validation
SN-Create-RecordCreate topics, intents, entities, and actionsBuilding agent components
SN-Update-RecordModify agent settings, publish topicsConfiguration and deployment
SN-Get-Table-SchemaDiscover topic and intent table structuresInitial setup
SN-Get-RecordGet detailed record for specific topic or intentReviewing existing configurations

Best Practices

  1. Start narrow, expand gradually -- launch with 2-3 well-defined intents before adding more
  2. Use at least 10 training utterances per intent for reliable recognition
  3. Test with real user language -- avoid technical jargon in training data
  4. Implement graceful fallbacks -- always provide a path to live agent assistance
  5. Monitor and retrain weekly during the first month after deployment
  6. Version your topics -- maintain draft versions while published version serves users
  7. Separate concerns -- one topic per domain area (IT, HR, Facilities)
  8. Log all actions -- maintain audit trail for compliance and debugging
  9. Set confidence thresholds -- do not act on low-confidence intent matches
  10. Gather user feedback -- use post-conversation surveys to identify improvement areas

Troubleshooting

IssueCauseResolution
Agent not recognizing intentsInsufficient or poor training utterancesAdd more diverse utterances; include typos and abbreviations
Wrong intent matchedOverlapping utterances between intentsReview and deduplicate training data; increase confidence threshold
Entity not extractedEntity values do not match user inputAdd synonyms and variations to entity value list
Action fails silentlyMissing permissions or invalid field mappingCheck agent user roles; validate field names against table schema
Agent loops on same questionRequired slot not being filled by user responseAdd skip logic or alternative slot-filling prompts
High escalation rateAgent scope too narrow or responses not helpfulExpand knowledge sources; review escalated conversations for patterns

Examples

Example 1: IT Support Bot

Scenario: Build a virtual agent for common IT support requests.

AGENT: IT Support Assistant
INTENTS:
1. Password Reset -> Flow: Reset Password (AD, Email, VPN)
2. Software Request -> Action: Create RITM from catalog
3. VPN Troubleshooting -> KB Search: VPN articles
4. Hardware Issue -> Action: Create incident, escalate if P1
5. General IT Question -> KB Search: IT knowledge base

GUARDRAILS:
- Cannot reset passwords for other users
- Software requests require manager approval flow
- Hardware replacements require asset verification

Example 2: HR Benefits Bot

Scenario: Build an agent for benefits enrollment questions.

AGENT: Benefits Assistant
INTENTS:
1. Benefits Overview -> KB: Benefits summary article
2. Enrollment Period -> KB: Open enrollment dates and process
3. Plan Comparison -> KB: Plan comparison matrix
4. Life Event Change -> Action: Create HR case for life event
5. Dependent Add/Remove -> Action: Create HR case with dependent info

GUARDRAILS:
- Cannot share other employees' benefits information
- Directs medical questions to benefits provider
- Logs all interactions for compliance

Example 3: Facilities Service Bot

Scenario: Build an agent for workplace service requests.

AGENT: Facilities Assistant
INTENTS:
1. Room Booking -> Action: Query room availability, create reservation
2. Maintenance Request -> Action: Create facilities incident
3. Badge Access -> Action: Create access request RITM
4. Parking -> KB: Parking policy and waitlist info
5. Catering -> Action: Create catering request with details

GUARDRAILS:
- Room bookings limited to 4 hours maximum
- Maintenance requests auto-prioritized by type
- Badge access requires security team approval

Related Skills

  • genai/agent-miner - Discover automation opportunities from interaction data
  • genai/flow-generation - Build flows that agents can trigger
  • genai/playbook-generation - Create playbooks for agent-assisted workflows
  • genai/skill-kit-custom - Build custom Now Assist skills
  • knowledge/article-generation - Generate KB articles for agent knowledge sources

Heefeg gestallte Froen

Wat mécht de KI-Skill Build Agent?

Build custom AI agents for ServiceNow including agent capabilities, knowledge sources, tool access, conversational flows, and guardrails

Firwat Build Agent op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Build Agent besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Build Agent an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/Happy-Technologies-LLC/happy-platform-skills/tree/main/skills/genai/build-agent an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Build Agent benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Build Agent benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Build Agent domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Build Agent gratis?

Jo. De Skill gëtt vum Happy-Technologies-LLC ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇