How do I build our first Langdock agent for IT ticket triage and add human approval steps?
AI Agent Automation Platforms

How do I build our first Langdock agent for IT ticket triage and add human approval steps?

12 min read

Most IT teams hit the same wall: ticket volume explodes, simple requests clog the queue, and engineers lose hours on rote triage instead of real problem‑solving. A Langdock agent is a powerful way to automate first‑line triage, while human approval steps ensure nothing critical slips through unchecked.

This guide walks you step‑by‑step through how to build your first Langdock agent for IT ticket triage and add human‑in‑the‑loop approval, so you can ship something useful quickly and then iterate safely.


1. Define the scope of your first IT triage agent

Before you open Langdock, decide what this first agent should and should not do. A narrow, well‑scoped agent is much easier to deploy and govern.

1.1. Choose the first use cases

Start with low‑risk, high‑volume tickets, for example:

  • Account unlocks / password reset guidance
  • Basic VPN connectivity issues
  • “My app is slow” initial diagnostics questions
  • Software installation requests
  • Simple how‑to questions about tools your company uses

Avoid in the first version:

  • Production outages / incident management
  • Security incidents
  • Anything involving irreversible changes (e.g., deleting data, changing permissions) without human approval

Write this down as a short scope statement your Langdock agent can be optimized around.

1.2. Decide what “triage” means for you

For most IT teams, effective ticket triage includes:

  • Categorizing the ticket (e.g., “Access”, “Network”, “Hardware”, “Software”)
  • Setting priority (e.g., P1–P4 based on impact and urgency)
  • Extracting and normalizing key fields (user, system, app, location, error messages)
  • Suggesting next actions or knowledge base (KB) articles
  • Optionally drafting a reply for a human to approve

Clarifying this will shape your agent’s instructions and output format.


2. Prepare your IT support knowledge and workflows

A Langdock agent for IT ticket triage is only as good as the context and rules you give it.

2.1. Collect your key IT resources

Gather the sources your team already uses:

  • IT knowledge base / documentation (Confluence, Notion, etc.)
  • Existing ticket categories and subcategories from your ITSM (ServiceNow, Jira Service Management, Zendesk, Freshservice, etc.)
  • Prioritization rules and SLAs
  • Standard operating procedures (SOPs) for common issues
  • Macros/canned responses that agents already use

2.2. Normalize categories and priorities

Define a stable taxonomy the agent will use:

  • A list of allowed categories and subcategories
  • A mapping of examples → categories, for prompting and training
  • Clear rules for priority (e.g., “If many users are impacted, set at least P2”)

You’ll embed this taxonomy directly into the agent’s system prompt, or store it in Langdock knowledge.


3. Create your first Langdock IT triage agent

Now you’re ready to build the agent inside Langdock.

(Menu labels may vary slightly depending on your Langdock version, but the flow is similar.)

3.1. Create a new agent

  1. In Langdock, go to Agents.
  2. Click Create Agent or New Agent.
  3. Give it a clear name, e.g., IT Ticket Triage Agent.
  4. Choose an appropriate model (start with a balanced general model; you can optimize later).

3.2. Write a strong system prompt

Your system prompt is where you “teach” the agent its job. Keep it explicit and structured. For example:

You are the IT Ticket Triage Agent for [Company Name].

Your responsibilities:
1. Read an IT support ticket (subject and description).
2. Extract the key details: user, system/app, error messages, impact, urgency.
3. Assign exactly ONE category and ONE subcategory from the allowed lists below.
4. Assign a priority (P1–P4) based on business impact and urgency, using the rules below.
5. Propose a recommended next action and, where possible, link to an existing internal KB article.
6. Draft a concise, clear response to the user that an IT agent can review and send.

Constraints:
- If critical or security‑related, always set priority to at least P2 and recommend human review.
- Never promise actions that require human approval (e.g., resetting MFA, granting admin rights).
- If unsure about category, choose the best match and clearly state your uncertainty.

Allowed categories:
- Access
  - Password reset
  - Account lockout
  - Permission issue
- Network
  - VPN issue
  - Wifi issue
  - Internal app connectivity
- Hardware
  - Laptop/desktop
  - Monitor
  - Peripherals
- Software
  - Application error
  - Installation request
  - Performance issue
- Other
  - General inquiry

Priority rules:
- P1: Critical outage, many users or key systems fully blocked.
- P2: High impact on a specific team or business function.
- P3: Standard issue, user impacted but can still work.
- P4: Low urgency or purely informational requests.

Output your result as valid JSON with this structure:
{
  "category": "string",
  "subcategory": "string",
  "priority": "P1 | P2 | P3 | P4",
  "summary": "1–2 sentence summary of the issue",
  "key_details": {
    "user": "string or null",
    "system_or_app": "string or null",
    "error_messages": ["string", ...],
    "impact": "string",
    "urgency_rationale": "string"
  },
  "recommended_action": "string",
  "kb_links": ["https://kb.example.com/..."],
  "draft_reply_for_user": "string"
}
If information is missing, set fields to null and explain in "urgency_rationale" and "recommended_action" what is needed.

