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

# Start Experiment

> Start an experiment. (Only an experiment in 'draft' status can be started.)



## OpenAPI

````yaml https://spec.speakeasy.com/syllable/syllable/syllable-sdk-oas-with-code-samples post /api/v1/experiments/{experiment_id}/start
openapi: 3.1.0
info:
  title: SyllableSDK
  description: >

    # Syllable Platform SDK


    Syllable SDK gives you the power of awesome AI agentry. 🚀


    ## Overview


    The Syllable SDK provides a comprehensive set of tools and APIs to integrate
    powerful AI

    capabilities into your communication applications. Whether you're building
    phone agents, chatbots,

    virtual assistants, or any other AI-driven solutions, Syllable SDK has got
    you covered.


    ## Features


    - **Agent Configuration**: Create and manage agents that can interact with
    users across various 

    channels.

    - **Channel Management**: Configure channels like SMS, web chat, and more to
    connect agents with 

    users.

    - **Custom Messages**: Set up custom messages that agents can deliver as
    greetings or responses.

    - **Conversations**: Track and manage conversations between users and
    agents, including session 

    management.

    - **Tools and Workflows**: Leverage tools and workflows to enhance agent
    capabilities, such as data 

    processing and API calls.

    - **Data Sources**: Integrate data sources to provide agents with additional
    context and 

    information.

    - **Insights and Analytics**: Analyze conversations and sessions to gain
    insights into user 

    interactions.

    - **Permissions and Security**: Manage permissions to control access to
    various features and 

    functionalities.

    - **Language Support**: Define language groups to enable multilingual
    support for agents.

    - **Outbound Campaigns**: Create and manage outbound communication campaigns
    to reach users 

    effectively.

    - **Session Labels**: Label sessions with evaluations of quality and
    descriptions of issues 

    encountered.

    - **Incident Management**: Track and manage incidents related to agent
    interactions.
  version: 0.0.3
servers:
  - url: https://api.syllable.cloud
    description: API server
