Missions

Agent-driven promotion campaigns.

11 actions. Each is callable by the agent as a tool, over HTTP via /api/invoke, and (usually) from a UI page.

missions.list

GET

List missions, optionally filtered by status or subject. By default returns only live missions. Pass deleted: true to list soft-deleted (trashed) missions instead — use this to find a mission id to restore via missions.restore.

When the agent calls it: To recover a deleted mission: call missions.list with { deleted: true } to find it, then missions.restore with its id.

  • AI tool: missions_list
  • API: GET /api/invoke/missions.list

Input

Field Type Required Description
status "planning" | "needs-approval" | "active" | "paused" | "completed" | "archived"
subjectId string
deleted boolean
limit integer
offset integer
orderBy string
orderDir "asc" | "desc"
q string
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "planning",
        "needs-approval",
        "active",
        "paused",
        "completed",
        "archived"
      ]
    },
    "subjectId": {
      "type": "string",
      "minLength": 1
    },
    "deleted": {
      "type": "boolean"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "orderBy": {
      "type": "string"
    },
    "orderDir": {
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "q": {
      "type": "string"
    }
  }
}

missions.get

GET

Get one mission by id.

  • AI tool: missions_get
  • API: GET /api/invoke/missions.get

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

missions.create

POST · mutating

Create a promotion mission for a subject. The mission is the agent's unit of work — it has goals, a strategy, content pillars, and an autonomy level.

When the agent calls it: Only name, subjectId, and goalType are required. description, strategy, autonomy, platforms, and startDate are optional and default sensibly — omit them unless you have real values to set. goalType MUST be exactly one of: promote, grow, launch, monitor, support, crowdfunding. Pick the closest fit (research/monitoring/tracking → monitor, audience growth → grow, a launch → launch). Never pass a value outside this list. subjectId must be a real subject id — call subjects.search/subjects.list first, or subjects.create, and pass the id it returns. Do not guess or reuse the name as the id. Omit agentId to attribute the mission to the workspace default agent; never invent an actor id.

  • AI tool: missions_create
  • API: POST /api/invoke/missions.create

Input

