On this page

get-execution

Poll a process flow execution. Returns conclusion (a human-readable Markdown summary — always prose, never parse it as JSON) and last_agent_output (the terminal agent's raw structured output -- whatever that step actually produced, under input_data/output_data). If that data is itself shaped like a Process Flow Manifest (flow/agents/wiring), it can be passed directly to create-process-flow's manifest argument to build a new process flow from it.

A run parked on an external agent node answers status "interop_pending" and carries waiting_on_external_agent — which node, which peer agent connection, and, when the external agent stopped to ask something, the question it asked and the shape it wants the answer in. That is how a run that is waiting is told apart from one that is merely slow, and from one that failed. In every other status the field is null. The question is answered in the console, on purpose: no surface answers it, because the answer is reviewed there first.

What it is called on each surface

The wire name is get-execution everywhere: it is what the Wexa MCP server advertises, the REST path is POST /v1/get-execution, and each SDK exposes it under its own language's naming convention.

SurfaceName
Wexa MCP serverget-execution
REST APIPOST /v1/get-execution
TypeScript SDKfabric.getExecution()
Python SDKfabric.get_execution()

Arguments

1 of the 1 argument is required. Omitting a required one is refused before the tool runs, at the validation stage, so it costs nothing and changes nothing.

ArgumentTypeRequiredNotes
execution_idstringRequiredExecution id returned by run-process-flow.

project_id, projectID, organization_id and executed_by are not arguments you pass: the platform binds all four from the credential you authenticated with, and both SDKs refuse them before the request leaves your process — see server-bound arguments.

What it returns

The three surfaces wrap this differently, and code written against one will not read another correctly — see return shape.

A real response, captured from a live call to get-execution:

{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000186\",\"result\":{\"agentflow_id\":\"6ab1945e7566f41b5c28e308\",\"conclusion\":null,\"execution_id\":\"d8b83fa9-afa7-4619-886f-55fafe5c9bc6\",\"files\":[],\"goal\":\"Reply OK.\",\"input_variables\":null,\"last_agent_output\":null,\"projectID\":\"6aa9beb7ec8121a43b6c791b\",\"start_from_agent_id\":null,\"status\":\"running\",\"task_id\":\"6ab196817566f41b5c28e31d\"}}"
    }
  ],
  "isError": false
}

Keeping the lifecycle_id is what lets you ask later why a call was allowed, refused or held.

A run waiting on an external agent

An external agent node hands its whole task to an agent on another platform. That agent can take hours, and it can stop to ask a question of its own. A run in that state answers status: "interop_pending" and carries waiting_on_external_agent, so you can tell a run that is waiting from one that is merely slow, and from one that failed.

FieldTypeNotes
agent_idstringThe external agent node the run is parked on. Empty when the external agent asked over MCP elicitation, which carries no node id.
registration_idstringThe peer agent connection the task was handed to — the same id list-peer-agents returns.
questionstring | nullWhat the external agent asked before it will continue. null means it is still working and nobody has to do anything.
question_schemaobject | nullThe shape the external agent wants its answer in, when it declared one. An A2A pause carries prose and no schema; an MCP elicitation carries both.
question_mechanismstring | nulla2a_pending or mcp_elicitation — which of the two ways it asked.

The field is null on every run that is not parked, including a finished run that was cancelled while a question was open.

A question is answered in the console and nowhere else. No surface gains a way to answer one: the answer is reviewed there first, helped by a context graph suggestion that is never sent for you. Nothing here returns that suggestion, nor the tokens the platform uses to resume the run.

A real response, captured from a live run parked on an external agent:

{
  "agentflow_id": "6ab36485f19beb4f0ed39e9a",
  "execution_id": "2b0cf9a7-9be7-4142-a578-8695372db913",
  "goal": "Settle the outstanding invoice for ACME-7.",
  "status": "interop_pending",
  "waiting_on_external_agent": {
    "agent_id": "",
    "question": "Which account should I settle, and who owns it?",
    "question_mechanism": "mcp_elicitation",
    "question_schema": {
      "description": "What the external agent needs before it can act.",
      "properties": {
        "account_code": {
          "description": "The customer's account code",
          "title": "Account Code",
          "type": "string"
        },
        "owner_email": {
          "description": "Who owns that account",
          "title": "Owner Email",
          "type": "string"
        }
      },
      "required": [
        "account_code",
        "owner_email"
      ],
      "title": "AccountAnswer",
      "type": "object"
    },
    "registration_id": "6ab36477825fc7bd72f3324b"
  }
}

Calling it

The same call on all four surfaces. Pick a tab once and every code block in the documentation follows it.

The ids in this example are real: they resolve against the project the documentation is written against, so the call runs as written once you point it at your own deployment. Swap them for the ids of your own objects.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get-execution",
    "arguments": {
      "execution_id": "d8b83fa9-afa7-4619-886f-55fafe5c9bc6"
    }
  }
}

Errors

Both SDKs raise the same typed errors, chosen from the gateway's own error string first and its HTTP status second. get-execution checks the fabric:orchestrate.read grant, and reaches the seven classes every tool reaches — listed under the common set. These are the ones specific to it:

ErrorStatusRaised when
NotFound404execution_id matches no execution in this project.
ConfigurationError5xxget-execution is not available to you. Retrying will not help.

Governance

Every call to get-execution runs through the same ten-stage lifecycle as every other Wexa tool: the credential is resolved to a scope, the fabric:orchestrate.read grant is checked, quota is drawn down, the arguments are validated, policy rules are evaluated, the call is executed, the result is shaped and redacted, and an audit record is written. The lifecycle_id in the response is the handle to that record.

get-execution only reads, so it is not marked consequential: it is audited lightly and is never held for approval. It still consumes quota and is still refused by policy like anything else.

See also

The tool index, errors, and which identifier goes where.