Entity Helpers

Cross-entity search and update routers.

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

entity.search

POST

Universal search across the canonical entities. Routes to subjects.search / subjects.list / missions.list / projects.list / tickets.list / workflows.list / engagements.list / mission_personas.list based on kind. Use this when you need to find something but don't want to remember which specific list/search action to call.

When the agent calls it: Default search entry. Examples: kind="subject" + q="juke" → subject hits; kind="ticket" + missionId=X + status="open" → open work for that mission; kind="persona" + missionId=X → personas attached to the mission; kind="event" + q="funding" → recent funding events.

  • AI tool: entity_search
  • API: POST /api/invoke/entity.search

Input

Field Type Required Description
kind "subject" | "mission" | "project" | "ticket" | "engagement" | "workflow" | "persona" | "browser_session" | "connection" | "event" yes
q string
missionId string
subjectId string
projectId string
platform string
status string
limit integer
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "subject",
        "mission",
        "project",
        "ticket",
        "engagement",
        "workflow",
        "persona",
        "browser_session",
        "connection",
        "event"
      ]
    },
    "q": {
      "type": "string"
    },
    "missionId": {
      "type": "string",
      "minLength": 1
    },
    "subjectId": {
      "type": "string",
      "minLength": 1
    },
    "projectId": {
      "type": "string",
      "minLength": 1
    },
    "platform": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200
    }
  },
  "required": [
    "kind"
  ]
}

entity.update

POST · mutating

Universal patch — routes to the right update handler based on kind. The patch shape is whatever the underlying handler accepts (free-form jsonb).

When the agent calls it: Use for routine patches (rename a subject, change a mission's autonomy, update a persona's weight). For complex multi-field changes use the atomic .update tool of the entity, which has typed input validation.

  • AI tool: entity_update
  • API: POST /api/invoke/entity.update

Input

Field Type Required Description
kind "subject" | "mission" | "ticket" | "workflow" | "persona" | "instruction" | "rule" | "project" yes
id string yes
patch object yes
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "subject",
        "mission",
        "ticket",
        "workflow",
        "persona",
        "instruction",
        "rule",
        "project"
      ]
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "patch": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "kind",
    "id",
    "patch"
  ]
}