> Source: https://builder-docs.ema.ai/agent-reference/core/tag-extractor
> Title: Tag Extractor Agent

# Tag Extractor Agent

The Tag Extractor agent identifies and extracts relevant tags from a given context, such as user queries, chat conversations, or documents. These tags can then be used for categorization, routing, personalization, or downstream automation. The agent supports **tag mapping** so that extracted values are automatically aligned with predefined dictionaries or default values.

## Use Cases

-   **Search & Retrieval** -- Extract tags from queries to improve relevance in knowledge base or document searches.
-   **Conversation Intelligence** -- Identify key entities (e.g., location, product type, department) from chat transcripts.
-   **Personalization** -- Extract user preferences and context tags to tailor responses or recommendations.
-   **Routing & Categorization** -- Direct queries to the right workflows or departments based on detected tags.
-   **Analytics** -- Enable structured tagging of unstructured text for easier reporting and insights.

## Inputs

Input

Type

Required

Description

`conversation`

Conversation

Yes

The text input (e.g., chat conversation or user query) from which tags will be extracted.

`tag_extraction_configs`

Array of Tag Extraction Configs

Yes

Tag dimensions with extraction rules. Each config specifies a tag dimension name and rules containing tag level, extraction key, and default value.

`tag_mappings`

JSON

No

Optional dictionary mapping extracted tag values to different values (e.g., mapping `"Band"` to a dictionary value `"band"` with a default of `"C"`).

## Outputs

Output

Type

Description

`tags`

Array of Strings

Extracted tags as structured key-value pairs (e.g., `Location:India:Bengaluru`, `Department:Sales`). Includes dictionary values and defaults where applicable.

## Configurations

None. Tag extraction behavior is determined entirely by the `tag_extraction_configs` input and optional `tag_mappings`.

## How to Use This Agent

```
ticket_trigger -> convert_to_text -> tag_extractor -> intelligent_actions("Apply tags to ticket") -> workflow_output
```

## Related Agents

-   [Extract Entities](/legacy-docs/agent-reference/core/extract-entities) -- for extracting structured data rather than tags.
-   [Text Categorizer](/legacy-docs/agent-reference/core/text-categorizer) -- for single-category classification rather than multi-tag extraction.
