System

Generate a scheduled task spec from a prompt.

Uses an LLM with guided JSON to generate a scheduled task configuration from a natural language description. The returned spec can be used directly with the create_scheduled_task RPC.

post/scheduled_tasks/generate_spec

Request

Request body

promptstring required

Natural language description of the desired scheduled task.

llmstring

Optional LLM model override for generation.

timezonestring

Optional IANA timezone string (e.g. "America/New_York") used to compute today's local date for relative schedule expressions. Defaults to UTC.

use_agentboolean

When true, signals to the LLM that the user has agent mode enabled in their chat so it should prefer task_type=agent_task unless the prompt clearly describes a plain chat-completion task. Does not force the generated task_type.

Response

Generated scheduled task configuration.

taskobject

The generated scheduled task spec.

passedboolean

Whether the user prompt was minimally sufficient to create the task. Callers MUST NOT create the task when passed is false; only show response to the user.

dialog'none' | 'text' | 'ui'

Confirmation strategy the caller should use before creating the task.

  • "none": user gave everything needed; create directly and show response.
  • "text": confirm in chat with the user before creating (caller waits for a yes/no reply).
  • "ui": open the full schedule-task dialog pre-filled from the spec for the user to review/edit. Always "text" when passed=false. response is suitable for any of the three modes.
responsestring

When passed=false, a clarifying question describing what info is missing. When passed=true, a human-language message — a one-line confirmation when dialog=none, a yes/no ask when dialog=text, a "review the form" message when dialog=ui. May include the literal tokens {artifact_url} and {artifact_name} which the caller substitutes after creation.

llm_usedstring

The actual model that generated the spec.

Changes

No recorded changes to this operation across all 1 revision of this API.