> ## 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.

# Generate or create a scenario

> Creates a new scenario from a dataset, a script, or a generated/provided graph. The creation is processed in the background.



## OpenAPI

````yaml /openapi.json post /simulate/scenarios/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/scenarios/create/:
    post:
      tags:
        - Scenarios
      summary: Generate or create a scenario
      description: >-
        Creates a new scenario from a dataset, a script, or a generated/provided
        graph. The creation is processed in the background.
      operationId: createScenario
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the scenario.
                  maxLength: 255
                description:
                  type: string
                  description: An optional description for the scenario.
                agent_definition_id:
                  type: string
                  format: uuid
                  description: >-
                    The UUID of the agent definition to associate with this
                    scenario. Required when generate_graph is true.
                kind:
                  type: string
                  enum:
                    - dataset
                    - script
                    - graph
                  default: dataset
                  description: The kind of scenario to create.
                dataset_id:
                  type: string
                  format: uuid
                  description: >-
                    The UUID of the source dataset. Required if kind is
                    'dataset'.
                script_url:
                  type: string
                  format: uri
                  description: URL to the script. Required if kind is 'script'.
                no_of_rows:
                  type: integer
                  default: 20
                  description: Number of rows to generate for a 'graph' kind scenario.
                add_persona_automatically:
                  type: boolean
                  default: false
                  description: If true, automatically adds personas to the scenario.
                graph:
                  type: object
                  nullable: true
                  description: >-
                    The graph structure for a 'graph' kind scenario. Required if
                    'generate_graph' is false.
                generate_graph:
                  type: boolean
                  default: false
                  description: >-
                    If true, generates a graph for the scenario.
                    `agent_definition_id` is required.
                personas:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: List of persona IDs to use in the scenario.
              required:
                - name
                - agent_definition_id
            examples:
              graph-generation:
                summary: Generate a graph scenario
                value:
                  name: test-scene-1
                  description: ''
                  agent_definition_id: 87a193df-12a6-46e1-860d-d18ddb4a00cf
                  kind: graph
                  no_of_rows: 10
                  add_persona_automatically: true
                  graph: null
                  generate_graph: true
              from-dataset:
                summary: Create a scenario from a dataset
                value:
                  name: <name>
                  description: <description>
                  agent_definition_id: <agent_definition_id>
                  kind: dataset
                  dataset_id: <dataset_id>
      responses:
        '202':
          description: >-
            Scenario creation has been accepted and is processing in the
            background.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Graph scenario creation started
                  scenario:
                    $ref: '#/components/schemas/Scenario'
                  status:
                    type: string
                    example: processing
        '400':
          description: >-
            Invalid data provided. Check for missing required fields based on
            the 'kind' of scenario.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: object
        '401':
          description: Authentication credentials were not provided.
        '500':
          description: Internal server error occurred during scenario creation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: 'Failed to create scenario: [error details]'
      security:
        - ApiKeyAuth: []
          SecretKeyAuth: []
components:
  schemas:
    Scenario:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
        source:
          type: string
        scenario_type:
          type: string
          enum:
            - DATASET
            - SCRIPT
            - GRAPH
        organization:
          type: string
          format: uuid
        dataset:
          type: string
          format: uuid
          nullable: true
        dataset_rows:
          type: integer
        status:
          type: string
        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

````