# Create a Recent Agent

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v2/agents/{agent_id}/recents:
    post:
      summary: Create a Recent Agent
      deprecated: false
      description: >-
        Creates a new recent agent.


        Parameters:

        - agent_id (int): The ID of the agent to create a new recent agent for.


        Returns:

        - A JSON response with the serialized recent agent data if the recent
        agent is created successfully.

        - A JSON response with an error message if the recent agent is not found
        or if an error occurs.


        Current Version:

        - 2.0.0
      operationId: api_v2_agents_recents_detail_create
      tags:
        - Agents
        - Agents
        - v2
      parameters:
        - name: agent_id
          in: path
          description: ''
          required: true
          example: 0
          schema:
            type: integer
        - name: Organization-Id
          in: header
          description: 'ID of the organization. Optional. '
          required: false
          example: 0
          schema:
            type: integer
        - name: Ocp-Apim-Subscription-Key
          in: header
          description: API KEY FOR EJENTO APIs
          required: true
          example: '{{your-api-key}}'
          schema:
            type: string
            default: '{{your-api-key}}'
        - name: Authorization
          in: header
          description: AUTH TOKEN
          example: Bearer {{your-access-token}}
          schema:
            type: string
            default: Bearer {{your-access-token}}
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecentAgentDetailPostRequestSerializer_V2'
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecentAgentDetailPostResponseSchema_V2'
          headers: {}
          x-apidog-name: Created
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecentAgentDetailPost400ResponseSchema_V2'
          headers: {}
          x-apidog-name: Bad Request
        '403':
          description: >-
            The subscription key belongs to a different organization than the
            one this request names, or you do not have access to the
            organization it names. An organization that does not exist returns
            the same response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    default: false
                  message:
                    type: string
                  data:
                    type: object
                    default: {}
                    x-apidog-orders: []
                    properties: {}
                    x-apidog-ignore-properties: []
                required:
                  - success
                  - message
                  - data
                x-apidog-orders:
                  - success
                  - message
                  - data
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Record Not Found
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecentAgentDetailPost404ResponseSchema_V2'
          headers: {}
          x-apidog-name: Server Error
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecentAgentDetailPost500ResponseSchema_V2'
          headers: {}
          x-apidog-name: ''
        '503':
          description: >-
            The organization for this request could not be verified. Try again
            later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    default: false
                  message:
                    type: string
                  data:
                    type: object
                    default: {}
                    x-apidog-orders: []
                    properties: {}
                    x-apidog-ignore-properties: []
                required:
                  - success
                  - message
                  - data
                x-apidog-orders:
                  - success
                  - message
                  - data
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: ''
      security: []
      x-apidog-folder: Agents
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/998119/apis/api-19061062-run
components:
  schemas:
    RecentAgentDetailPostRequestSerializer_V2:
      type: object
      properties:
        agent_id:
          type: integer
      required:
        - agent_id
      x-apidog-orders:
        - agent_id
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    RecentAgentDetailPostResponseSchema_V2:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          $ref: '#/components/schemas/RecentAgentDetailPostResponseSerializer_V2'
      required:
        - success
        - message
        - data
      x-apidog-orders:
        - success
        - message
        - data
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    RecentAgentDetailPostResponseSerializer_V2:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        agent:
          $ref: '#/components/schemas/RecentAgentDetail_AgentWithUserSerializer_V2'
        user:
          $ref: '#/components/schemas/RecentAgentDetail_UserIndexSerializer_V2'
        created_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        modified_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
      required:
        - id
        - agent
        - user
        - created_on
        - modified_on
      x-apidog-orders:
        - id
        - agent
        - user
        - created_on
        - modified_on
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    RecentAgentDetail_UserIndexSerializer_V2:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        email:
          type: string
          format: email
          title: Email address
          maxLength: 254
        first_name:
          type: string
          maxLength: 30
          nullable: true
        last_name:
          type: string
          maxLength: 30
          nullable: true
        organization:
          type: integer
          nullable: true
      required:
        - id
      x-apidog-orders:
        - id
        - email
        - first_name
        - last_name
        - organization
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    RecentAgentDetail_AgentWithUserSerializer_V2:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        created_by:
          type: string
          readOnly: true
          nullable: true
        modified_by:
          type: string
          readOnly: true
          nullable: true
        created_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        modified_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        user:
          $ref: '#/components/schemas/AgentRecent_User'
        agent_type:
          $ref: '#/components/schemas/AgentRecent_AgentType'
        instructions:
          type: array
          items:
            $ref: '#/components/schemas/AgentRecent_Instruction'
          readOnly: true
        project:
          $ref: '#/components/schemas/AgentRecent_Project'
        connected_tool_names:
          type: array
          items:
            type: string
          readOnly: true
        tags:
          type: array
          items:
            type: string
        character_voice:
          $ref: '#/components/schemas/AgentRecent_CharacterVoice'
        pattern:
          allOf:
            - $ref: '#/components/schemas/Pattern'
          readOnly: true
        agent_name:
          type: string
          maxLength: 256
        industry_area:
          type: string
          maxLength: 256
        domain:
          type: string
          nullable: true
        sample_q1:
          type: string
          maxLength: 1024
          nullable: true
        sample_q2:
          type: string
          maxLength: 1024
          nullable: true
        sample_q3:
          type: string
          maxLength: 1024
          nullable: true
        sample_q4:
          type: string
          maxLength: 1024
          nullable: true
        prefix_prompt:
          type: string
          nullable: true
        alias:
          type: string
          maxLength: 512
          nullable: true
        is_active:
          type: boolean
        is_deleted:
          type: boolean
        agent_image:
          type: string
          nullable: true
        access:
          type: string
          maxLength: 512
        status:
          type: string
          maxLength: 512
        caching_enabled:
          type: boolean
        chunk_count:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        attachment_chunk_count:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        attachment_chunking:
          type: boolean
        react_enabled:
          type: boolean
        react_max_iteration_count:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
        reasoning_mode:
          enum:
            - react
            - react_reflect
            - codeact
          type: string
          description: |-
            * `react` - ReAct
            * `react_reflect` - Reflection
            * `codeact` - CodeAct
        call_enabled:
          type: boolean
        is_published_as_teammate:
          type: boolean
          description: Indicates if the agent is published as a teammate on the platform
        chat_count:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Cached count of chats for performance
        likes_count:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: Cached count of likes for performance
        conversation_starter_enabled:
          type: boolean
        enable_embed:
          type: boolean
        langfuse_tracing_enabled:
          type: boolean
          description: Enable Langfuse tracing for this agent
        parent:
          type: integer
          nullable: true
        llm_config:
          type: integer
          nullable: true
        cloned_from:
          type: integer
          nullable: true
        voice_llm_config:
          type: integer
          nullable: true
      required:
        - id
        - created_by
        - modified_by
        - created_on
        - modified_on
        - user
        - agent_type
        - instructions
        - project
        - connected_tool_names
        - tags
        - character_voice
        - pattern
        - agent_name
        - industry_area
      x-apidog-orders:
        - id
        - created_by
        - modified_by
        - created_on
        - modified_on
        - user
        - agent_type
        - instructions
        - project
        - connected_tool_names
        - tags
        - character_voice
        - pattern
        - agent_name
        - industry_area
        - domain
        - sample_q1
        - sample_q2
        - sample_q3
        - sample_q4
        - prefix_prompt
        - alias
        - is_active
        - is_deleted
        - agent_image
        - access
        - status
        - caching_enabled
        - chunk_count
        - attachment_chunk_count
        - attachment_chunking
        - react_enabled
        - react_max_iteration_count
        - reasoning_mode
        - call_enabled
        - is_published_as_teammate
        - chat_count
        - likes_count
        - conversation_starter_enabled
        - enable_embed
        - langfuse_tracing_enabled
        - parent
        - llm_config
        - cloned_from
        - voice_llm_config
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Pattern:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          maxLength: 256
        description:
          type: string
          nullable: true
      required:
        - id
        - name
      x-apidog-orders:
        - id
        - name
        - description
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    AgentRecent_CharacterVoice:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        voice_name:
          type: string
          maxLength: 512
        voice_identifier:
          type: string
          maxLength: 512
        gender:
          enum:
            - male
            - female
          type: string
          description: |-
            * `male` - Male
            * `female` - Female
      required:
        - id
        - voice_name
        - voice_identifier
        - gender
      x-apidog-orders:
        - id
        - voice_name
        - voice_identifier
        - gender
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    AgentRecent_Project:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        project_name:
          type: string
          maxLength: 256
      required:
        - id
        - project_name
      x-apidog-orders:
        - id
        - project_name
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    AgentRecent_Instruction:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        created_by:
          type: string
          readOnly: true
          nullable: true
        modified_by:
          type: string
          readOnly: true
          nullable: true
        created_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        modified_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        instruction:
          type: string
        is_deleted:
          type: boolean
        parent:
          type: integer
          nullable: true
        agent:
          type: integer
      required:
        - id
        - created_by
        - modified_by
        - created_on
        - modified_on
        - instruction
        - agent
      x-apidog-orders:
        - id
        - created_by
        - modified_by
        - created_on
        - modified_on
        - instruction
        - is_deleted
        - parent
        - agent
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    AgentRecent_AgentType:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        created_by:
          type: string
          readOnly: true
          nullable: true
        modified_by:
          type: string
          readOnly: true
          nullable: true
        created_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        modified_on:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        name:
          type: string
          maxLength: 512
        description:
          type: string
          nullable: true
        parent:
          type: integer
          nullable: true
      required:
        - id
        - created_by
        - modified_by
        - created_on
        - modified_on
        - name
      x-apidog-orders:
        - id
        - created_by
        - modified_by
        - created_on
        - modified_on
        - name
        - description
        - parent
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    AgentRecent_User:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        email:
          type: string
          format: email
          title: Email address
          maxLength: 254
        first_name:
          type: string
          maxLength: 30
          nullable: true
        last_name:
          type: string
          maxLength: 30
          nullable: true
        organization:
          type: integer
          nullable: true
      required:
        - id
      x-apidog-orders:
        - id
        - email
        - first_name
        - last_name
        - organization
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    RecentAgentDetailPost400ResponseSchema_V2:
      type: object
      properties:
        success:
          type: boolean
          default: false
        message:
          type: string
          default: Bad Request
        data:
          type: object
          additionalProperties:
            type: string
          default: {}
          x-apidog-orders: []
          properties: {}
          x-apidog-ignore-properties: []
      x-apidog-orders:
        - success
        - message
        - data
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    RecentAgentDetailPost404ResponseSchema_V2:
      type: object
      properties:
        success:
          type: boolean
          default: false
        message:
          type: string
          default: Not Found
        data:
          type: object
          additionalProperties:
            type: string
          default: {}
          x-apidog-orders: []
          properties: {}
          x-apidog-ignore-properties: []
      x-apidog-orders:
        - success
        - message
        - data
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    RecentAgentDetailPost500ResponseSchema_V2:
      type: object
      properties:
        success:
          type: boolean
          default: false
        message:
          type: string
          default: Internal Server Error
        data:
          type: object
          additionalProperties:
            type: string
          default: {}
          x-apidog-orders: []
          properties: {}
          x-apidog-ignore-properties: []
      x-apidog-orders:
        - success
        - message
        - data
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    cookieAuth:
      type: apikey
      in: cookie
      name: sessionid
    oauth2:
      type: oauth2
      flows: {}
    APIKeyHeader:
      type: apikey
      in: header
      name: X-API-Key
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /api/login/access-token
    ejentoAuthKey:
      type: apikey
      in: header
      name: ejento-auth-key
      description: Server-to-server authentication key (EJENTO_SECRET / EJENTO_AUTH_KEY)
    Ocp-Apim-Subscription-Key:
      type: apikey
      in: header
      name: Ocp-Apim-Subscription-Key
      description: Subscription key. Required on every endpoint.
    Authorization:
      type: bearer
      scheme: bearer
      description: >-
        Your access token, sent as `Authorization: Bearer <token>` alongside the
        subscription key.
    Combination:
      group:
        - id: 619278
        - id: 619279
      type: combination
servers:
  - url: https://{{your-server-name}}
    description: Prod Env
security: []

```
