Перейти к содержимому
LegalStack

Задания агента

Инструменты раздела «Задания агента»: 6

Раздел доступен только агентам внутри платформы.

Удаление задания

delete_scheduled_task · необратимое действие · только для агентов платформы

Описание для модели: Delete a scheduled task with its run history.

Параметры

ПараметрТипОбязательныйОписание
taskstringдаId or exact name of the task. Длина: 1–200.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "task": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Id or exact name of the task"
    }
  },
  "required": [
    "task"
  ],
  "additionalProperties": false
}

Задания по расписанию

list_scheduled_tasks · только чтение · только для агентов платформы

Описание для модели: Scheduled tasks of the user with their nearest runs. Use it before changing, pausing or removing a task and whenever the user asks about their tasks. upcoming lists the nearest runs; waiting_for_start means the task starts on starts_on; running means a run is in progress right now; finished means the task has no runs left.

Параметры

Параметров нет.

JSON Schema параметров
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

История запусков задания

list_task_runs · только чтение · только для агентов платформы

Описание для модели: Recent runs of a scheduled task and their delivery. Use it whenever the user asks why a result of a task did or did not arrive. result sent means the result went to the channels of the task; nothing_to_report means the run answered [SILENT] and nothing was sent, so read the prompt of the task for the reason; failed means the run failed; stopped means the run was stopped before it finished. trigger says how the run started: schedule, manual (on request), catchup (a missed run after the quota returned) or webhook (an external system). delivered_at is when the platform handed the result to the channels.

Параметры

ПараметрТипОбязательныйОписание
taskstringдаId or exact name of the task. Длина: 1–200.
limitintegerнетMaximum number of items to return, 5 by default. По умолчанию: 5. Диапазон: 1–20.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "task": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Id or exact name of the task"
    },
    "limit": {
      "default": 5,
      "description": "Maximum number of items to return, 5 by default",
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    }
  },
  "required": [
    "task"
  ],
  "additionalProperties": false
}

Запуск задания

run_scheduled_task · изменяет данные · только для агентов платформы

Описание для модели: Run a scheduled task right now. Starts one run immediately; the schedule of the task and its count of runs do not change. A task that is running right now or has finished cannot be started.

Параметры

ПараметрТипОбязательныйОписание
taskstringдаId or exact name of the task. Длина: 1–200.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "task": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Id or exact name of the task"
    }
  },
  "required": [
    "task"
  ],
  "additionalProperties": false
}

Задание по расписанию

save_scheduled_task · изменяет данные · только для агентов платформы

Описание для модели: Create or change a scheduled task in one step. The only way to create or change a scheduled task. The prompt says what to do on every run and holds no dates or conditions about when to run: the platform starts the task on starts_on, ends it on ends_on or after repeat runs. To change a task pass task and every field again, read them with list_scheduled_tasks first. After saving, name the first runs to the user exactly as upcoming says, with the weekday and the date.

Параметры

ПараметрТипОбязательныйОписание
taskstringнетId or exact name of the task to change; omit to create a task. Длина: 1–200.
namestringдаShort name of the task for the user. Длина: 1–200.
promptstringдаWhat to do on every run. Длина: 1–5000.
schedulestringдаCron "minute hour day month weekday" in the time zone of the team, e.g. "0 10 * * 3" every Wednesday at 10:00; "every 2h" for an interval; "2026-10-14T10:00" for a single run. Длина: 1–200.
starts_onstringнетFirst day or moment the task may run; omit to start now, "YYYY-MM-DD" or "YYYY-MM-DDTHH:MM" in the time zone of the team.
ends_onstringнетLast day the task may run, a date includes the whole day; omit for no end, "YYYY-MM-DD" or "YYYY-MM-DDTHH:MM" in the time zone of the team.
repeatintegerнетRuns after which the task ends; omit for no limit. Диапазон: 1–1000.
channelsмассив stringнетWhere results go: chat is the conversation of the task, telegram the linked Telegram, email the email of the user; an empty list keeps results only in the history; omit to send them to the conversation where the task was made. Элементов: до 3.
overlapstringнетWhen the previous run is still going at the next scheduled time: skip the run (default), queue it right after the current one, or replace: stop the current run and start the new one; omit to keep the current setting. Значения: skip, queue, replace.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "task": {
      "description": "Id or exact name of the task to change; omit to create a task",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Short name of the task for the user"
    },
    "prompt": {
      "type": "string",
      "minLength": 1,
      "maxLength": 5000,
      "description": "What to do on every run"
    },
    "schedule": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Cron \"minute hour day month weekday\" in the time zone of the team, e.g. \"0 10 * * 3\" every Wednesday at 10:00; \"every 2h\" for an interval; \"2026-10-14T10:00\" for a single run"
    },
    "starts_on": {
      "description": "First day or moment the task may run; omit to start now, \"YYYY-MM-DD\" or \"YYYY-MM-DDTHH:MM\" in the time zone of the team",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2})?$"
    },
    "ends_on": {
      "description": "Last day the task may run, a date includes the whole day; omit for no end, \"YYYY-MM-DD\" or \"YYYY-MM-DDTHH:MM\" in the time zone of the team",
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2})?$"
    },
    "repeat": {
      "description": "Runs after which the task ends; omit for no limit",
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    },
    "channels": {
      "description": "Where results go: chat is the conversation of the task, telegram the linked Telegram, email the email of the user; an empty list keeps results only in the history; omit to send them to the conversation where the task was made",
      "maxItems": 3,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "chat",
          "telegram",
          "email"
        ]
      }
    },
    "overlap": {
      "description": "When the previous run is still going at the next scheduled time: skip the run (default), queue it right after the current one, or replace: stop the current run and start the new one; omit to keep the current setting",
      "type": "string",
      "enum": [
        "skip",
        "queue",
        "replace"
      ]
    }
  },
  "required": [
    "name",
    "prompt",
    "schedule"
  ],
  "additionalProperties": false
}

Пауза задания

set_scheduled_task_state · изменяет данные · только для агентов платформы

Описание для модели: Pause or resume a scheduled task. paused stops the runs until the task is active again. A task waiting for its start date stays waiting when made active. A task stopped by an administrator or by the agent work limit is resumed only by them.

Параметры

ПараметрТипОбязательныйОписание
taskstringдаId or exact name of the task. Длина: 1–200.
statestringдаpaused stops the runs, active resumes them. Значения: paused, active.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "task": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Id or exact name of the task"
    },
    "state": {
      "type": "string",
      "enum": [
        "paused",
        "active"
      ],
      "description": "paused stops the runs, active resumes them"
    }
  },
  "required": [
    "task",
    "state"
  ],
  "additionalProperties": false
}

На этой странице