> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentmark.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Topics

> Automatically classify traces into facets and cluster them into named topics to surface recurring patterns across your production traffic

Topics groups an environment's traces into recurring behavioral patterns, like "Refund requests" or "Login problems", so you can see what your agent actually deals with in production without reading traces one by one. AgentMark also classifies every trace along built-in facets (Task, Sentiment, Issues) that you can filter by.

<Note>
  Topics is rolling out gradually. The AgentMark team enables trace enrichment per workspace. Contact support to turn it on for yours.
</Note>

## How it works

After you enable enrichment, every trace flows through a continuous pipeline:

1. **Summarize.** A fast model reads the trace and writes a short summary through each facet's lens: what the agent was trying to do (Task), how the interaction went (Sentiment, as a label: `POSITIVE`, `NEUTRAL`, `NEGATIVE`, `FRUSTRATED`), and whether anything went wrong (Issues).
2. **Embed.** Task and Issues summaries become embedding vectors.
3. **Classify.** If a topic map exists, AgentMark assigns each new trace to the nearest topic, or to `no match` when it fits none. This step makes no model call, so classification stays fast and cheap.

You generate topic maps on demand. From the **Topics** page, **Generate topics** clusters the environment's facet embeddings (density-based, so the pipeline discovers the number of topics instead of you presetting it), names each cluster, and versions the result. Regenerating keeps stable topic identities: a cluster that matches a previous topic keeps its ID and name, so drill-down links and mental models survive refreshes.

## Requirements

* Trace enrichment enabled for your workspace.
* At least **100 summaries** for a facet before you can generate its first topic map. Density clustering below that produces noise, not topics.

## Browsing topics

Open **Topics** in an environment's sidebar (requires `trace.read`, same as Traces):

* Switch between **Task** topics (what users ask for) and **Issues** topics (what goes wrong).
* Each topic shows its live trace count and share of classified traffic.
* **No match** collects traces that fit no topic. These are often the interesting outliers.
* The header shows the map version and generation time. **Regenerate topics** refreshes the map from current traffic.

## Drilling into a topic

Click any topic to open the **Traces** page filtered to that topic's members. The filter is a regular trace filter (`topic__task` or `topic__issues`), so you can:

* combine it with any other filter (model, status, date range, tags),
* share the URL with your team,
* use it anywhere trace filters work.

From the filtered list, the usual trace actions apply. Open traces, inspect spans, or select traces and add them to a dataset to turn a production pattern into an eval.

## Frequently asked questions

**Which traces get classified?** Every trace ingested after you enable enrichment for your workspace, once it has been quiet for a few minutes. The pause lets multi-span traces finish before summarization.

**Why don't topic counts equal the trace count?** Topics counts only traces whose facet summary and embedding succeeded and that the pipeline has classified against the current map. Generation picks up traces enriched before the first map existed.

**Do topic names change?** Regeneration can refresh names, but topic identity is stable: a regenerated cluster that matches a previous topic keeps its ID, and by default its name.

**Does AgentMark use trace data to train models?** No. AgentMark derives summaries and embeddings for your workspace only. They inherit trace retention and expire on the same schedule as the traces they describe.

<div className="mt-8 rounded-lg bg-blue-50 p-6 dark:bg-blue-900/30">
  <h3 className="font-semibold mb-3">Have questions?</h3>
  <p className="mb-4">Reach out any time:</p>

  <ul>
    <li>
      Email the team at <a href="mailto:hello@agentmark.co" className="text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-200">[hello@agentmark.co](mailto:hello@agentmark.co)</a> for support
    </li>

    <li>
      Schedule an <a href="https://cal.com/ryan-randall/enterprise" className="text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-200">Enterprise Demo</a> to learn about AgentMark's business solutions
    </li>
  </ul>
</div>
