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

# Create agent definition

> Create a new agent definition and its first version.



## OpenAPI

````yaml /openapi.json post /simulate/agent-definitions/create/
openapi: 3.0.0
info:
  title: FutureAGI Unified API
  version: 1.0.0
  description: >-
    Complete API documentation for FutureAGI platform - Simulate module
    (scenario management, agent definitions, test executions, call analytics)
    and Model Hub Evaluations API (evaluation templates, playgrounds, metrics,
    and execution tracking)
  contact:
    email: support@futureagi.com
servers:
  - url: https://api.futureagi.com
    description: Production API
security: []
tags:
  - name: Health
    description: Health check operations for monitoring server status
  - name: Authentication
    description: User authentication and token management
  - name: Scenarios
    description: Test scenario management and execution
  - name: Agent Definitions
    description: Agent definition CRUD operations
  - name: Agent Versions
    description: Agent version control and management
  - name: Simulator Agents
    description: Simulator agent operations
  - name: Run Tests
    description: Test execution management
  - name: Test Executions
    description: Test execution tracking and analytics
  - name: Call Executions
    description: Individual call execution details
  - name: Call Transcripts
    description: Transcript management and retrieval
  - name: Personas
    description: Persona management for testing
  - name: Analytics
    description: Analytics and reporting
  - name: Export Simulate
    description: Data export operations
  - name: Datasets
    description: >-
      Operations related to datasets, including creation, modification, and data
      management.
  - name: Eval Groups
    description: Evaluation group management
  - name: Eval Templates
    description: Base evaluation template operations
  - name: Custom Eval Templates
    description: Custom evaluation template CRUD operations
  - name: Eval Playground
    description: Test and run evaluations in playground environment
  - name: Eval Logs & Metrics
    description: Evaluation logs, metrics, and execution tracking
  - name: Eval Configuration
    description: Evaluation configuration and templates retrieval
  - name: API Keys
    description: API key management
  - name: Prompt Workbench
    description: Prompt template version labeling and lookup by name, version, or label
paths:
  /simulate/agent-definitions/create/:
    post:
      tags:
        - Agent Definitions
      summary: Create agent definition
      description: Create a new agent definition and its first version.
      operationId: createAgentDefinition
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                agentType:
                  type: string
                  enum:
                    - voice
                    - text
                  description: Type of the agent.
                agentName:
                  type: string
                  description: Name of the agent.
                provider:
                  type: string
                  description: Provider for the agent (e.g., vapi, retell).
                  enum:
                    - vapi
                    - retell
                apiKey:
                  type: string
                  format: uuid
                  description: API key for the agent provider.
                assistantId:
                  type: string
                  description: External identifier for the assistant.
                description:
                  type: string
                  description: Description for the first version of the agent.
                language:
                  type: string
                  description: >-
                    Language of the agent ([ISO
                    639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes)
                    code, for example, `en` for English).
                knowledgeBase:
                  type: string
                  format: uuid
                  nullable: true
                  description: ID of the knowledge base to associate with the agent.
                countryCode:
                  type: string
                  description: >-
                    Country code for the contact number. For example, 1 for USA,
                    91 for India, etc.
                contactNumber:
                  type: string
                  description: >-
                    Contact number for the agent including country code. For
                    example, +1xxxxxxxxxx for USA, +91xxxxxxxxxx for India, etc.
                inbound:
                  type: boolean
                  description: Specifies if the agent handles inbound communication.
                commitMessage:
                  type: string
                  description: Commit message for the initial version of the agent.
                observabilityEnabled:
                  type: boolean
                  description: Enable observability for the agent.
              required:
                - agentName
                - provider
                - language
                - contactNumber
            examples:
              example-1:
                summary: Example payload for creating a voice agent
                value:
                  agentType: voice
                  agentName: test-ag
                  provider: vapi
                  apiKey: <api_key>
                  assistantId: <assistant_id>
                  description: <description>
                  language: en
                  knowledgeBase: ''
                  countryCode: '1'
                  contactNumber: <contact_number>
                  inbound: true
                  commitMessage: <commit_message>
                  observabilityEnabled: true
      responses:
        '201':
          description: Agent definition created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Agent definition created successfully
                  agent:
                    $ref: '#/components/schemas/AgentDefinition'
        '400':
          description: Invalid data provided.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid data
                  details:
                    type: object
        '401':
          description: Authentication credentials were not provided.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Failed to create agent definition: [error details]'
      security:
        - ApiKeyAuth: []
          SecretKeyAuth: []
components:
  schemas:
    AgentDefinition:
      type: object
      properties:
        id:
          type: string
          format: uuid
        agent_name:
          type: string
        agent_type:
          type: string
        contact_number:
          type: string
        inbound:
          type: boolean
        description:
          type: string
        assistant_id:
          type: string
        provider:
          type: string
        language:
          type: string
        websocket_url:
          type: string
          format: uri
          nullable: true
        websocket_headers:
          type: object
          nullable: true
        knowledge_base:
          type: string
          format: uuid
          nullable: true
        api_key:
          type: string
        webhook_secret:
          type: string
          nullable: true
        observability_provider:
          type: string
          format: uuid
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        API Key for authentication. Click
        [here](https://app.futureagi.com/dashboard/keys) to access API Key
    SecretKeyAuth:
      type: apiKey
      in: header
      name: X-Secret-Key
      description: >-
        Secret Key for authentication. Click
        [here](https://app.futureagi.com/dashboard/keys) to access Secret Key

````