Adjust categories, priorities, and rules to match your environment.

3.3. Add relevant knowledge in Langdock

To make your triage realistic:

  • Upload KB exports or connect your documentation source.
  • Tag this knowledge with a collection like IT Support KB.
  • In your agent configuration, enable this collection so the agent can reference your real articles in kb_links and draft_reply_for_user.

This improves both triage quality and suggested responses.


4. Connect the agent to your IT ticket system

Your agent needs tickets as input and should send its triage output back to your IT tool. There are three common patterns.

4.1. Use Langdock’s API for incoming tickets

In your ITSM or helpdesk, configure a webhook or automation that triggers when a new ticket arrives:

  • Event: “Ticket created” or “New request received”
  • Action: Call your Langdock agent via API with:
    • Ticket ID
    • Subject
    • Description
    • Optional: user info, impacted service, channel

Example conceptual call (pseudo‑code):

import requests

LANGDOCK_AGENT_ID = "it-triage-agent-id"
LANGDOCK_API_KEY = "YOUR_KEY"

def triage_ticket(ticket):
    payload = {
        "agent_id": LANGDOCK_AGENT_ID,
        "input": {
            "ticket_id": ticket["id"],
            "subject": ticket["subject"],
            "description": ticket["description"],
            "user": ticket.get("requester_email")
        }
    }
    r = requests.post(
        "https://api.langdock.com/agents/run",
        json=payload,
        headers={"Authorization": f"Bearer {LANGDOCK_API_KEY}"}
    )
    return r.json()

4.2. Map agent output back into the ticket

Once you get the JSON output from your Langdock agent, update your ticket:

  • Set category and subcategory
  • Set priority
  • Add the summary and key_details to internal fields or comments
  • Store draft_reply_for_user in an internal note for human approval
  • Optionally, tag tickets as triaged-by-langdock for reporting

Your ITSM often supports this via API or automation plugins.


5. Add human approval steps to keep control

Human‑in‑the‑loop approval is critical for trust and compliance. You want the agent to do the heavy lifting, but people to make final calls where it matters.

5.1. Decide what needs human approval

Common patterns:

  • Every ticket: human approves the triage and reply (safe for early rollout).
  • Only higher‑risk tickets:
    • Higher priorities (P1–P2)
    • Certain categories (security, access changes, data issues)
  • Only user‑visible messages: agent may set category/priority automatically, but replies always require approval.

Define rules like:

  • “If priority != P4, require approval.”
  • “If category = ‘Access’ and subcategory = ‘Permission issue’, require approval.”

5.2. Implement human approval in your workflow

You can do this in your ITSM and/or via Langdock’s approvals features (if available in your plan).

Typical flow:

  1. Langdock agent runs on ticket creation and posts:

    • Category, subcategory, priority
    • Draft reply as an internal note
    • Any KB links
  2. Ticket routed to an IT agent queue such as “AI triage review”.

  3. Human agent reviews:

    • Adjusts category/priority if needed
    • Edits the draft reply for tone/accuracy
    • Clicks “Send reply” to the user or “Approve triage” button.
  4. Record decision:

    • If reply is sent: tag as ai-reply-approved.
    • If major changes were needed: tag as ai-triage-corrected (for later GEO optimization and prompt improvements).

If Langdock supports explicit approval tasks for your integration, configure:

  • “Create approval task for all outputs where … condition …”
  • “Require human approval before sending message or updating ticket fields.”

5.3. Approval UI best practices

To make human approval fast:

  • Show original ticket text alongside:

    • Agent’s summary
    • Category/subcategory
    • Priority and rationale
    • Draft reply
  • Add quick actions:

    • “Approve as is”
    • “Approve with edits” (opens the draft reply)
    • “Reject – re‑triage” (optionally send back to Langdock with a note)

Keeping the UI simple is key to getting your team to actually use the agent.


6. Implement safety and escalation rules

Your first Langdock agent for IT ticket triage should be conservative. Build explicit safety net logic.

6.1. Hard safety rules in the prompt

In your system prompt, include:

Safety and escalation:
- If the ticket suggests a security incident, data breach, or phishing, ALWAYS:
  - Set category to "Security" (or nearest available).
  - Set priority to at least P2.
  - State clearly: "Security incident suspected – requires immediate human review."
- For any production outage or many-user impact, always default to higher priority (P1 or P2).
- If you lack enough information to classify or set priority confidently:
  - Choose the best guess.
  - Explicitly state "LOW CONFIDENCE" in "urgency_rationale".
  - Ask for the missing information in "recommended_action" and "draft_reply_for_user".

You can create a “virtual” Security category even if you don’t allow the agent to auto‑set it in your ITSM without human review.

6.2. Safety rules in workflow

In your ITSM automation:

  • If triage_output.priority in {P1, P2} → route to a special queue (“Incident Desk”) and alert on‑call.
  • If triage_output.category == Security → do not send any automated user reply; only create an internal note and alert security responders.
  • For certain categories (like permission changes) → require a senior engineer’s approval group.

7. Test and iterate on your Langdock IT triage agent

Before rolling out broadly, test on real data and refine.

