Ontology

Actions

Forms that edit an object and can start a Python pipeline, data job, visual pipeline or agent, with typed inputs and checks before you save.

An action is a form plus what happens when someone submits it. A person opens an object, picks an action, fills in the form and submits. The action edits properties of the object and can start a piece of work, such as a pipeline.

Actions are written under Graph › Meaning › Ontology. They appear as buttons on the object page, in the Objects space and in Turing.

The parts of an action

The action editor has these sections:

SectionWhat it holds
BasicsThe name, whether the action is on object types or interfaces, and whether it is Normal or Destructive.
Asks forThe form. A closed list of fields: people can send only what is listed.
Can run whenConditions on the object. The action is offered only when they hold.
ApprovalNone, runs at once, or A group must approve, with who approves and when the request expires.
Then it changesThe edits to the object's properties, each with a value from a form field, another property or a fixed value.
Then it startsOptional. One piece of work to start.

Conditions. A condition tests a property of the object: equals a value, is one of a list of values, or exists. All conditions must hold.

Approval. With approval on, the person who submits creates a request instead of changing anything. The action runs when someone in the chosen group approves. You can require that the approver is not the requester.

Destructive actions. Mark an action Destructive when it removes or overwrites something that is hard to undo.

Form fields

Each field in Asks for has a name, a type, a Required switch and optional limits.

TypeMeaningLimits
TextFree text.Shortest and longest length.
ChoiceOne value from a list you define.
NumberA number.Smallest and largest.
Whole numberAn integer.Smallest and largest.
DecimalAn exact decimal, sent as text. It is never turned into a floating-point number, so no digits are rounded. Up to 38 digits.Smallest and largest, as decimal text.
Yes or noA boolean.
DateA calendar date, YYYY-MM-DD.Earliest and latest date.
Date and timeA moment in time with a time zone, such as 2026-11-23T09:30:00+04:00. A value without a time zone is refused.Earliest and latest moment.
PersonA user.
List of textSeveral text values.Most items.
List of peopleSeveral users.Most items.

A Not available yet panel lists what the form cannot take: another object, a list of objects, and a file upload.

Decimal and date limits are inclusive. Conditions that compare decimals or moments compare their values, so 10.50 equals 10.5 and two spellings of the same instant are equal.

Starting work

Under Then it starts an action can start one of these:

  • Data job. A VegaFlow data job.
  • Python pipeline. A published Python pipeline. You pick the Project, Pipeline, Version and Environment. The action runs that version. A newer version is used only when you choose it.
  • Visual pipeline. A published, switched-on visual pipeline. The action uses the version that is published when someone submits it, and records that version in the receipt.
  • Agent. An active, published Vega agent. You write a prompt template, and the object is passed as context.

The work runs as the person who submits the action, after any approval. Their permission to run or use the target is checked when they submit, when it is approved and when the work starts. Nobody can use an action to run something they could not run themselves.

The action returns at once with the state RUNNING. It changes to SUCCEEDED or FAILED when the work finishes, with a link to the run. Any property edits in the action are saved first, then the work starts. The work's results reach objects through the normal paths: the output tables it writes, which your properties map to, or the agent's own actions.

Use its inputs

A Python pipeline declares what it needs as an input model, for example a Pydantic model:

class RefundInput(BaseModel):
    account_id: str
    amount: Decimal
    as_of: date
    reviewed_at: datetime | None = None
    note: str | None = None

Choose the pipeline, then press Use its inputs. The editor reads the model and offers to fill the form for you. It groups the fields:

  • Will be added to the form, and mapped.
  • Will be filled from the object. A property with the same name and a matching type is mapped without a form field.
  • Optional, left out unless ticked. Tick the ones you want on the form.
  • Already mapped, kept as they are.
  • Can't be filled by an action, left out.

Types carry over. A Decimal becomes a Decimal field, date becomes Date, datetime becomes Date and time, and limits such as a minimum or maximum come with it. Choices and lists of simple values carry over too. Nested objects and lists of objects cannot be mapped yet.

Mapping an input

Each pipeline input takes its value from one place:

  • a form field, so the person fills it in;
  • a property of the object, read when the action is submitted;
  • a fixed value you type once;
  • or nothing, when the input is optional.

Values from table columns are converted for the pipeline. A timestamp becomes an RFC 3339 text value when the pipeline asks for a date and time, and a decimal column becomes plain decimal text when the pipeline asks for a Decimal. A computed property that lists linked values can feed a list input.

An optional input left empty is not sent. The pipeline's own default applies. If a person explicitly sends null, the pipeline gets null.

Required forms need named fields

A pipeline that needs input must take a model with named fields. A pipeline with no inputs takes none. A pipeline whose input has no named fields cannot be started from a form that is required.

Checks before saving

The action editor checks the action while you edit, the same way it checks on save. Nothing is written by a check.

  • A problem stops the save. It points at the field or input that is wrong, for example a form field that is a Date feeding a Decimal input.
  • A warning lets you save. It says something may fail for some values, for example a form field with a wider range than the pipeline accepts, or an optional field feeding a required input.

