Sessions

Create a session

Changed on

Creates a new session with the specified configuration. This feature is enabled for selected organizations only.

post/api/v0/sessions

Request

  • Base URL: https://api.factory.ai
  • URL: https://api.factory.ai/api/v0/sessions
  • Auth: HTTP bearer

Request body

computerIdstring required

Computer ID to connect

cwdstring

Working directory for the session on the computer.

Response

Response for status 201

sessionIdstring required

Session ID

parent_session_idstring

Immediate parent session ID for a Task subagent, if one exists

titlestring

Session title

status'idle' | 'pending' | 'running' required

Current session execution status

messageCountinteger required

Number of messages in session

createdAtinteger required

Creation timestamp (Unix ms)

updatedAtinteger required

Last update timestamp (Unix ms)

completedAtinteger

Completion timestamp (Unix ms)

computerIdstring

Connected computer ID

factoryCreditsnumber

Total Factory credits consumed by the session and its subagents

Changes

    • breaking

      removed the enum value direct_and_script of the request property /

    • info

      removed the direct_and_script enum value from the / response property for the response status

    • warning

      added the new link enum value to the // response property for the response status

    • warning

      added the new user_message enum value to the // response property for the response status

    • warning

      added the new web enum value to the // response property for the response status