Agent tools

workflow

workflow({ action, id?, definition?, input?, run?, step?, data? })

The account's workflows: build one, run it, follow it, approve a human step. Reading is free; everything that changes or starts something is asked, even in auto.

read, or storage12 actionsread the docs first
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

The actions

Free (read)Asked (storage)
list · get · runs · run_statuscreate · update · delete
test_step — before saving a chainrun · resume · retry · cancel

It is told to read the docs first

iagenify_docs { topic: "workflows" } before writing a definition — step ids, the template syntax and what each step type outputs are in it. A definition invented from memory fails validation.

A definition travels as JSON text

workflow({
  action: "create",
  definition: '{"name":"Triage","trigger":{"type":"manual"},"steps":[{"id":"draft","type":"model.generate","config":{…}}]}',
})
# The Python workflow tool lists, reads and runs; creating one is done from your code
workflow = api.workflows.create({
    "name": "Triage",
    "trigger": {"type": "manual"},
    "steps": [{"id": "draft", "type": "model.generate", "config": {}}],
})
# The model then calls: workflow {"action": "run", "workflow_id": workflow.id}

A run keeps going after the answer

run_status is how it follows one

Starting a run returns its id and the run continues on its own. The agent checks back with run_status rather than waiting — a run that outlives the conversation is the point of a workflow.

A human step is yours to approve

resume approves a waiting step, and the tool's description says plainly that the user decides, not the agent — ask them first.

test_step before saving

Runs one step alone. Cheaper than deploying a chain to find out that the third step was wrong.