POST
/
{resourceSlug}
/
forms
/
task
/
add

Path Parameters

resourceSlug
string
required

The resourceSlug is a url parameter of the teamId associated with the user. Anywhere the resourceSlug is used can be interpreted as a teamId

Body

task.json

Represents a task within the system, including its configuration, expected output, and optional form fields.

name
string
required

The name of the task.

description
string
required

A detailed description of the task.

_id

Unique identifier for the task.

orgId

Identifier of the organization to which the task belongs.

teamId

Identifier of the team to which the task belongs.

agentId

Identifier of the agent associated with the task.

expectedOutput
string

The expected output of the task.

toolIds
string[]

List of tool identifiers associated with the task.

asyncExecution
boolean

Indicates if the task is executed asynchronously.

context
string[]

Contextual information related to the task.

outputJson
object

The JSON output of the task.

outputPydantic
object

The Pydantic output of the task.

outputFile
string

The file output of the task.

icon
object

Icon associated with the task, either an attachment or an object containing the icon details.

requiresHumanInput
boolean

Indicates if the task requires human input.

displayOnlyFinalOutput
boolean

Indicates if only the final output should be displayed.

hidden
boolean

Indicates if the task is hidden from standard views.

formFields
object[]

Array of form field configurations associated with the task.

isStructuredOutput
boolean

Indicates if the output of the task is structured.

Response

302 - dynamicResponse

Server response after successsfully adding a new object

_id
string

The unique Mongo id of the newly inserted object.

redirect
string

a string containing the redirect link to get all objects after a successful insertion.