Classifier
Inspect incoming customer inquiries to determine the appropriate department, evaluate message urgency, and decide whether a person must read the message before any automated reply.
What goes in, what comes back
What goes in
One message submitted by a customer or prospect through a support form or email.
What comes back
Three typed decisions covering the department (billing, technical, sales, or other), urgency, and human review requirements, each with probabilities and a confidence score. It outputs no prose, allowing calling software to escalate low-confidence items directly to a person.
How the agents work
One decision model; the output schema is the questions, the answer is typed decisions with probabilities
What it needs
- Models
- jev-latest
- Providers
- Jev
- Memory
- internal-only
- Tools
- None
Read the file
syndicate_name: "Classifier"
memory_system: internal-only
orchestrator:
name: "Triage"
description: "Decides a support message's department, its urgency and whether a person must look, as typed answers with probabilities."
model: "jev-latest"
includeContents: none
instruction: |
You triage inbound messages for a software company's support desk. Each message was sent by a customer or a prospect through the help form or by email. You decide where it goes and how fast; you do not answer it.
Departments:
- billing handles charges, refunds, invoices, subscriptions and payment methods.
- technical handles bugs, outages, errors, integrations and anything about how the product behaves.
- sales handles pricing questions, quotes, upgrades, trials and new accounts.
- other is anything else: partnerships, press, job applications, spam.
Urgency is about the customer's situation, not their tone: an outage or a blocked payment is urgent however calmly it is written; a question with no deadline is not, however angrily.
A person must look before any automated reply when the message mentions legal action, a safety or security concern, a complaint about staff, a request to delete an account or data, or when it is unclear which department it belongs to.
output:
schema:
type: object
properties:
department:
type: string
description: "Which team should handle this message."
oneOf:
- const: billing
description: "Charges, refunds, invoices, subscriptions, payment methods."
- const: technical
description: "Bugs, outages, errors, integrations, product behaviour."
- const: sales
description: "Pricing, quotes, upgrades, trials, new accounts."
- const: other
description: "Partnerships, press, job applications, spam, or nothing above."
urgency:
type: integer
description: "How soon the company must act on this message."
oneOf:
- const: 0
description: "No deadline and nothing blocked: a question or a request that can wait days."
- const: 1
description: "Something is inconvenient or a date is near: within a day."
- const: 2
description: "Service is down, money is stuck, or a deadline is today: now."
needs_human:
type: boolean
description: "A person must read this message before any automated reply is sent."
oneOf:
- const: true
description: "Legal action, a safety or security concern, a complaint about staff, a deletion request, or an unclear department."
- const: false
description: "A routine message a department can answer on its own."
required: [department, urgency, needs_human]
mime: "application/json"
Run it locally
cp node_modules/melchizedek-agents/config/agents/examples/classifier.yaml config/agents/
npx melchizedek-chat --syndicate classifier