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

# Get an agent

> Return a single agent. The returned fields reflect the draft state (the version this API edits); `published` tells whether a published version exists.



## OpenAPI

````yaml /openapi.yaml get /api/v1/spaces/{spaceId}/agents/{agentId}
openapi: 3.1.0
info:
  title: Nuwacom API
  description: API for Nuwacom application
  version: 1.0.0
servers:
  - url: https://{customer-tenant}.nuwacom.ai
    description: Nuwacom API
security:
  - bearerAuth: []
paths:
  /api/v1/spaces/{spaceId}/agents/{agentId}:
    get:
      tags:
        - Agents
      summary: Get an agent
      description: >-
        Return a single agent. The returned fields reflect the draft state (the
        version this API edits); `published` tells whether a published version
        exists.
      operationId: getApiV1SpacesBySpaceIdAgentsByAgentId
      parameters:
        - in: path
          name: spaceId
          schema:
            anyOf:
              - type: string
                minLength: 2
                maxLength: 6
              - type: string
                minLength: 21
                maxLength: 21
            description: ID of the space the agent belongs to.
          required: true
        - in: path
          name: agentId
          schema:
            type: string
            format: uuid
            description: Unique ID of the agent.
          required: true
      responses:
        '200':
          description: Agent returned successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: >-
                      Unique ID of the agent. Use it with the Completion API
                      (`agentId` option) to chat with the agent.
                  spaceId:
                    anyOf:
                      - type: string
                        minLength: 2
                        maxLength: 6
                      - type: string
                        minLength: 21
                        maxLength: 21
                    description: ID of the space the agent belongs to.
                  name:
                    type: string
                  description:
                    type: string
                  systemInstruction:
                    anyOf:
                      - type: string
                        nullable: true
                  conversationStarters:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: >-
                            Unique ID of the conversation starter. Generated
                            server-side when omitted.
                        text:
                          type: string
                          description: >-
                            The prompt text sent to the agent when the starter
                            is clicked.
                        label:
                          type: string
                          description: >-
                            Short display label. Falls back to the text when
                            omitted.
                        type:
                          enum:
                            - prompt
                            - text
                          description: Kind of starter. Defaults to "text".
                          default: text
                      required:
                        - text
                  welcomeMessage:
                    anyOf:
                      - type: object
                        additionalProperties: {}
                        nullable: true
                  model:
                    anyOf:
                      - type: string
                        nullable: true
                  temperature:
                    anyOf:
                      - type: number
                        nullable: true
                  attachmentIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                  folderIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                  contentIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                  allowUploads:
                    type: boolean
                  allowUrls:
                    type: boolean
                  enableFollowUpMessages:
                    type: boolean
                  categoryId:
                    anyOf:
                      - type: number
                        nullable: true
                  voiceId:
                    anyOf:
                      - type: string
                        nullable: true
                  appEnabled:
                    type: boolean
                  embedEnabled:
                    type: boolean
                    description: >-
                      Whether the agent is published as an external, embeddable
                      chat widget.
                  embedId:
                    anyOf:
                      - type: string
                        nullable: true
                    description: Identifier used to embed the agent as an external widget.
                  embedOptions:
                    type: object
                    properties:
                      domainWhitelist:
                        type: array
                        items:
                          type: string
                      showSources:
                        type: boolean
                      allowVoiceInput:
                        type: boolean
                      allowFileUpload:
                        type: boolean
                      themeMode:
                        enum:
                          - dark
                          - light
                      lightTheme:
                        type: object
                        properties:
                          backgroundColor:
                            anyOf:
                              - type: object
                                properties:
                                  h:
                                    type: number
                                  s:
                                    type: number
                                  v:
                                    type: number
                                  a:
                                    type: number
                                required:
                                  - h
                                  - s
                                  - v
                                  - a
                                nullable: true
                          primaryColor:
                            anyOf:
                              - type: object
                                properties:
                                  h:
                                    type: number
                                  s:
                                    type: number
                                  v:
                                    type: number
                                  a:
                                    type: number
                                required:
                                  - h
                                  - s
                                  - v
                                  - a
                                nullable: true
                        required: []
                      darkTheme:
                        type: object
                        properties:
                          backgroundColor:
                            anyOf:
                              - type: object
                                properties:
                                  h:
                                    type: number
                                  s:
                                    type: number
                                  v:
                                    type: number
                                  a:
                                    type: number
                                required:
                                  - h
                                  - s
                                  - v
                                  - a
                                nullable: true
                          primaryColor:
                            anyOf:
                              - type: object
                                properties:
                                  h:
                                    type: number
                                  s:
                                    type: number
                                  v:
                                    type: number
                                  a:
                                    type: number
                                required:
                                  - h
                                  - s
                                  - v
                                  - a
                                nullable: true
                        required: []
                    required: []
                    description: External embed widget options (draft state).
                  actions:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Unique ID of the action.
                        integration:
                          type: string
                        key:
                          type: string
                        requiresConfirmation:
                          type: boolean
                        defaultValues:
                          type: object
                          additionalProperties: {}
                        integrationId:
                          anyOf:
                            - type: string
                              nullable: true
                        mcpClientId:
                          anyOf:
                            - type: string
                              nullable: true
                      required:
                        - id
                        - integration
                        - key
                        - requiresConfirmation
                        - defaultValues
                        - integrationId
                        - mcpClientId
                    description: Actions/tools configured on the agent (draft state).
                  isSystemAgent:
                    type: boolean
                    description: >-
                      true for built-in nuwacom system agents (cannot be updated
                      or deleted).
                  published:
                    type: boolean
                    description: >-
                      Whether a published version of the agent exists.
                      Publishing happens in the nuwacom app.
                  hasUnpublishedChanges:
                    type: boolean
                    description: >-
                      true when the draft differs from the published version (or
                      nothing has been published yet).
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                required:
                  - id
                  - spaceId
                  - name
                  - description
                  - systemInstruction
                  - conversationStarters
                  - welcomeMessage
                  - model
                  - temperature
                  - attachmentIds
                  - folderIds
                  - contentIds
                  - allowUploads
                  - allowUrls
                  - enableFollowUpMessages
                  - categoryId
                  - voiceId
                  - appEnabled
                  - embedEnabled
                  - embedId
                  - embedOptions
                  - actions
                  - isSystemAgent
                  - published
                  - hasUnpublishedChanges
                  - createdAt
                  - updatedAt
        '403':
          description: The caller lacks permission to view agents in this space.
        '404':
          description: Agent not found in the provided space.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````