Ranges are compared conservatively. If a form can never satisfy the pipeline (for example, the form allows 0 to 10 and the pipeline needs at least 20), that is a problem. If they overlap, it is a warning, and the real value is checked when someone submits.

Draft and newer-version notes

Under Then it starts you may see notes:

  • A newer version fits these inputs. A newer published version of the Python pipeline accepts what this action sends. Use it with one click, or leave the action on the version it has.
  • The newest version doesn't fit. The newer version changed its inputs. The action stays on the version it has.
  • The version this action runs was deleted. Pick another version. Until then the action cannot start its pipeline.
  • The draft would break this action. For a visual pipeline: its current draft, if published, would stop this action working. The action keeps working until the draft is published, and publishing is not blocked.

API example

The paths are under /api/v1/vegagraph/orgs/{org_id}/workspaces/{workspace_id}.

1. Ask for suggested inputs.

POST /vegagraph/actions:suggest-inputs
{
  "target": {
    "kind": "pipeline_asset",
    "id": "refund-pipeline",
    "version_id": "ver_8f2c",
    "environment_id": "env_prod"
  },
  "applies_to": { "object_types": ["account"] }
}

The response lists up to 128 fields:

{
  "fields": [
    {
      "key": "amount",
      "title": "Amount",
      "description": "",
      "kind": "decimal",
      "required": true,
      "nullable": false,
      "limits": { "minimum": "0.01", "maximum": "10000.00" },
      "parameter": { "type": "string", "format": "decimal", "title": "Amount" },
      "mapping": { "input": "amount" }
    },
    {
      "key": "as_of",
      "title": "As of",
      "description": "",
      "kind": "date",
      "required": true,
      "nullable": false,
      "limits": {},
      "parameter": { "type": "string", "format": "date", "title": "As of" },
      "mapping": { "input": "as_of" }
    },
    {
      "key": "note",
      "title": "Note",
      "description": "",
      "kind": "text",
      "required": false,
      "nullable": true,
      "limits": {},
      "parameter": { "type": "string", "title": "Note" },
      "mapping": { "input": "note" }
    }
  ]
}

A field the action cannot fill has a reason instead of a mapping. parameter is ready to paste into the action's input_schema.properties. Add the key to required when required is true.

2. Check the definition without saving it.

POST /vegagraph/actions:check

The body is the same action definition you would save. The response lists every problem and warning, each with the field_key and a pointer to the part of the definition that is wrong:

{
  "problems": [
    {
      "code": "action_work_mapping_invalid",
      "message": "missing required work parameter: as_of",
      "pointer": "/definition/edits/0/work/parameters/as_of",
      "field_key": "as_of"
    }
  ],
  "warnings": []
}

3. Save the action.

PUT /vegagraph/actions/refund_account
{
  "action_key": "refund_account",
  "display_name": "Refund account",
  "kind": "graph_edit",
  "enabled": true,
  "effects": "MAY_WRITE",
  "applies_to": { "object_types": ["account"] },
  "input_schema": {
    "type": "object",
    "required": ["amount", "as_of"],
    "properties": {
      "amount": {
        "type": "string",
        "format": "decimal",
        "title": "Amount",
        "x-vega-minimum": "0.01",
        "x-vega-maximum": "10000.00"
      },
      "as_of": { "type": "string", "format": "date", "title": "As of" },
      "note": { "type": "string", "title": "Note" }
    }
  },
  "submission": { "conditions": [] },
  "approval": { "mode": "none" },
  "edits": [
    {
      "op": "run_job",
      "work": {
        "target": {
          "kind": "pipeline_asset",
          "id": "refund-pipeline",
          "version_id": "ver_8f2c",
          "environment_id": "env_prod"
        },
        "parameters": {
          "account_id": { "property": "account_id" },
          "amount": { "input": "amount" },
          "as_of": { "input": "as_of" },
          "note": { "input": "note" }
        }
      }
    }
  ]
}

A save runs the same checks and returns the same problems with status 422. The saved action has a definition_version. To change an existing action, send its current version in an If-Match header (If-Match: "3"); if someone saved a newer version first, the save is refused and you reload before trying again.

4. Invoke it on an object.

POST /vegagraph/objects/account/A-1042/actions/refund_account/invocations
Idempotency-Key: 6c1b0f1e-0d7f-4d63-9a6a-2f0c7d4a9a11
{
  "definition_version": 3,
  "input": { "amount": "125.50", "as_of": "2026-11-20" }
}

The invocation returns with state RUNNING and a tracking URL. Poll it until it reports the run and its final state. Repeating the request with the same Idempotency-Key returns the same invocation instead of starting a second run.

Other action endpoints

OperationWhat it does
POST /vegagraph/actions:visual-impactCompares saved actions with a visual pipeline's current draft and lists the ones the draft would break.
POST /vegagraph/actions/{action_key}:check-newer-versionChecks a Python action against newer published versions. The status is current, newer_version_fits, newer_version_does_not_fit or pinned_version_missing.

None of these write anything.

Vegalake, VegaDB and VegaFlow are trademarks or registered trademarks of Vegalake Inc.

On this page