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

# Run all agents in a space

> Starts every agent in the specified Space. Each agent is started independently;
per-agent failures (for example, an agent that already has a Run in progress) are
reported in the results without affecting the other agents.

Optional `proxyPoolId`, `logLevel`, and `logMode` fields in the request body are applied
to every run that is started. All runs execute in the caller's organization.
`serverOrganizationId` is not accepted on this endpoint.

**Encrypted input parameters**

Prefix a parameter name with `?` to have its value encrypted at rest and hidden in
the Run log — for example `"?apiKey"` instead of `"apiKey"`. The name you send decides
this. Sending a name without the `?` prefix stores and logs the value in clear text,
**even when the Agent defines that parameter as encrypted**. Omitting a parameter
entirely leaves the Agent's own definition in effect, encryption included.

If you send both `"name"` and `"?name"`, the `?`-prefixed entry is used and the plain
one is discarded. The request still succeeds.

Call `GET /api/v1/agent/{agentId}/input-parameters` for any Agent in the Space to see
which parameters it defines as encrypted.



## OpenAPI

````yaml POST /api/v1/spaces/{spaceId}/run-all
openapi: 3.0.1
info:
  title: Sequentum Cloud API
  description: API endpoints for Sequentum Cloud
  version: v1
servers: []
security:
  - ApiKey: []
    Bearer: []
paths:
  /api/v1/spaces/{spaceId}/run-all:
    post:
      tags:
        - ApiSpace
      summary: Run all agents in a space
      description: >-
        Starts every agent in the specified Space. Each agent is started
        independently;

        per-agent failures (for example, an agent that already has a Run in
        progress) are

        reported in the results without affecting the other agents.


        Optional `proxyPoolId`, `logLevel`, and `logMode` fields in the request
        body are applied

        to every run that is started. All runs execute in the caller's
        organization.

        `serverOrganizationId` is not accepted on this endpoint.


        **Encrypted input parameters**


        Prefix a parameter name with `?` to have its value encrypted at rest and
        hidden in

        the Run log — for example `"?apiKey"` instead of `"apiKey"`. The name
        you send decides

        this. Sending a name without the `?` prefix stores and logs the value in
        clear text,

        **even when the Agent defines that parameter as encrypted**. Omitting a
        parameter

        entirely leaves the Agent's own definition in effect, encryption
        included.


        If you send both `"name"` and `"?name"`, the `?`-prefixed entry is used
        and the plain

        one is discarded. The request still succeeds.


        Call `GET /api/v1/agent/{agentId}/input-parameters` for any Agent in the
        Space to see

        which parameters it defines as encrypted.
      parameters:
        - name: spaceId
          in: path
          description: The ID of the space
          required: true
          schema:
            type: integer
            format: int32
      requestBody:
        description: Optional run parameters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunSpaceAgentsRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/RunSpaceAgentsRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/RunSpaceAgentsRequest'
      responses:
        '200':
          description: Returns the results of starting each agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunSpaceAgentsResultApiModel'
        '401':
          description: If the API key is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: If the space is not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    RunSpaceAgentsRequest:
      type: object
      properties:
        inputParameters:
          type: string
          description: Optional JSON string of input parameters to pass to all agents
          nullable: true
        parallelism:
          type: integer
          description: 'Parallelism level for each agent run (default: 1)'
          format: int32
          nullable: true
        isExclusive:
          type: boolean
          description: Whether to run exclusively
        proxyPoolId:
          type: integer
          description: >-
            Optional proxy pool ID to route agent traffic through. Values of 0
            or less are treated as unset.
          format: int32
          nullable: true
        logLevel:
          $ref: '#/components/schemas/LogLevel'
        logMode:
          $ref: '#/components/schemas/LogMode'
      additionalProperties: false
      description: Request model for running all agents in a space
    RunSpaceAgentsResultApiModel:
      type: object
      properties:
        spaceId:
          type: integer
          format: int32
        spaceName:
          type: string
          nullable: true
        totalAgents:
          type: integer
          format: int32
        agentsStarted:
          type: integer
          format: int32
        agentsFailed:
          type: integer
          format: int32
        results:
          type: array
          items:
            $ref: '#/components/schemas/AgentRunResultApiModel'
          nullable: true
      additionalProperties: false
      description: Result of running all agents in a space
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    LogLevel:
      enum:
        - Fatal
        - Error
        - Warning
        - Info
      type: string
      description: '`0` = `Fatal`; `1` = `Error`; `2` = `Warning`; `3` = `Info`'
    LogMode:
      enum:
        - Text
        - TextAndHtml
      type: string
      description: '`0` = `Text`; `1` = `TextAndHtml`'
    AgentRunResultApiModel:
      type: object
      properties:
        agentId:
          type: integer
          format: int32
        agentName:
          type: string
          nullable: true
        success:
          type: boolean
        runId:
          type: integer
          format: int64
          nullable: true
        errorMessage:
          type: string
          nullable: true
      additionalProperties: false
      description: Individual agent run result
  securitySchemes:
    ApiKey:
      type: apiKey
      description: >-
        API Key authorization header. Example: "Authorization: ApiKey
        {your-api-key}"
      name: Authorization
      in: header
    Bearer:
      type: http
      description: 'OAuth 2.0 Bearer token. Example: "Authorization: Bearer {access-token}"'
      scheme: bearer
      bearerFormat: JWT

````