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

# Create an agent under an app



## OpenAPI

````yaml post /apps/{alias}/agents
openapi: 3.0.1
info:
  title: Elementum API
  description: ''
  contact:
    email: apiteam@elementum.io
  version: 0.0.1
servers:
  - url: /v1
security: []
tags:
  - name: Access Token
    description: Manage access tokens using OAuth 2.0 standards
  - name: Agents
    description: Manage AI agents
  - name: Apps
    description: Compose and manage apps
  - name: Attachments
    description: Manage the attachments of a record
  - name: Automations
    description: Manage automations
  - name: Comments
    description: Manage the conversation of a record
  - name: Flows
    description: Manage flows
  - name: Groups
    description: Manage groups and group membership
  - name: Domains
    description: Manage organization domains
  - name: Records
    description: Manage your records
  - name: Related-items
    description: Manage the related items of a record
  - name: Search Tables
    description: Manage search tables (snowflake and linked)
  - name: Skills
    description: Manage agent skills
  - name: Tables
    description: 'Manage tables: schemas, fields, joins, and join mappings'
  - name: Users
    description: Manage users in your organization
  - name: Views
    description: Manage app views
  - name: Watchers
    description: Manage the watchers of a record
externalDocs:
  description: Find out more about Elementum
  url: https://www.elementum.com/
paths:
  /apps/{alias}/agents:
    post:
      tags:
        - Agents
      summary: Create an agent under an app
      operationId: createAgent
      parameters:
        - $ref: '#/components/parameters/alias'
      requestBody:
        description: Agent creation request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentBundleCreateRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PassthroughObject'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      security:
        - ClientCredentials: []
components:
  parameters:
    alias:
      name: alias
      in: path
      description: The app's namespace or its UUID
      required: true
      schema:
        type: string
        format: string
  schemas:
    AgentBundleCreateRequest:
      required:
        - agent
      type: object
      properties:
        tools:
          type: array
          description: Optional tools to attach to the new agent
          items:
            type: object
            additionalProperties: true
        a2aSkills:
          type: array
          description: Optional A2A skills to attach to the new agent
          items:
            type: object
            additionalProperties: true
        agent:
          $ref: '#/components/schemas/AgentCreateInput'
      description: Body for POST /v1/apps/{alias}/agents.
    PassthroughObject:
      type: object
      additionalProperties: true
      description: Free-form JSON object forwarded to/from the downstream service.
    AgentCreateInput:
      type: object
      properties:
        elementum:
          $ref: '#/components/schemas/AgentSubtypeCreateInput'
      description: Discriminator wrapper. Exactly one subtype field must be populated.
    AgentSubtypeCreateInput:
      type: object
      properties:
        temperature:
          type: number
          description: Model sampling temperature; typical range 0.0–2.0
        instructions:
          type: string
          description: System prompt steering the agent's behavior
        avatarAttachmentId:
          type: string
          description: Attachment ID for the agent's avatar image
          format: uuid
        maxLength:
          type: integer
          description: Maximum tokens the model may return per turn
          format: int32
        firstMessage:
          type: string
          description: Opening message the agent posts when a conversation starts
        reasoningEffort:
          type: string
          description: How much hidden reasoning the model is allowed before answering
          enum:
            - MINIMAL
            - LOW
            - MEDIUM
            - HIGH
        name:
          type: string
          description: The agent's display name
        description:
          type: string
          description: Short summary shown to users picking an agent
        aiProviderConnectorId:
          type: string
          description: ID of the AI provider connector the agent uses
          format: uuid
      additionalProperties: true
      description: >-
        Agent creation input. Less common fields (voiceConfig,
        agentAuthentication, runAs, startingActions, skillAccessConfig,
        systemSkillsConfig, a2aStreaming, a2aRecordConfig,
        conversationIdleTimeout) are accepted and forwarded as-is.
  responses:
    '400':
      description: Bad Request
    '401':
      description: Unauthorized
    '403':
      description: Forbidden
    '404':
      description: Not Found
    '422':
      description: Unprocessable Entity
    '429':
      description: Too Many Requests
    '500':
      description: Internal Server Error
  securitySchemes:
    ClientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
          scopes: {}

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.