Categorizer Agent

The Categorizer is the most flexible classification agent on the platform. It accepts any combination of inputs -- documents, emails, extracted entities, conversations, or plain text -- via the named inputs system, and assigns one of your defined categories. Each category becomes a separate branch on the GWE canvas.

If you're unsure which categorizer to use, start here. The Categorizer handles the widest range of input types and is the recommended choice for new workflows.

Use Cases

  • You need to route a workflow based on the content of any input -- documents, emails, extracted entities, or custom data.
  • You want a single agent that handles both deterministic rule matching and LLM-based classification.
  • You need to classify based on multiple inputs at once (e.g., both an email body and its extracted metadata).
  • You need multi-level categorization (chain multiple Categorizer agents for hierarchical classification).

Inputs

The Categorizer uses named inputs, meaning you can wire any combination of data from upstream agents. Common inputs include:

Named InputTypeDescription
TextTextPlain text to classify.
DocumentDocumentA document to classify.
EmailEmailAn email message to classify.
ConversationConversationA chat conversation to classify.
EntitiesJSONExtracted entities or structured data to classify.

You can provide multiple named inputs simultaneously. The agent considers all of them when making its classification decision.

Outputs

OutputTypeDescription
categoryCategoryThe assigned category name.

Each defined category also produces a branch edge on the GWE canvas. Only the matching branch executes.

Configurations

ParameterDescriptionDefault
CategoriesList of categories. Each has a name, description (up to 1,000 characters), optional example queries, and optional qualification criteria.Required
Fallback categoryCategory used when no match is found. Defaults to "Fallback" and cannot be changed once set.Required
Categorization instructionsCustom guidance for the LLM (e.g., "Prioritize the email subject over the body" or "Treat anything mentioning 'urgent' as high priority")."Use all the inputs available and categorize into the most appropriate category."
Process entire documentWhen a document is provided as input, controls whether the full document is sent to the LLM or just the relevant snippets.Off
Qualification criteriaDeterministic rules per category. Requires a JSON Extractor agent connected upstream to supply structured data.None

Configuring Categories

Each category supports:

  • Name -- a unique, descriptive label. Cannot be changed after creation.
  • Description -- tells the LLM when this category applies. Up to 1,000 characters. Be specific about the criteria.
  • Example queries -- sample inputs that belong to this category. Helps the agent recognize similar inputs. No duplicates allowed.
  • Qualification criteria -- deterministic rules evaluated before the LLM. If a rule matches, the category is assigned immediately without LLM evaluation. Rules require structured data from an upstream JSON Extractor.

A category description is optional if qualification criteria are provided (since the rules handle classification), but recommended for clarity.

How Classification Works

  1. Qualification criteria: If rules are configured, they are evaluated first. A matching rule assigns the category immediately.
  2. LLM classification: If no rule matches, the agent sends all named inputs to the LLM along with your category descriptions and instructions.
  3. Fallback: If the LLM cannot confidently assign a category, the fallback category is used.

How to Use This Agent

Categorize inbound emails by department:

email_trigger -> categorizer
 -> [sales] -> sales_workflow
 -> [support] -> support_workflow
 -> [hr] -> hr_workflow
 -> [other] -> general_workflow

Tips

  • Wire all relevant context as named inputs. The more information the agent has, the better it classifies. For example, wire both the email body and extracted entities from a JSON Extractor.
  • Use qualification criteria for deterministic routing. If a structured field reliably determines the category (e.g., a "department" field from extracted data), add it as a rule. This is faster and more predictable than LLM classification.
  • Keep categories mutually exclusive. Overlapping descriptions lead to inconsistent results. If two categories are similar, add distinguishing criteria in the description.
  • Enable "Process entire document" only when the full document content matters for classification. For large documents, leaving it off reduces latency and cost.

Last updated: Jul 3, 2026