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

# List agent tags

> Retrieve all agent tags for the organization, with a count of how many agents use each tag.




## OpenAPI

````yaml /openapi.yaml get /agent-tags
openapi: 3.1.0
info:
  title: AsterAgents API
  version: 1.0.0
  description: >
    API for AsterAgents platform operations.


    - **Admin endpoints** (`/admin/*`) require organization admin privileges
    (`org:admin` role)

    - **Agent endpoints** (`/agents`) require agent management permissions or
    `org:admin` role

    - **Knowledge base endpoints** (`/kb/*`) require standard authentication

    - **Skills endpoints** (`/skills/*`) require standard authentication

    - **File endpoints** (`/upload/*`, `/kb/files`, `/skills/files`) require
    standard authentication
  contact:
    name: AsterAgents Support
    url: https://asteragents.com/support
servers:
  - url: https://asteragents.com/api
    description: Production
  - url: http://localhost:3000/api
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Users
    description: Manage active organization users
  - name: Invitations
    description: Manage organization invitations
  - name: Files
    description: Upload and manage files
  - name: Knowledge Bases
    description: Manage knowledge bases and their files
  - name: Knowledge Base Management
    description: Create, update, and delete knowledge bases
  - name: Agents
    description: Create, update, and delete agents
  - name: Agent Tags
    description: Organize agents with tags
  - name: Tools
    description: Discover the tool catalog available to your organization
  - name: Skills
    description: Manage agent skills
  - name: Skill Files
    description: Manage bundled files for skills
  - name: Conversations
    description: Invoke agents and retrieve conversation history and messages
  - name: Scheduled Tasks
    description: Schedule agents to run automatically on a cron schedule
paths:
  /agent-tags:
    get:
      tags:
        - Agent Tags
      summary: List agent tags
      description: >
        Retrieve all agent tags for the organization, with a count of how many
        agents use each tag.
      operationId: listAgentTags
      responses:
        '200':
          description: Successfully retrieved tags
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AgentTagWithCount'
              examples:
                success:
                  value:
                    - id: 1
                      name: Production
                      createdBy: user_2ABC123DEF
                      createdAt: '2024-01-15T10:30:00.000Z'
                      agentCount: 3
                    - id: 2
                      name: Internal
                      createdBy: user_2ABC123DEF
                      createdAt: '2024-01-20T14:00:00.000Z'
                      agentCount: 1
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    AgentTagWithCount:
      allOf:
        - $ref: '#/components/schemas/AgentTag'
        - type: object
          properties:
            agentCount:
              type: integer
              description: Number of agents using this tag
              example: 3
    AgentTag:
      type: object
      required:
        - id
        - name
        - organizationId
        - createdBy
        - createdAt
        - updatedAt
      properties:
        id:
          type: integer
          description: Unique tag identifier
          example: 1
        name:
          type: string
          description: Tag name
          example: Production
        organizationId:
          type: string
          description: Organization the tag belongs to
          example: org_xxx
        createdBy:
          type: string
          description: Clerk user ID of the tag creator
          example: user_2ABC123DEF
        createdAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00.000Z'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Bad Request
        details:
          type: array
          items:
            type: object
            additionalProperties: true
  responses:
    BadRequest:
      description: Bad Request - Invalid parameters or user not part of organization
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: User is not part of any organization
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal Server Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        JWT token from Clerk authentication.

        Must be from a user with `org:admin` role.

````