security: []
tags:
  - name: agents
    description: >-
      Operations related to agent configuration. When a user interacts with
      the           Syllable system, they do so by communicating with an
      agent.           An agent is linked to a prompt, a custom message, and one
      or more channel targets to           define its behavior and capabilities.
      For more information, see           [Console
      docs](https://docs.syllable.ai/workspaces/Agents).
  - name: agents.test
    description: >-
      Operations for testing agents with live text.           These endpoints
      allow sending messages to an agent and receiving its responses.
  - name: channels
    description: >-
      Operations related to channel configuration.           A channel is an
      organization-level point of communication, like a phone number or a
      web           chat. A channel can be associated with an agent by creating
      a channel target linking           them.
  - name: channels.twilio
    description: Operations related to Twilio channel configuration.
  - name: channels.twilio.numbers
    description: >-
      Operations related to setting up phone numbers in Twilio for use
      in           channels.
  - name: channels.targets
    description: >-
      Operations related to channel target configuration. A channel
      target           links a channel to an agent, allowing users to
      communicate with the agent through that           channel. For more
      information, see           [Console
      docs](https://docs.syllable.ai/Resources/Channels).
  - name: conversations
    description: >-
      Operations related to conversations.           A conversation is a record
      of messages between a user and an agent, and is composed of           one
      or more sessions.
  - name: custom_messages
    description: >-
      Operations related to custom message configuration.           A custom
      message is a pre-configured message delivered by an agent as a greeting at
      the           beginning of a conversation. Multiple agents can use the
      same custom mesasage. A custom           message has one or more rules
      defined, which allow for different messages to be           dynamically
      selected and delivered at runtime based on the current time and
      either           date or day of the week. For more information,
      see           [Console docs](https://docs.syllable.ai/Resources/Messages).
  - name: dashboards
    description: >-
      Operations related to dashboards. Currently the API/SDK           only
      supports fetching basic information about dashboards.
  - name: data_sources
    description: >-
      Operations related to data sources. A data source is a blob of text
      that           can be made available to an agent's general info tools to
      provide more context to the           agent when generating its responses.
      For more information, see           [Console
      docs](https://docs.syllable.ai/Resources/DataSources).
  - name: directory
    description: Operations related to directory
  - name: events
    description: >-
      Operations related to events. An event represents a specific
      occurrence           during a session. Currently the API/SDK only supports
      fetching logged events.
  - name: incidents
    description: Operations related to incidents.
  - name: insights
    description: >-
      Operations related to insights results. An insight is a tool that
      processes          conversation data to extract information and generate
      reports.
  - name: insights.folders
    description: >-
      Operations related to insights upload folders. An insight folder is
      used          to upload call recordings for insight workflow analysis.
  - name: insights.tools
    description: >-
      Operations related to insights tool configurationss. An insight is a
      tool           that processes conversation data to extract information and
      generate reports.
  - name: insights.workflows
    description: >-
      Operations related to insights workflows. An workflow is series of
      tool           invocations that processes conversation data to extract
      information and generate           reports.
  - name: language_groups
    description: >-
      Operations related to language groups. A language group is a          
      collection of language, voice, and DTMF configuration that can be linked
      to an agent to           define the languages and voices it supports. For
      more information, see           [Console
      docs](https://docs.syllable.ai/Resources/LanguageGroups).
  - name: organizations
    description: Operations related to organizations.
  - name: outbound.campaigns
    description: Operations related to outbound message campaigns
  - name: outbound.batches
    description: Operations related to outbound campaign batches
  - name: permissions
    description: >-
      Operations related to permissions. A permission is a specific          
      capability or access level granted to a user within the Syllable
      system.           Permissions are used to control access to various
      features and functionalities.
  - name: prompts
    description: >-
      Operations related to prompts. A prompt defines the behavior of
      an           agent by delivering instructions to the LLM about how the
      agent should behave.           A prompt can be linked to one or more
      agents. A prompt can also be linked to tools to           allow an agent
      using the prompt to use them. For more information, see           [Console
      docs](https://docs.syllable.ai/Resources/Prompts).
  - name: roles
    description: >-
      Operations related to roles. A role is a collection of
      permissions           that can be assigned to users to control their
      access to various features within the           Syllable system.
  - name: services
    description: >-
      Operations related to service configuration. A service is a collection
      of           tools. You can specify an authentication method and values on
      a service, and any linked           tools will use that auth information
      to generate headers for HTTP calls.
  - name: sessions
    description: >-
      Operations related to sessions. A session is a building block of
      a           conversation. For more information, see           [Console
      docs](https://docs.syllable.ai/workspaces/Sessions).
  - name: session_labels
    description: >-
      Operations related to labeling sessions with evaluations of quality
      and           descriptions of issues the user encountered or other
      details. For more information, see           [Console
      docs](https://docs.syllable.ai/workspaces/Sessions).
  - name: tools
    description: >-
      Operations related to tool configuration. A tool is a function that
      an           agent can call to perform actions like accessing databases,
      making API calls, or           processing data. For an agent to have
      access to a tool, the prompt associated with that           agent should
      be linked to the tool and include instructions to use it. For
      more           information, see [Console
      docs](https://docs.syllable.ai/Resources/Tools).
paths:
  /api/v1/experiments/{experiment_id}/start:
    post:
      tags:
        - experiments
      summary: Start Experiment
      description: >-
        Start an experiment. (Only an experiment in 'draft' status can be
        started.)
      operationId: experiments_start
      parameters:
        - name: experiment_id
          in: path
          required: true
          schema:
            type: integer
            title: Experiment Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExperimentStartResponse'
        '400':
          description: Bad Request
        '404':
          description: Not Found
        '409':
          description: Conflict
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
      x-codeSamples:
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { SyllableSDK } from "syllable-sdk";

            const syllableSDK = new SyllableSDK({
              apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
            });

            async function run() {
              const result = await syllableSDK.experiments.experimentsStart({
                experimentId: 381743,
              });

              console.log(result);
            }

            run();
        - lang: python
          label: Python (SDK)
          source: |-
            import os
            from syllable_sdk import SyllableSDK


            with SyllableSDK(
                api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
            ) as ss_client:

                res = ss_client.experiments.experiments_start(experiment_id=381743)

                # Handle response
                print(res)
components:
  schemas:
    ExperimentStartResponse:
      properties:
        experiment:
          $ref: '#/components/schemas/ExperimentResponse'
          description: The experiment, now running
        warnings:
          items:
            type: string
          type: array
          title: Warnings
          description: >-
            Things that weaken the result without invalidating it, such as a
            variant whose agent does not pin a prompt version, so that the
            prompt can be edited while the experiment runs
      type: object
      required:
        - experiment
      title: ExperimentStartResponse
      description: A started experiment.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ExperimentResponse:
      properties:
        id:
          type: integer
          title: Id
          description: The internal ID of the experiment
          examples:
            - 1
        name:
          type: string
          title: Name
          description: The name of the experiment
          examples:
            - Shorter greeting
        target_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Target Id
          description: >-
            The channel target being split, or null if that target has since
            been deleted. A running experiment always has one.
          examples:
            - 1
        variants:
          items:
            $ref: '#/components/schemas/DaoExperimentVariantDetail'
          type: array
          title: Variants
          description: The variants of the experiment, in a stable order
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The hypothesis under test
        status:
          $ref: '#/components/schemas/ExperimentStatus'
          description: draft, running, or stopped
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
          description: When the experiment started
        stopped_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Stopped At
          description: When the experiment stopped
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the experiment was created
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When the experiment was last written
        last_updated_by:
          type: string
          title: Last Updated By
          description: Who last wrote it
        target:
          anyOf:
            - $ref: '#/components/schemas/DaoExperimentTargetSummary'
            - type: 'null'
          description: >-
            The channel target being split, resolved for display. Null when the
            target has since been deleted, and when the read did not load it.
      type: object
      required:
        - id
        - name
        - target_id
        - variants
        - status
        - created_at
        - updated_at
        - last_updated_by
      title: ExperimentResponse
      description: >-
        Response model for experiment operations.


        An experiment splits the traffic of one channel target between two or
        more agents, so that the

        agents can be compared on the same population. One variant is the
        control the others are

        measured against. Each variant is a weighted pointer to the agent that
        variant runs; the weights

        are relative and not percentages.
    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
    DaoExperimentVariantDetail:
      properties:
        id:
          type: integer
          title: Id
          description: The internal ID of the variant
          examples:
            - 1
        name:
          type: string
          title: Name
          description: The name of the variant, which is the grouping key in reports
          examples:
            - b
        weight:
          type: integer
          title: Weight
          description: >-
            The relative weight of the variant, not a percentage. (E.g., if two
            variants both have a weight of 10, they are equally likely to be
            selected.)
          examples:
            - 10
        is_control:
          type: boolean
          title: Is Control
          description: >-
            Whether this is the reference variant the others are measured
            against
        agent_id:
          type: integer
          title: Agent Id
          description: The agent this variant runs
          examples:
            - 1
        agent_name:
          type: string
          title: Agent Name
          description: The name of that agent
          examples:
            - Front desk
      type: object
      required:
        - id
        - name
        - weight
        - is_control
        - agent_id
        - agent_name
      title: DaoExperimentVariantDetail
      description: A variant, with the name of the agent it runs resolved for display.
    ExperimentStatus:
      type: string
      enum:
        - draft
        - running
        - stopped
      title: ExperimentStatus
      description: >-
        Status of an experiment.


        The column is a varchar and not a database enum, so a new value here
        does not need a migration.
    DaoExperimentTargetSummary:
      properties:
        id:
          type: integer
          title: Id
          description: The internal ID of the channel target
          examples:
            - 1
        target:
          type: string
          title: Target
          description: The target itself, such as a phone number
          examples:
            - '+19995551234'
        target_mode:
          $ref: '#/components/schemas/TargetModes'
          description: The mode of the channel target
        channel_id:
          type: integer
          title: Channel Id
          description: The channel the target belongs to
          examples:
            - 1
        channel_name:
          type: string
          title: Channel Name
          description: The name of that channel
          examples:
            - Main line
      type: object
      required:
        - id
        - target
        - target_mode
        - channel_id
        - channel_name
      title: DaoExperimentTargetSummary
      description: >-
        The channel target an experiment splits, resolved for display.


        Enough to name the target on the experiment card without a second read:
        the Console shows the

        target itself and the channel it belongs to, and links to neither by ID.
    TargetModes:
      type: string
      enum:
        - voice
        - chat
        - sms
        - email
        - whatsapp
      title: TargetModes
      description: Available modes (communication methods) for channel targets.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Syllable-API-Key

````