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

# List All Custom Agents

> Returns all Custom Agents accessible to the authenticated user within their company tenant.



## OpenAPI

````yaml /openapi/agents-openapi.yaml get /customAgents/api/v1
openapi: 3.1.0
info:
  title: DataGOL Custom Agents API
  description: >-
    Complete API for creating, configuring, sharing, and interacting with Custom
    AI Agents on the DataGOL platform. Covers agent CRUD, permissions,
    conversations, and streaming.
  version: 1.0.0
  contact:
    name: DataGOL Support
    url: https://datagol.ai
servers:
  - url: https://be.datagol.ai
    description: Backend API (Production) — agent management, conversations, permissions
  - url: https://ai.datagol.ai
    description: AI Core (Production) — streaming, chat completion, conversation naming
security:
  - ServiceAccountAuth: []
  - BearerAuth: []
tags:
  - name: Custom Agents
    description: Create, read, and manage Custom AI Agents.
  - name: Permissions
    description: View and manage who has access to an agent.
  - name: Conversations
    description: Open and list conversation sessions backed by an agent.
  - name: Messaging
    description: Send messages and stream AI responses.
  - name: Reference Data
    description: >-
      Lookup APIs for workspaces, connectors, and team members used when
      building agent configs.
paths:
  /customAgents/api/v1:
    get:
      tags:
        - Custom Agents
      summary: List All Custom Agents
      description: >-
        Returns all Custom Agents accessible to the authenticated user within
        their company tenant.
      operationId: listCustomAgents
      responses:
        '200':
          description: Array of agent summaries.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AgentResponse'
        '401':
          description: Missing or expired JWT token.
        '403':
          description: User lacks VIEW_COPILOT permission.
