Skip to main content
POST
Create a new agent session

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
prompt
string
required
Minimum string length: 1
workspaceElementType
enum<string>
Available options:
customer,
app,
connector,
integration,
flow,
flow-instance,
flow-run,
action,
package,
action-instance,
connection,
field-mapping,
field-mapping-instance,
data-source,
data-source-instance,
data-link-table,
data-link-table-instance,
app-event-type,
app-event-subscription,
app-event-log-record,
app-data-schema,
app-data-schema-instance,
external-event-subscription,
external-event-log-record,
external-event-pull,
external-event-type,
screen,
action-run-log-record,
external-api-log-record,
incoming-webhook-log-record,
connected-product
workspaceElementId
string
Minimum string length: 1
testCustomerId
string
isExternal
boolean
modelId
enum<string>
Available options:
anthropic/claude-sonnet-4.6,
anthropic/claude-opus-4.6,
anthropic/claude-sonnet-4.5,
anthropic/claude-opus-4.5,
anthropic/claude-haiku-4.5,
openai/gpt-5.2,
openai/gpt-5-nano,
google/gemini-3-pro-preview,
moonshotai/kimi-k2.5
agentName
enum<string>
Available options:
membrane,
membrane-core,
self-integrating,
connection-building,
action-building,
universe
agentHarnessId
string
Minimum string length: 1
promptAttachments
object[]

Response

200 - application/json
id
string
required
workspaceId
string
required
type
string
required
status
enum<string>
required
Available options:
queued,
starting,
running,
completed,
failed,
cancelled
prompt
string
required
lastActivityAt
string<date-time>
required

Last meaningful session progress timestamp used for inactivity timeout checks.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
hasWorker
boolean
required
createdAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
updatedAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
userId
string
tenantId
string
orgWorkspaceId
string
workspaceElementType
enum<string>
Available options:
customer,
app,
connector,
integration,
flow,
flow-instance,
flow-run,
action,
package,
action-instance,
connection,
field-mapping,
field-mapping-instance,
data-source,
data-source-instance,
data-link-table,
data-link-table-instance,
app-event-type,
app-event-subscription,
app-event-log-record,
app-data-schema,
app-data-schema-instance,
external-event-subscription,
external-event-log-record,
external-event-pull,
external-event-type,
screen,
action-run-log-record,
external-api-log-record,
incoming-webhook-log-record,
connected-product
workspaceElementId
string
error
object
title
string
summary
string
cost
number
state
enum<string>
default:busy
Available options:
busy,
idle
isExternal
boolean
agentName
enum<string>
Available options:
membrane,
membrane-core,
self-integrating,
connection-building,
action-building,
universe
agentHarnessId
string
agentHarnessSnapshotId
string
output
object