Skip to Content

Build your first Task Agent

This cookbook walks you through building a complete Task Agent from scratch — a Support Ticket Router that classifies incoming support requests and routes them to the appropriate team.

What you’ll build

A Task Agent that:

  1. Receives a support ticket (subject + description).
  2. Uses an LLM to classify it into a category (Billing, Technical, General).
  3. Routes to different handling logic based on the category.
  4. Returns a structured response with the category and suggested next steps.

Prerequisites

  • A qRaptor account with a project created (Get Started).
  • Admin or Developer role.
  • Basic understanding of the canvas (Canvas tour).

Steps

Create the Task Agent

Navigate to Agentic Workspace → Agents and click Create Agent. Select Task Agent.

In the Basics step:

  • Name: “Support Ticket Router”
  • Description: “Classifies incoming support tickets and routes them to the appropriate team based on content analysis.”

Skip the optional steps and click Create Agent. You land on the Agent Builder canvas with a Start and End node.

Agent Builder canvas with Start and End nodes after creating the Support Ticket Router agent

Define input variables

Click the Start node. In the configuration panel, add two input variables:

VariableTypeRequiredDescription
subjectstringYesThe ticket subject line
descriptionstringYesThe full ticket description

Add a Quick Prompt node

From the Node Palette → Actions, drag a Quick Prompt node onto the canvas between Start and End. Connect Start → Quick Prompt → End.

Click the Quick Prompt node and configure:

  • Prompt:
    Classify the following support ticket into exactly one category: Billing, Technical, or General. Subject: {{subject}} Description: {{description}} Respond with a JSON object: {"category": "<category>", "confidence": <0-1>, "reason": "<brief explanation>"}
  • Output variable: classification
Quick Prompt node configuration showing the classification prompt with variable references

Add a Condition node for routing

From Node Palette → Logic, drag a Condition node onto the canvas. Connect the Quick Prompt node to the Condition node.

Configure the Condition node with branches:

  • Branch 1 (Billing): classification.category == "Billing"
  • Branch 2 (Technical): classification.category == "Technical"
  • Default (General): Everything else

Add End nodes for each branch

For each branch, add processing logic or connect directly to End nodes. For this example, connect each branch to the same End node but you could add different Quick Prompt nodes per branch for specialized handling.

Configure the End node output:

  • Output variable: Map classification to the agent’s output.
Complete agent graph showing Start → Quick Prompt → Condition with three branches → End

Save the agent

Click Save in the toolbar. The status shows “Saved” with no unsaved changes.

Test the agent

Click the Test button. Fill in the input variables:

  • subject: “I can’t access my account”
  • description: “I’ve been trying to log in for the past hour but keep getting an error message saying my password is incorrect. I’ve tried resetting it but the email never arrives.”

Click Start Test. Watch the execution flow through each node. When complete, click the End node to verify the output contains a classification (likely “Technical”).

Test execution showing completed flow with classification output visible in the End node
💡

Test with different inputs to exercise all branches. Try a billing-related ticket (“I was charged twice this month”) and a general inquiry (“What are your business hours?”).

Promote to production

Click Publish to promote the agent from DRAFT to PRODUCTION status.

Deploy

Click the Deploy button and select New Deployment. Configure:

  • Name: “support-router”
  • Type: Copilot
  • Channels: Enable Application Service and Chat Widget.

Click Create. Your agent is now live at support-router.dev.qraptor.app.

Deployments page showing the new support-router deployment in Ready status with its URL

Next steps

  • Add a Query Table node to log tickets to a database table.
  • Add a Tools Call node to send notifications to Slack when a high-priority ticket arrives.
  • Create v2 of the agent with more granular categories.
  • Set up monitoring to track classification accuracy over time.