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

# Validate Agent Import

> Validate an agent import request without saving.

Supports three input methods with deterministic access levels:
- agent_url:   Remote black_box - Just an endpoint URL to call
- agent_card:  Local grey_box - Upload agent configuration/card JSON
- source_code: Local white_box - Upload agent source code files

Returns validation status, access level, and parsed agent card for preview.



## OpenAPI

````yaml /openapi/api.json post /v1/agent-configurations/import/validate
openapi: 3.1.0
info:
  title: Vijil Console API (Combined)
  description: Combined OpenAPI specification for all vijil-console microservices.
  version: 0.1.0
servers: []
security: []
tags:
  - name: Teams
    description: Authentication, users, and team management
  - name: Agent Environment
    description: Agent, persona, policy, and harness management
  - name: Diamond
    description: Evaluation management and report retrieval
  - name: Dome
    description: Protection, guardrails, and telemetry
  - name: Red Team
    description: Red team campaigns
paths:
  /v1/agent-configurations/import/validate:
    post:
      tags:
        - Agent Environment
        - agent-import
      summary: Validate Agent Import
      description: >-
        Validate an agent import request without saving.


        Supports three input methods with deterministic access levels:

        - agent_url:   Remote black_box - Just an endpoint URL to call

        - agent_card:  Local grey_box - Upload agent configuration/card JSON

        - source_code: Local white_box - Upload agent source code files


        Returns validation status, access level, and parsed agent card for
        preview.
      operationId: validate_agent_import_v1_agent_configurations_import_validate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnifiedImportRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnifiedValidationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UnifiedImportRequest:
      properties:
        agent_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Url
          description: >-
            Remote black_box: Agent endpoint URL to call (e.g.,
            https://api.example.com/agent)
        agent_card:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Agent Card
          description: 'Local grey_box: Upload agent configuration/card JSON directly'
        source_code:
          anyOf:
            - $ref: '#/components/schemas/SourceCodeUpload'
            - type: 'null'
          description: 'Local white_box: Upload agent source code files directly'
        framework:
          anyOf:
            - type: string
            - type: 'null'
          title: Framework
          description: Framework identifier (for informational purposes only)
        entry_point:
          anyOf:
            - type: string
            - type: 'null'
          title: Entry Point
          description: 'For white box: path to main file'
        override_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Override Name
          description: Override agent name
        rate_limit_requests_per_minute:
          type: integer
          minimum: 1
          title: Rate Limit Requests Per Minute
          default: 100
        api_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Key
          description: API key for the agent
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: External identity ID
        identity_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Identity Provider
          description: Identity provider name
        idp_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Idp Metadata
          description: IdP-specific metadata
      type: object
      title: UnifiedImportRequest
      description: >-
        Unified request model for agent import.


        Supports five input methods (exactly one required), each with
        deterministic access level:


        | Input Method | Mode   | Access Level |
        Description                          |

        |--------------|--------|--------------|--------------------------------------|

        | agent_url    | Remote | black_box    | Just an endpoint URL to
        call         |

        | agent_card   | Local  | grey_box     | Upload agent configuration/card
        JSON |

        | source_code  | Local  | white_box    | Upload agent source code
        files       |
    UnifiedValidationResponse:
      properties:
        valid:
          type: boolean
          title: Valid
        access_level:
          anyOf:
            - type: string
            - type: 'null'
          title: Access Level
        agent_card:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Agent Card
        errors:
          items:
            type: string
          type: array
          title: Errors
          default: []
        warnings:
          items:
            type: string
          type: array
          title: Warnings
          default: []
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
        identity_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Identity Provider
      type: object
      required:
        - valid
      title: UnifiedValidationResponse
      description: |-
        Response model for unified validation.

        Returns validation status and parsed agent card for preview.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SourceCodeUpload:
      properties:
        files:
          additionalProperties:
            type: string
          type: object
          title: Files
          description: Map of filename to content. Use 'main.py' for single file uploads.
        entry_point:
          type: string
          title: Entry Point
          description: Main entry point file (must exist in files)
          default: main.py
        framework:
          type: string
          title: Framework
          description: Framework identifier (for informational purposes only)
          default: unknown
        agent_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Name
          description: Agent name (extracted from code if not provided)
        model_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Name
          description: Model name used by the agent
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Agent description
        system_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: System Prompt
          description: System prompt if known
        tools:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tools
          description: List of tools/functions the agent uses
      type: object
      required:
        - files
      title: SourceCodeUpload
      description: |-
        Model for direct source code upload.

        Supports single file or multi-file upload for white box agent import.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````