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

# Create a new agent

> Create a new agent (ChatSettings) with specified tools and MCP servers. Access control: Users can create agents in their personal groups. Company admins can create agents in any group within their company. Sys-admin users can create agents in any group.



## OpenAPI

````yaml /api-reference/openapi-v3.yaml post /api/v3/agents
openapi: 3.0.3
info:
  title: Paradigm API
  version: xenial-xerus (v3)
  description: >-
    A versatile and adaptable tool designed to integrate Generative AI into your
    applications
servers:
  - url: https://paradigm.lighton.ai
security: []
tags:
  - name: Agents
    description: Operations about agents
  - name: Threads
    description: Operations about agents conversation threads
  - name: Tools
    description: Operations about native tools
  - name: Models
    description: Operations about AI models
  - name: MCP
    description: Operations about MCP servers
  - name: Sources
    description: Operations about sources used by agents conversation threads
  - name: Artifacts
    description: Operations about artifacts generated by agents conversation threads
  - name: Agent
    description: >-
      Operations about agents (deprecated). Please use the 'Agents' API
      component instead.
  - name: Files
    description: Operations about files
  - name: Files Processing
    description: Operations about files processing
  - name: Tags
    description: Operations about tags
  - name: Workspaces
    description: Operations about workspaces
  - name: Users
    description: Operations about users
  - name: User Groups
    description: Operations about user groups
  - name: Companies
    description: Operations about companies
  - name: SCIM
    description: Operations about SCIM
paths:
  /api/v3/agents:
    post:
      tags:
        - Agents
      summary: Create a new agent
      description: >-
        Create a new agent (ChatSettings) with specified tools and MCP servers.
        Access control: Users can create agents in their personal groups.
        Company admins can create agents in any group within their company.
        Sys-admin users can create agents in any group.
      operationId: api_v3_agents_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateAgentRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateAgentRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSchema'
          description: ''
        '400':
          content:
            application/json:
              schema:
                description: Invalid request data
          description: ''
        '403':
          content:
            application/json:
              schema:
                description: Permission denied
          description: ''
        '404':
          content:
            application/json:
              schema:
                description: Company, group, tool, or MCP server not found
          description: ''
      security:
        - bearerAuth: []
components:
  schemas:
    CreateAgentRequest:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
          nullable: true
        instructions:
          type: string
          nullable: true
        scope_workspaces_by_group:
          type: boolean
          default: true
        company_id:
          type: integer
        group_id:
          type: integer
          nullable: true
        native_tool_ids:
          type: array
          items:
            type: string
            format: uuid
          default: []
        mcp_server_ids:
          type: array
          items:
            type: string
            format: uuid
          default: []
        scoped_workspace_ids:
          type: array
          items:
            type: integer
          nullable: true
        ownership:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/OwnershipEnum'
            - $ref: '#/components/schemas/NullEnum'
      required:
        - company_id
        - name
    AgentSchema:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type: string
          nullable: true
        instructions:
          type: string
          nullable: true
        company:
          $ref: '#/components/schemas/CompanySchema'
        group:
          $ref: '#/components/schemas/GroupSchema'
        workspaces:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceSchema'
        tools:
          $ref: '#/components/schemas/AgentToolsSchema'
        is_default:
          type: boolean
        ownership:
          type: string
        scope_workspaces_by_group:
          type: boolean
        scoped_workspace_ids:
          type: array
          items:
            type: integer
        is_current_user_favorite:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - company
        - created_at
        - description
        - group
        - id
        - instructions
        - is_current_user_favorite
        - is_default
        - name
        - ownership
        - scope_workspaces_by_group
        - scoped_workspace_ids
        - tools
        - updated_at
        - workspaces
    OwnershipEnum:
      enum:
        - personal
        - company
        - team
      type: string
      description: |-
        * `personal` - personal
        * `company` - company
        * `team` - team
    NullEnum:
      enum:
        - null
    CompanySchema:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        allow_ephemeral_mode:
          type: boolean
        is_sharing_enabled:
          type: boolean
      required:
        - allow_ephemeral_mode
        - id
        - is_sharing_enabled
        - name
    GroupSchema:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
      required:
        - id
        - name
    WorkspaceSchema:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        category:
          type: string
        file_count:
          type: integer
        summaries:
          type: array
          items:
            $ref: '#/components/schemas/WorkspaceSummarySchema'
          default: []
      required:
        - category
        - file_count
        - id
        - name
    AgentToolsSchema:
      type: object
      properties:
        native:
          type: array
          items:
            $ref: '#/components/schemas/NativeToolSchema'
        mcp_servers:
          type: array
          items:
            $ref: '#/components/schemas/MCPServerSchema'
      required:
        - mcp_servers
        - native
    WorkspaceSummarySchema:
      type: object
      properties:
        language:
          type: string
        summary:
          type: string
      required:
        - language
        - summary
    NativeToolSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        object:
          type: string
          default: tool
      required:
        - id
        - name
    MCPServerSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        object:
          type: string
          default: mcp_server
      required:
        - id
        - name
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your auth token.

````