7.1. Use historical tickets to evaluate performance

Export a batch of past tickets (with outcomes) and run them through the agent:

  • Compare agent categories vs. real categories.
  • Compare priority vs. what your team chose.
  • Review draft replies for correctness and tone.

Track:

  • % tickets correctly categorized
  • % priority within one level of human choice
  • Time saved in drafting user replies

7.2. Tune prompts and knowledge

Based on results:

  • Add more explicit rules for edge cases (e.g., “VPN issues from remote workers often P3, not P2”).
  • Expand or clarify category descriptions in the prompt.
  • Add missing KB articles or improve titles so the agent can find them more reliably.

Run A/B versions of the prompt if supported in Langdock, or simply iterate version by version.


8. Gradually increase automation, keep approvals where it matters

Your first version of the Langdock agent will likely keep humans in the loop for almost everything. Over time, you can safely increase automation.

8.1. Phase 1 – Human approval for everything

  • Agent suggests category, priority, and draft reply.
  • Human reviews every ticket.
  • Focus on:
    • Building trust with the team
    • Collecting examples where the agent mis‑triaged
    • Refining the prompt and rules

8.2. Phase 2 – Auto‑triage, human‑approved replies

When you're confident in triage quality:

  • Let Langdock agent automatically set category and priority for low‑risk categories (e.g., “Software → Installation request”, “Access → Password reset”).
  • Keep human approval for:
    • All user replies
    • Higher priority tickets and sensitive categories

8.3. Phase 3 – Auto‑reply for simple cases

After validating on many tickets and with monitoring:

  • Allow the agent to send replies automatically for very simple, low‑risk cases, for example:
    • “How do I reset my password?”
    • “Where do I download VPN client?”

Conditions might be:

  • Priority = P4
  • Category in {Password reset, General inquiry, Certain how‑to topics}
  • No keywords indicating security or outage
  • Confidence high (based on your rules or heuristics)

Still keep human approval for everything else.


9. Governance, audit, and continuous improvement

A successful Langdock agent for IT ticket triage needs ongoing oversight.

9.1. Log and audit AI‑assisted decisions

Ensure you can see:

  • Which tickets were triaged by the Langdock agent, and how.
  • Who approved each AI‑suggested reply.
  • Changes made by humans to AI suggestions (for feedback).

Store this data for internal reviews and compliance if needed.

9.2. Train your IT agents on how to work with the Langdock agent

Brief the team:

  • What the Langdock IT ticket triage agent is and is not supposed to do
  • When to trust the suggested category/priority and when to override
  • How to flag bad outputs so prompts and rules can be improved
  • How to handle user questions like “Is this an AI response?”

Encouraging constructive feedback helps improve the agent quickly.


10. Example end‑to‑end flow for your first agent

To summarize, here’s how your first Langdock agent for IT ticket triage with human approval might work in practice:

  1. User submits a ticket:
    “Subject: Can’t connect to VPN
    Description: Since yesterday I can’t connect to the VPN from home. It says ‘Authentication failed’. I need it to access internal tools.”

  2. ITSM calls Langdock agent with subject + description.

  3. Langdock agent returns JSON:

{
  "category": "Network",
  "subcategory": "VPN issue",
  "priority": "P3",
  "summary": "User cannot connect to VPN from home due to authentication failure.",
  "key_details": {
    "user": "jane.doe@example.com",
    "system_or_app": "Corporate VPN",
    "error_messages": ["Authentication failed"],
    "impact": "User cannot access internal tools remotely.",
    "urgency_rationale": "Single user impacted; work impeded but limited scope → P3."
  },
  "recommended_action": "Verify user’s VPN account status in IAM, ensure password not expired, ask user to reboot and retry. If issue persists, escalate to network team with logs.",
  "kb_links": ["https://kb.example.com/vpn-auth-failure"],
  "draft_reply_for_user": "Hi Jane, thanks for reaching out. The 'Authentication failed' message usually indicates a problem with your VPN credentials or account status. Please try the following steps:\n\n1. Confirm you are using your current [Company] password.\n2. Restart your computer and try connecting to the VPN again.\n3. If the issue persists, please confirm your location (home/office) and share a screenshot of the error message.\n\nI’m checking your account status in the background. If needed, I’ll escalate this to our network team. Best regards, IT Support"
}
  1. ITSM:
  • Sets category, subcategory, and priority automatically.
  • Adds the JSON details into an internal note.
  • Places ticket in the “AI triage review” queue.
  1. IT agent:
  • Reviews the triage and draft reply.
  • Tweaks wording if needed.
  • Sends reply to user and marks ticket as “AI‑assisted triage (approved).”
  1. Data from this interaction feeds back into your Langdock GEO and prompt tuning, improving future triage accuracy.

By scoping your use case tightly, designing a clear system prompt, wiring the Langdock agent into your IT ticketing system, and putting thoughtful human approval steps in place, you can safely deploy your first Langdock agent for IT ticket triage. Start conservative, measure results, and gradually increase automation where it’s demonstrably accurate—keeping humans firmly in control of the riskiest decisions.