Field Type Required Description
name string yes
slug union
description string
goalType "promote" | "grow" | "launch" | "monitor" | "support" | "crowdfunding" yes One of promote | grow | launch | monitor | support | crowdfunding. Pick the closest fit — research / monitoring / tracking → monitor, audience growth → grow, a product or campaign launch → launch. Never invent a value.
subjectId string yes
autonomy "supervised" | "semi-autonomous" | "fully-autonomous" One of supervised | semi-autonomous | fully-autonomous. Default supervised unless the user explicitly wants more autonomy.
agentId string Owning agent actor id. Omit to use the workspace default agent — never invent an id.
agentName string
platforms string[]
startDate any
endDate any
strategy object
successMetrics object[]
goalTarget object
rewardTiers object[]
limits object
deletedAt union
status "planning" | "needs-approval" | "active" | "paused" | "completed" | "archived"
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "slug": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "description": {
      "default": "",
      "type": "string"
    },
    "goalType": {
      "type": "string",
      "enum": [
        "promote",
        "grow",
        "launch",
        "monitor",
        "support",
        "crowdfunding"
      ],
      "description": "One of promote | grow | launch | monitor | support | crowdfunding. Pick the closest fit — research / monitoring / tracking → monitor, audience growth → grow, a product or campaign launch → launch. Never invent a value."
    },
    "subjectId": {
      "type": "string",
      "minLength": 1
    },
    "autonomy": {
      "default": "supervised",
      "description": "One of supervised | semi-autonomous | fully-autonomous. Default supervised unless the user explicitly wants more autonomy.",
      "type": "string",
      "enum": [
        "supervised",
        "semi-autonomous",
        "fully-autonomous"
      ]
    },
    "agentId": {
      "description": "Owning agent actor id. Omit to use the workspace default agent — never invent an id.",
      "type": "string",
      "minLength": 1
    },
    "agentName": {
      "type": "string"
    },
    "platforms": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "twitter",
          "instagram",
          "linkedin",
          "facebook",
          "tiktok",
          "youtube",
          "threads",
          "bluesky",
          "kickstarter",
          "indiegogo",
          "reddit",
          "hackernews",
          "producthunt",
          "patreon",
          "itch",
          "email"
        ]
      }
    },
    "startDate": {},
    "endDate": {},
    "strategy": {
      "default": {},
      "type": "object",
      "properties": {
        "tone": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "targetAudience": {
          "default": "",
          "type": "string"
        },
        "pillars": {
          "default": [],
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "weight": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "keyMessages": {
                "default": [],
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "platforms": {
                "default": [],
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "twitter",
                    "instagram",
                    "linkedin",
                    "facebook",
                    "tiktok",
                    "youtube",
                    "threads",
                    "bluesky",
                    "kickstarter",
                    "indiegogo",
                    "reddit",
                    "hackernews",
                    "producthunt",
                    "patreon",
                    "itch",
                    "email"
                  ]
                }
              },
              "contentTypes": {
                "default": [],
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "weight"
            ]
          }
        },
        "cadencePerWeek": {
          "default": 0,
          "type": "number"
        },
        "postingWindows": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "successMetrics": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "metric": {
            "type": "string"
          },
          "target": {
            "type": "number"
          },
          "current": {
            "default": 0,
            "type": "number"
          },
          "unit": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "metric",
          "target"
        ]
      }
    },
    "goalTarget": {
      "type": "object",
      "properties": {
        "amountUsd": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "backerCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "deadline": {},
        "platform": {
          "type": "string"
        },
        "current": {
          "type": "object",
          "properties": {
            "amountUsd": {
              "default": 0,
              "type": "number",
              "minimum": 0
            },
            "backerCount": {
              "default": 0,
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "lastUpdated": {}
          }
        },
        "extras": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        }
      }
    },
    "rewardTiers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string"
          },
          "priceCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "description": {
            "default": "",
            "type": "string"
          },
          "qtyLimit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "qtyClaimed": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "deliveryEta": {
            "type": "string"
          },
          "shippingFromCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "estimatedShippingCost": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "name",
          "priceCents"
        ]
      }
    },
    "limits": {
      "type": "object",
      "properties": {
        "maxPostsPerDay": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "maxRepliesPerDay": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "maxDailySpend": {
          "type": "number",
          "minimum": 0
        },
        "quietHours": {
          "type": "object",
          "properties": {
            "from": {
              "type": "string"
            },
            "to": {
              "type": "string"
            },
            "tz": {
              "type": "string"
            }
          },
          "required": [
            "from",
            "to"
          ]
        },
        "requireApprovalAbovePriority": {
          "type": "string",
          "enum": [
            "low",
            "normal",
            "high",
            "urgent"
          ]
        }
      }
    },
    "deletedAt": {
      "anyOf": [
        {},
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "default": "planning",
      "type": "string",
      "enum": [
        "planning",
        "needs-approval",
        "active",
        "paused",
        "completed",
        "archived"
      ]
    }
  },
  "required": [
    "name",
    "goalType",
    "subjectId"
  ]
}

missions.update

PATCH · mutating

Update a mission's fields (name, description, strategy, limits, etc.)

  • AI tool: missions_update
  • API: PATCH /api/invoke/missions.update

Input

