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

# Import agents

> Import one or more agents from a JSON file



## OpenAPI

````yaml /api-reference/openapi/EvoAI-Core-Service/agents.yaml post /api/v1/agents/import
openapi: 3.0.0
info:
  title: Evolution Foundation - AI Core Service - Agents
  description: AI Agents, MCP tools and intelligent processing
  version: '1.0'
servers:
  - url: https://api.evoai.app
    description: Production server
  - url: http://localhost:5555
    description: Development server
    variables:
      port:
        default: '5555'
  - url: '{customUrl}'
    description: Custom server
    variables:
      customUrl:
        default: https://your-instance.com
        description: Enter your server URL
security: []
paths:
  /api/v1/agents/import:
    post:
      summary: Import agents
      description: Import one or more agents from a JSON file
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: JSON file containing agent data
                folder_id:
                  type: string
                  description: Folder ID (optional)
              required:
                - file
      responses:
        '200':
          description: Agents imported successfully
          content:
            application/json:
              schema:
                type: array
                items: 0c7f8781-157d-4875-a955-cb57d5278cd1
              example:
                success: true
                data:
                  - id: your-agent-id
                    account_id: your-account-id
                    name: Imported Agent 1
                    description: First imported agent
                    type: llm
                    model: your-model-name
                    api_key_id: your-api-key-id
                    instruction: You are a helpful assistant...
                    card_url: ''
                    folder_id: your-folder-id
                    config: {}
                    role: assistant
                    goal: Assist users with their tasks
                    evolution_bot_id: ''
                    evolution_bot_sync: false
                    created_at: '2024-01-15T10:30:00Z'
                    updated_at: '2024-01-15T10:30:00Z'
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
        '400':
          description: Bad Request (invalid data)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: BAD_REQUEST
                  message: Invalid input data or file format
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
                  path: /api/v1/agents/import
                  method: POST
        '401':
          description: Unauthorized (invalid or missing token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: UNAUTHORIZED
                  message: Invalid or missing authentication token
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
                  path: /api/v1/agents/import
                  method: POST
        '402':
          description: Payment Required (agent limit exceeded)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: PAYMENT_REQUIRED
                  message: Agent limit exceeded
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
                  path: /api/v1/agents/import
                  method: POST
        '403':
          description: Forbidden (insufficient permissions)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: FORBIDDEN
                  message: Folder does not belong to the client
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
                  path: /api/v1/agents/import
                  method: POST
        '404':
          description: Not Found (resource not found)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: NOT_FOUND
                  message: Folder not found
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
                  path: /api/v1/agents/import
                  method: POST
        '500':
          description: Internal Server Error (server error)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: INTERNAL_SERVER_ERROR
                  message: An unexpected error occurred
                meta:
                  timestamp: '2024-01-15T10:30:00Z'
                  path: /api/v1/agents/import
                  method: POST
      security:
        - ApiAccessToken: []
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
        meta:
          type: object
          properties:
            timestamp:
              type: string
              format: date-time
            path:
              type: string
            method:
              type: string
  securitySchemes:
    ApiAccessToken:
      type: apiKey
      in: header
      name: api_access_token
      description: API Access Token (UUID) for authentication

````