components:
  schemas:
    AgentResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
        prompt:
          type: string
        instructions:
          type: string
        examples:
          type: string
        isPublished:
          type: boolean
        skills:
          type: array
          items:
            $ref: '#/components/schemas/Skill'
        uiMetadata:
          $ref: '#/components/schemas/UiMetadata'
        configs:
          $ref: '#/components/schemas/AgentConfigs'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Skill:
      type: object
      required:
        - id
        - name
        - description
        - s3Url
        - enabled
      properties:
        id:
          type: integer
          description: Numeric skill ID from the skills catalog.
          example: 10
        name:
          type: string
          description: Machine-readable skill identifier.
          example: chart-visualization
        description:
          type: string
          description: >-
            Trigger condition — the model reads this to decide when to invoke
            the skill.
          example: Read this skill when asked for a dashboard or a chart.
        s3Url:
          type: string
          description: >-
            S3 path to the SKILL.md file. Retrieved automatically when a skill
            is selected in the UI.
          example: InnCreTech/skills/10/3af838c6-01de-498d-8937-4f774b0983cd/SKILL.md
        enabled:
          type: boolean
          description: >-
            Whether this skill is active. false = temporarily disabled without
            removing.
          example: true
    UiMetadata:
      type: object
      properties:
        capabilities:
          type: object
          required:
            - models
            - allowDownload
            - conversationFiles
          properties:
            allowDownload:
              type: boolean
              description: true = download button appears in conversation toolbar.
              example: true
            models:
              type: object
              required:
                - enabled
                - supportedModels
                - defaultValue
              properties:
                enabled:
                  type: boolean
                  description: >-
                    true = model selector dropdown shown in chat header. false =
                    model is locked.
                  example: true
                supportedModels:
                  type: array
                  items:
                    type: string
                  description: >-
                    Model IDs available in the selector. Supported values:
                    gpt-5.2, gpt-4.1, o4-mini, vertex_ai/claude-opus-4-7,
                    claude-sonnet-4-6, claude-haiku-4-5-20251001,
                    claude-opus-4-6
                  example:
                    - gpt-5.2
                    - claude-sonnet-4-6
                    - o4-mini
                defaultValue:
                  type: string
                  description: >-
                    Model pre-selected when a conversation starts. Must be in
                    supportedModels.
                  example: gpt-5.2
            conversationFiles:
              type: object
              properties:
                enabled:
                  type: boolean
                  description: >-
                    true = file upload button shown in chat input area (PDFs,
                    CSVs, images).
                  example: true
        style:
          type: object
          properties:
            logo:
              type: object
              properties:
                bgColor:
                  type: string
                  description: >-
                    Background color for the agent logo bubble. CSS color value
                    or empty string for default.
                  example: '#1a1a2e'
                textColor:
                  type: string
                  description: Icon/text color on top of the logo background.
                  example: '#ffffff'
        input:
          type: object
          properties:
            placeholder:
              type: string
              description: >-
                Placeholder text in the chat input box. Hints at what the agent
                specializes in.
              example: What is EBITDA? And How Its Calculated
        bestFor:
          type: array
          items:
            type: string
          description: >-
            Tags describing ideal use cases. Displayed as chips in the agent
            discovery UI.
          example:
            - Financial Analysis
            - P&L Reports
        conversationStarters:
          type: array
          items:
            type: string
          description: >-
            Suggested opening messages rendered as clickable buttons in the chat
            before the user types.
          example:
            - What is EBITDA?
            - Show me Q1 revenue
        logo:
          nullable: true
          description: Custom logo object. null = use default DataGOL icon.
    AgentConfigs:
      type: object
      required:
        - connectors
        - webSearchEnabled
      properties:
        mcpConfigs:
          type: array
          description: MCP server tool configurations.
          items:
            $ref: '#/components/schemas/McpConfig'
        connectors:
          type: array
          description: >-
            Data sources the agent can retrieve information from. Mix and match
            types freely.
          items:
            oneOf:
              - $ref: '#/components/schemas/ConnectorWorkbookRag'
              - $ref: '#/components/schemas/ConnectorWorkspaceDocuments'
              - $ref: '#/components/schemas/ConnectorKnowledgeBase'
              - $ref: '#/components/schemas/ConnectorAI'
        webSearchEnabled:
          type: boolean
          description: >-
            Enables real-time web search. A web search tool is injected into the
            agent's tool set.
          example: true
        skillIds:
          type: array
          description: >-
            Numeric IDs of skills attached. Must match id values in the
            top-level skills array.
          items:
            type: integer
          example:
            - 10
            - 11
    McpConfig:
      type: object
      required:
        - name
        - url
        - transport
        - serverType
      properties:
        id:
          type: integer
          description: >-
            Unique ID assigned when the MCP server is registered. Omit for
            WORKBOOK serverType.
          example: 18
        name:
          type: string
          description: Display name shown in agent builder and tool traces.
          example: Workspace MCP
        description:
          type: string
          description: Description of what tools this MCP server exposes.
          example: ''
        url:
          type: string
          description: >-
            Full URL of the MCP server endpoint. Empty string for WORKBOOK
            serverType — resolved automatically from data.
          example: >-
            https://testing-mcp.datagol.ai/workspace/link-v2?workspace_id=...&token=...
        transport:
          type: string
          enum:
            - streamable_http
          description: Protocol for communicating with the MCP server.
        serverType:
          type: string
          enum:
            - CUSTOM
            - WORKBOOK
          description: >-
            CUSTOM = externally hosted MCP server. WORKBOOK = DataGOL-managed
            server backed by a workspace workbook.
        companyId:
          type: integer
          description: Tenant company ID this MCP server belongs to.
          example: 1
        data:
          type: object
          description: >-
            Required only for serverType WORKBOOK. Contains the workbook and
            workspace IDs.
          properties:
            id:
              type: string
              format: uuid
              description: Workbook UUID.
            workspaceId:
              type: string
              format: uuid
              description: Workspace UUID.
      example:
        CUSTOM:
          id: 18
          name: Workspace MCP
          description: ''
          url: >-
            https://testing-mcp.datagol.ai/workspace/link-v2?workspace_id=a336506d-540e-4a78-809b-daf501687bca&token=<token>
          transport: streamable_http
          serverType: CUSTOM
          companyId: 1
        WORKBOOK:
          serverType: WORKBOOK
          name: dg_Order.csv
          description: ''
          url: ''
          transport: streamable_http
          data:
            id: ca45078d-ed26-4752-a7a7-4aed24af033c
            workspaceId: 055b4db3-96e1-45e1-8ff5-3a911b779a53
    ConnectorWorkbookRag:
      type: object
      required:
        - id
        - type
        - sourceType
        - data
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the workbook file within the workspace.
          example: ec345675-06bf-4133-b8c3-f8fc1934b839
        type:
          type: string
          enum:
            - WORKBOOK_RAG
          description: RAG over a single workbook file (CSV, Excel, etc.).
        sourceType:
          type: string
          enum:
            - BACKEND
          description: Data is indexed and served by the DataGOL backend.
        data:
          type: object
          required:
            - title
            - workspaceId
            - workspaceName
          properties:
            title:
              type: string
              description: Display name of the workbook file.
              example: dg_order_item.csv
            description:
              type: string
              description: Optional description of the file content.
              example: ''
            workspaceId:
              type: string
              format: uuid
              description: UUID of the workspace containing this workbook.
              example: 055b4db3-96e1-45e1-8ff5-3a911b779a53
            workspaceName:
              type: string
              description: Display name of the workspace.
              example: Link_v2
    ConnectorWorkspaceDocuments:
      type: object
      required:
        - id
        - type
        - sourceType
        - data
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the workspace. All documents in it become searchable.
          example: 055b4db3-96e1-45e1-8ff5-3a911b779a53
        type:
          type: string
          enum:
            - WORKSPACE_DOCUMENTS
          description: RAG over all documents in an entire workspace.
        sourceType:
          type: string
          enum:
            - BACKEND
        data:
          type: object
          required:
            - name
          properties:
            name:
              type: string
              description: Display name of the workspace.
              example: Link_v2
    ConnectorKnowledgeBase:
      type: object
      required:
        - id
        - type
        - sourceType
        - data
      properties:
        id:
          type: string
          format: uuid
          description: UUID of the knowledge base.
          example: bca6c483-9205-4724-81e3-f4340b79efbc
        type:
          type: string
          enum:
            - KNOWLEDGE_BASE
          description: Searches a synced knowledge base (Google Drive, Web crawl, etc.).
        sourceType:
          type: string
          enum:
            - BACKEND
        data:
          type: object
          required:
            - id
            - companyId
            - userId
            - type
            - name
            - status
          properties:
            id:
              type: string
              format: uuid
            companyId:
              type: integer
              example: 1
            userId:
              type: integer
              example: 371
            type:
              type: string
              enum:
                - GOOGLE_DRIVE
                - WEB
              description: Source type of the knowledge base.
            name:
              type: string
              example: Mahi Changes Verifications
            status:
              type: string
              enum:
                - ACTIVE
                - INACTIVE
            lastSyncAt:
              type: string
              format: date-time
              nullable: true
            lastSyncStatus:
              type: string
              enum:
                - SUCCESS
                - FAILED
              nullable: true
            sourceId:
              nullable: true
            credentialId:
              type: integer
              nullable: true
              example: 7219087
            activeConfig:
              nullable: true
            latestRun:
              $ref: '#/components/schemas/KnowledgeBaseRun'
              nullable: true
    ConnectorAI:
      type: object
      required:
        - id
        - type
        - sourceType
      properties:
        id:
          type: string
          description: >-
            Numeric connector instance ID (as string). Fetch from GET
            /connector/api/v1/instance.
          example: '315'
        type:
          type: string
          enum:
            - CONNECTOR
          description: Live data via AI-side connector instance.
        sourceType:
          type: string
          enum:
            - AI
          description: Data is fetched live by the AI microservice at query time.
    KnowledgeBaseRun:
      type: object
      properties:
        id:
          type: string
          format: uuid
        connectorId:
          type: string
          format: uuid
        runType:
          type: string
          enum:
            - INCREMENTAL
            - FULL
        status:
          type: string
          enum:
            - SUCCESS
            - FAILED
            - RUNNING
        temporalWorkflowId:
          type: string
        startedAt:
          type: string
          format: date-time
        finishedAt:
          type: string
          format: date-time
        errorMessage:
          type: string
          nullable: true
        statsJson:
          type: object
          example:
            total: 49
            failed: 0
            completed: 49
        checkpointJson:
          nullable: true
  securitySchemes:
    ServiceAccountAuth:
      type: apiKey
      in: header
      name: x-auth-token
      description: >
        For server-to-server or automated access, use a DataGOL Service Account
        key.
                Pass it via the `x-auth-token` header instead of `Authorization`:
                `x-auth-token: <service-account-key>`
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        JWT token issued by the DataGOL Identity Provider. Embed `Authorization:
        Bearer <token>` in every request. Tokens contain `companyId`, `userId`,
        `roles`, and `permissions` claims.

````