Field Type Required Description
id string yes
patch object yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "patch": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "type": "string"
        },
        "goalType": {
          "type": "string",
          "enum": [
            "promote",
            "grow",
            "launch",
            "monitor",
            "support",
            "crowdfunding"
          ]
        },
        "subjectId": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "type": "string",
          "enum": [
            "planning",
            "needs-approval",
            "active",
            "paused",
            "completed",
            "archived"
          ]
        },
        "autonomy": {
          "type": "string",
          "enum": [
            "supervised",
            "semi-autonomous",
            "fully-autonomous"
          ]
        },
        "agentId": {
          "type": "string",
          "minLength": 1
        },
        "agentName": {
          "type": "string"
        },
        "platforms": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "twitter",
              "instagram",
              "linkedin",
              "facebook",
              "tiktok",
              "youtube",
              "threads",
              "bluesky",
              "kickstarter",
              "indiegogo",
              "reddit",
              "hackernews",
              "producthunt",
              "patreon",
              "itch",
              "email"
            ]
          }
        },
        "startDate": {},
        "endDate": {},
        "strategy": {
          "type": "object",
          "properties": {
            "tone": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "targetAudience": {
              "default": "",
              "type": "string"
            },
            "pillars": {
              "default": [],
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "weight": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "keyMessages": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "platforms": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "twitter",
                        "instagram",
                        "linkedin",
                        "facebook",
                        "tiktok",
                        "youtube",
                        "threads",
                        "bluesky",
                        "kickstarter",
                        "indiegogo",
                        "reddit",
                        "hackernews",
                        "producthunt",
                        "patreon",
                        "itch",
                        "email"
                      ]
                    }
                  },
                  "contentTypes": {
                    "default": [],
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "id",
                  "name",
                  "description",
                  "weight"
                ]
              }
            },
            "cadencePerWeek": {
              "default": 0,
              "type": "number"
            },
            "postingWindows": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "successMetrics": {
          "default": [],
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "metric": {
                "type": "string"
              },
              "target": {
                "type": "number"
              },
              "current": {
                "default": 0,
                "type": "number"
              },
              "unit": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "metric",
              "target"
            ]
          }
        },
        "goalTarget": {
          "type": "object",
          "properties": {
            "amountUsd": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "backerCount": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "deadline": {},
            "platform": {
              "type": "string"
            },
            "current": {
              "type": "object",
              "properties": {
                "amountUsd": {
                  "default": 0,
                  "type": "number",
                  "minimum": 0
                },
                "backerCount": {
                  "default": 0,
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "lastUpdated": {}
              }
            },
            "extras": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          }
        },
        "rewardTiers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string"
              },
              "priceCents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "description": {
                "default": "",
                "type": "string"
              },
              "qtyLimit": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "qtyClaimed": {
                "default": 0,
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "deliveryEta": {
                "type": "string"
              },
              "shippingFromCents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "estimatedShippingCost": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "id",
              "name",
              "priceCents"
            ]
          }
        },
        "limits": {
          "type": "object",
          "properties": {
            "maxPostsPerDay": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "maxRepliesPerDay": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "maxDailySpend": {
              "type": "number",
              "minimum": 0
            },
            "quietHours": {
              "type": "object",
              "properties": {
                "from": {
                  "type": "string"
                },
                "to": {
                  "type": "string"
                },
                "tz": {
                  "type": "string"
                }
              },
              "required": [
                "from",
                "to"
              ]
            },
            "requireApprovalAbovePriority": {
              "type": "string",
              "enum": [
                "low",
                "normal",
                "high",
                "urgent"
              ]
            }
          }
        },
        "lastAgentRunAt": {},
        "createdAt": {},
        "deletedAt": {
          "anyOf": [
            {},
            {
              "type": "null"
            }
          ]
        }
      }
    }
  },
  "required": [
    "id",
    "patch"
  ]
}

missions.ensure_project

POST · mutating

Idempotently ensure a mission has a linked project (1:1). Creates a campaign project if none exists, and adopts the mission's tickets that have no project yet into it, so mission content surfaces on the project boards. Returns the project.

  • AI tool: missions_ensure_project
  • API: POST /api/invoke/missions.ensure_project

Input

Field Type Required Description
missionId string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "missionId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "missionId"
  ]
}

missions.delete

DELETE · mutating

Soft-delete a mission. Sets deleted_at on the row; preserves all drafts, decisions, and engagements that reference it. Reversible via missions.restore.

When the agent calls it: Use this when the user wants to remove a mission from active lists. Always confirms first.

  • AI tool: missions_delete
  • API: DELETE /api/invoke/missions.delete

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

missions.restore

POST · mutating

Restore a soft-deleted (trashed) mission by clearing its deleted_at, returning it to active lists. Find trashed mission ids via missions.list with { deleted: true }.

When the agent calls it: Pairs with missions.list { deleted: true }, which lists what is in the Trash and the ids you can restore.

  • AI tool: missions_restore
  • API: POST /api/invoke/missions.restore

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

missions.set_autonomy

POST · mutating

Change a mission's autonomy band (supervised / semi-autonomous / fully-autonomous).

  • AI tool: missions_set_autonomy
  • API: POST /api/invoke/missions.set_autonomy

Input

Field Type Required Description
id string yes
autonomy "supervised" | "semi-autonomous" | "fully-autonomous" yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "autonomy": {
      "type": "string",
      "enum": [
        "supervised",
        "semi-autonomous",
        "fully-autonomous"
      ]
    }
  },
  "required": [
    "id",
    "autonomy"
  ]
}

missions.pause

POST · mutating

Pause an active mission. The agent stops new actions but state is preserved.

  • AI tool: missions_pause
  • API: POST /api/invoke/missions.pause

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

missions.resume

POST · mutating

Resume a paused mission.

  • AI tool: missions_resume
  • API: POST /api/invoke/missions.resume

Input

Field Type Required Description
id string yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "id"
  ]
}

missions.propose_strategy

POST · mutating

Have the agent draft a content strategy (pillars, tone, target audience, cadence) for a mission. Returns the proposal; humans can edit before saving.

  • AI tool: missions_propose_strategy
  • API: POST /api/invoke/missions.propose_strategy

Input

Field Type Required Description
id string yes
brief string
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "brief": {
      "type": "string"
    }
  },
  "required": [
    "id"
  ]
}