Zum Inhalt
Für Agenten

agent_schedule_save

Create or Update Agent Schedule

Markdown Tools als JSON

Beschreibung

Create or update a routine with its own title and prompt. Runs use the selected agent. Activation requires an agent and an active trigger. Pass id to update.

Zugriff

Zugriffsprofil: gated. Module: none. Die Freigabe im Profil ersetzt keine Account-, Workspace- oder Rollenberechtigung.

Parameter

Name Typ Pflicht Beschreibung
account_id string Ja
id string Nein Routine prefix id (asch_…). Omit to create.
title string Nein
prompt string Nein Instructions sent to the agent on each run.
agent_id string Nein Agent prefix id. Required before activation.
status string Nein
concurrency string Nein
catch_up string Nein
catch_up_cap integer Nein

Eingabeschema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "account_id": {
      "type": "string"
    },
    "id": {
      "type": "string",
      "description": "Routine prefix id (asch_…). Omit to create."
    },
    "title": {
      "type": "string"
    },
    "prompt": {
      "type": "string",
      "description": "Instructions sent to the agent on each run."
    },
    "agent_id": {
      "type": "string",
      "description": "Agent prefix id. Required before activation."
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "active",
        "paused",
        "archived"
      ]
    },
    "concurrency": {
      "type": "string",
      "enum": [
        "coalesce",
        "always_enqueue",
        "skip_if_active"
      ]
    },
    "catch_up": {
      "type": "string",
      "enum": [
        "skip_missed",
        "enqueue_capped"
      ]
    },
    "catch_up_cap": {
      "type": "integer"
    }
  },
  "required": [
    "account_id"
  ],
  "type": "object"
}

Ausgabeschema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "agent_schedule": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "prompt": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": "string"
        },
        "concurrency": {
          "type": "string"
        },
        "catch_up": {
          "type": "string"
        },
        "catch_up_cap": {
          "type": "integer"
        },
        "agent_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "owner": {
          "type": [
            "object",
            "null"
          ]
        },
        "account_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "created_at": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "title",
        "prompt",
        "status",
        "account_id",
        "created_at"
      ]
    }
  },
  "required": [
    "agent_schedule"
  ],
  "type": "object"
}
Seiten