> ## 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 agents, or get one agent

> Retrieve all agents in the authenticated user's organization, sorted alphabetically by
name, with their tags.

The list leaves out each agent's `systemPrompt`, and gives each tool only its `config`
(an empty object when it has none), not its full definition. Pass `id` to get one agent
with its system prompt and full tool definitions.




## OpenAPI

````yaml /openapi.yaml get /agents
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`,
    `/skills/upload`) require standard authentication
  contact:
    name: AsterAgents Support
    url: https://asteragents.com/support
servers:
  - url: https://www.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
  - name: Organization Settings
    description: Read and change organization-wide settings
paths:
  /agents:
    get:
      tags:
        - Agents
      summary: List agents, or get one agent
      description: >
        Retrieve all agents in the authenticated user's organization, sorted
        alphabetically by

        name, with their tags.


        The list leaves out each agent's `systemPrompt`, and gives each tool
        only its `config`

        (an empty object when it has none), not its full definition. Pass `id`
        to get one agent

        with its system prompt and full tool definitions.
      operationId: listAgents
      parameters:
        - name: id
          in: query
          required: false
          description: >-
            Return this one agent, with `systemPrompt` and full `tools`, instead
            of the list. 404 if it isn't in your organization.
          schema:
            type: integer
            example: 1
      responses:
        '200':
          description: >-
            The list of agents, or with `id`, the one agent (an object, not an
            array)
          content:
            application/json:
              schema:
                oneOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/Agent'
                  - $ref: '#/components/schemas/Agent'
              examples:
                list:
                  summary: GET /agents
                  value:
                    - id: 1
                      name: Customer Support Agent
                      description: Handles customer inquiries
                      logoUrl: null
                      conversationStarters:
                        - How can I help you today?
                        - What issue are you experiencing?
                      model: openai:gpt-4o
                      maxToolRoundtrips: 50
                      tools:
                        search_knowledge_base:
                          config:
                            accessibleKnowledgeBaseIds:
                              - 12
                        ask_web: {}
                      mcpServers: null
                      stage: released
                      showInChat: true
                      emailSlug: support-bot
                      createdAt: '2024-01-15T10:30:00.000Z'
                      updatedAt: '2024-01-20T14:00:00.000Z'
                      tags:
                        - id: 1
                          name: Production
                one:
                  summary: GET /agents?id=1
                  value:
                    id: 1
                    name: Customer Support Agent
                    systemPrompt: You are a helpful customer support agent...
                    tools:
                      ask_web:
                        description: Search the web and answer a question
                        parameters: {}
                    stage: released
                    showInChat: true
                    createdAt: '2024-01-15T10:30:00.000Z'
                    updatedAt: '2024-01-20T14:00:00.000Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          description: With `id`, no agent with that ID in your organization
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    Agent:
      type: object
      required:
        - id
        - name
        - stage
        - showInChat
        - createdAt
        - updatedAt
      properties:
        id:
          type: integer
          description: Unique agent identifier
          example: 1
        name:
          type: string
          description: Agent name
          example: Customer Support Agent
        description:
          type: string
          nullable: true
          description: Short description of the agent's purpose
          example: Handles customer inquiries and support tickets
        logoUrl:
          type: string
          nullable: true
          description: URL of the agent's logo, a copy stored and served by Aster
        conversationStarters:
          type: array
          nullable: true
          description: Suggested conversation starters shown to users
          items:
            type: string
          example:
            - How can I help you today?
            - What issue are you experiencing?
        model:
          type: string
          nullable: true
          description: >-
            The agent's model: a tier the org's current model fills
            (`tier:economy`, `tier:standard`, `tier:premium`), or a specific
            model identifier (e.g., `anthropic:claude-sonnet-5-5`)
          example: tier:standard
        currentModel:
          type:
            - string
            - 'null'
          description: >-
            The model the agent runs today: for a tier, the org's current model
            for it; otherwise the same as `model`. Null when no connected
            provider can run it.
          example: anthropic:claude-sonnet-5-5
        reasoningEffort:
          type: string
          nullable: true
          enum:
            - low
            - medium
            - high
          description: Per-agent reasoning effort; null means the model's default.
        maxToolRoundtrips:
          type: integer
          nullable: true
          description: Maximum number of tool call roundtrips per response
          example: 50
        systemPrompt:
          type: string
          nullable: true
          description: >-
            System prompt / instructions for the agent. Left out of the list;
            returned by `GET /agents?id=`.
        tools:
          type: object
          nullable: true
          description: >-
            Tool definitions keyed by tool name. In the list, each tool carries
            only its `config`; `GET /agents?id=` returns the full definitions.
          additionalProperties: true
        mcpServers:
          type: array
          nullable: true
          description: Connected MCP server IDs (integer mcp_server.id values)
          items:
            type: integer
        stage:
          type: string
          description: Agent lifecycle stage
          enum:
            - development
            - released
          example: development
        showInChat:
          type: boolean
          description: Whether the agent appears in the chat interface
          example: true
        emailSlug:
          type: string
          nullable: true
          description: Custom email slug for the agent's email address
          example: support-bot
        publishedVersionId:
          type: integer
          nullable: true
          description: |
            ID of the `agent_version` snapshot this agent's config currently
            reflects. Every save appends a version and advances this pointer;
            see `GET /agents/versions`. The live agent fields above remain the
            source of truth — this is bookkeeping for history and rollback.
          example: 42
        createdAt:
          type: string
          format: date-time
          description: When the agent was created
          example: '2024-01-15T10:30:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: When the agent was last updated
          example: '2024-01-20T14:00:00.000Z'
        tags:
          type: array
          description: Tags associated with this agent
          items:
            type: object
            properties:
              id:
                type: integer
                example: 1
              name:
                type: string
                example: Production
    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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.