Skip to main content

Overview

A category is a named grouping for assertions and scenarios in your organization, with a title and a description. Use one for each kind of check you care about, such as “Mandate compliance”, “Rebooking”, or “Tone with upset customers”.
  • An assertion belongs to at most one category.
  • A scenario can belong to any number.
  • Categories belong to the organization, not to one traced function. A function’s Categories page shows the same categories with counts for that function only.
Categories are for organizing. Nothing about a category is approved or reviewed.

Why Categorize

  • Experiment results by kind of check. An experiment’s rollup has one row per category, so you can see that a change fixed rebooking but regressed tone.
  • Sharper generated assertions. When Bitfab generates assertions, it files each one under the category it fits and records why. Passing categoryIds limits generation to those categories.
  • A review queue per topic. The Assertions page filters by category, so one person can review every assertion about one kind of behavior.

Creating and Editing Categories

Ask your coding agent:
The agent uses save_category to create or rename a category and save_trace_assertions to file assertions into it. The New category button on the Categories page shows the prompt to use. From the SDKs:
Pass category_id: null (None in Python) on a save to clear an assertion’s category. Leaving the field out keeps the category it has. To file a trace’s scenario under categories, your agent uses save_trace_categories, which replaces the trace’s whole set of categories.

Deleting a Category

Deleting a category keeps everything filed under it. Its assertions, their verdicts, and its scenarios stay, filed under one category fewer. Ask your coding agent to delete it, which calls delete_category, or call categories.delete from an SDK.

Tools and Methods

See the TypeScript reference for the full types.