Skip to main content

Tag & Category

Tags are global labels. The category-color theming layer on the frontend keys off the tag slug.

Schema

tags

ColumnTypeNotes
idUUIDPK
nametextDisplay name (e.g. "Voice")
slugtext, uniqueURL-safe form (e.g. voice)
createdAttimestamptz

agent_tags

ColumnType
agentIdUUID FK → agents
tagIdUUID FK → tags

Composite PK (agentId, tagId).

Endpoints

VerbPathGuard
GET/tagspublic
POST/tagsplatform_admin
DELETE/tags/:idplatform_admin

Tag-agent associations are managed via POST /agents/:id with tagIds[].

Frontend behavior

  • Filter chipsBrowseAgents.tsx derives the set of available tags from useTags() and renders one chip per tag with a count.
  • Active filter?tag=<slug> in the URL. Selecting a chip updates the query string.
  • Search — combines with the SearchContext text filter.
  • Color themethemeFor(tag.slug) from src/data/categoryThemes.ts returns the hex / Tailwind gradient. If the slug isn't in the map, default teal is used.

Adding a new category

If your new agent's primary tag isn't already in categoryThemes:

  1. POST /tags to create the tag.
  2. Edit fleapo-marketplace/src/data/categoryThemes.ts to add the slug with hex + gradient.
  3. Attach the tag to your agent via tagIds.

See Track C for the exact shape.

Tag vs primary category

There's no explicit "primary tag" column. The frontend treats agent.tags[0] as the visual category when rendering the card. Order your tagIds[] accordingly when creating the agent.