> Source: https://wexa.ai/docs/tools/get-process-flow

# get-process-flow

Fetch a multi-agent process flow by id or name, including its agents and wiring.

## What it is called on each surface

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

| Surface | Name |
| --- | --- |
| Wexa MCP server | `get-process-flow` |
| REST API | `POST /v1/get-process-flow` |
| TypeScript SDK | `fabric.getProcessFlow()` |
| Python SDK | `fabric.get_process_flow()` |

## Arguments

Every argument is optional: `get-process-flow` answers a bare call.

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `flow_name` | string | Optional | Lookup by exact flow name when id is unknown. Names are not unique; if several flows share it the call fails and lists their ids — pass process_flow_id instead. |
| `process_flow_id` | string | Optional | Process flow id. |

`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](/docs/get-started/scope-and-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](/docs/tools/overview#return-shape).

A real response, captured from a live call to `get-process-flow`:

`agents` came back populated and is shown as `…` here, because the real value runs to
thousands of characters. Read it from your own call rather than from this page.

**Result of get-process-flow**

**REST API**

```json
{
  "lifecycle_id": "qlc_000179",
  "result": {
    "_id": "6ab1945e7566f41b5c28e308",
    "agents": "\u2026",
    "anomaly_detection": {
      "instructions": "",
      "is_enabled": false
    },
    "created_at": 1790022750.16452,
    "cron_details": {
      "agentflow_id": "",
      "collection_name": null,
      "count": null,
      "executed_by": null,
      "filters": null,
      "frequency": "",
      "goal": {
        "display_template": "",
        "template": ""
      },
      "limit": null,
      "projectID": "",
      "query": {},
      "query_limit": null
    },
    "default_goal": "",
    "description": "A stable process flow the documentation cites.",
    "failover_agentflow_ids": null,
    "image": "https://wexadevelopment.blob.core.windows.net/connectors/knowledge_base.jpeg",
    "initialAgent": "6ab1948bf90472594bd3e7d5",
    "isActive": true,
    "is_cron_scheduled": false,
    "is_deleted": false,
    "kind": "flow",
    "last_used": 1790022750.16453,
    "name": "docs-fixture-flow",
    "organization_id": "6a79a770b6c128ccc24bfca8",
    "projectID": "6aa9beb7ec8121a43b6c791b",
    "role": "tester",
    "type": "master",
    "unique_id": "1lk3gh5",
    "updated_at": 1790022795.122162
  }
}
```

**Wexa MCP server**

```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000179\",\"result\":{\"_id\":\"6ab1945e7566f41b5c28e308\",\"agents\":\"\\u2026\",\"anomaly_detection\":{\"instructions\":\"\",\"is_enabled\":false},\"created_at\":1790022750.16452,\"cron_details\":{\"agentflow_id\":\"\",\"collection_name\":null,\"count\":null,\"executed_by\":null,\"filters\":null,\"frequency\":\"\",\"goal\":{\"display_template\":\"\",\"template\":\"\"},\"limit\":null,\"projectID\":\"\",\"query\":{},\"query_limit\":null},\"default_goal\":\"\",\"description\":\"A stable process flow the documentation cites.\",\"failover_agentflow_ids\":null,\"image\":\"https://wexadevelopment.blob.core.windows.net/connectors/knowledge_base.jpeg\",\"initialAgent\":\"6ab1948bf90472594bd3e7d5\",\"isActive\":true,\"is_cron_scheduled\":false,\"is_deleted\":false,\"kind\":\"flow\",\"last_used\":1790022750.16453,\"name\":\"docs-fixture-flow\",\"organization_id\":\"6a79a770b6c128ccc24bfca8\",\"projectID\":\"6aa9beb7ec8121a43b6c791b\",\"role\":\"tester\",\"type\":\"master\",\"unique_id\":\"1lk3gh5\",\"updated_at\":1790022795.122162}}"
    }
  ],
  "isError": false
}
```

**TypeScript SDK**

```ts
// the object you get back IS the result — there is no `.result` to read
{
  _id: '6ab1945e7566f41b5c28e308',
  agents: '…',
  anomaly_detection: {
    instructions: '',
    is_enabled: false
  },
  created_at: 1790022750.16452,
  cron_details: {
    agentflow_id: '',
    collection_name: null,
    count: null,
    executed_by: null,
    filters: null,
    frequency: '',
    goal: {
      display_template: '',
      template: ''
    },
    limit: null,
    projectID: '',
    query: {},
    query_limit: null
  },
  default_goal: '',
  description: 'A stable process flow the documentation cites.',
  failover_agentflow_ids: null,
  image: 'https://wexadevelopment.blob.core.windows.net/connectors/knowledge_base.jpeg',
  initialAgent: '6ab1948bf90472594bd3e7d5',
  isActive: true,
  is_cron_scheduled: false,
  is_deleted: false,
  kind: 'flow',
  last_used: 1790022750.16453,
  name: 'docs-fixture-flow',
  organization_id: '6a79a770b6c128ccc24bfca8',
  projectID: '6aa9beb7ec8121a43b6c791b',
  role: 'tester',
  type: 'master',
  unique_id: '1lk3gh5',
  updated_at: 1790022795.122162
}

// The TS SDK names these camelCase — lifecycleId, traceId — where Python uses
// lifecycle_id and trace_id. Both are non-enumerable: readable, but omitted by
// Object.keys() and JSON.stringify(). `result.lifecycleId` here is undefined.
result.lifecycleId // 'qlc_000179'
```

**Python SDK**

```python
# a dict subclass; `result` is already unwrapped
{
 "_id": "6ab1945e7566f41b5c28e308",
 "agents": "\u2026",
 "anomaly_detection": {
  "instructions": "",
  "is_enabled": False
 },
 "created_at": 1790022750.16452,
 "cron_details": {
  "agentflow_id": "",
  "collection_name": None,
  "count": None,
  "executed_by": None,
  "filters": None,
  "frequency": "",
  "goal": {
   "display_template": "",
   "template": ""
  },
  "limit": None,
  "projectID": "",
  "query": {},
  "query_limit": None
 },
 "default_goal": "",
 "description": "A stable process flow the documentation cites.",
 "failover_agentflow_ids": None,
 "image": "https://wexadevelopment.blob.core.windows.net/connectors/knowledge_base.jpeg",
 "initialAgent": "6ab1948bf90472594bd3e7d5",
 "isActive": True,
 "is_cron_scheduled": False,
 "is_deleted": False,
 "kind": "flow",
 "last_used": 1790022750.16453,
 "name": "docs-fixture-flow",
 "organization_id": "6a79a770b6c128ccc24bfca8",
 "projectID": "6aa9beb7ec8121a43b6c791b",
 "role": "tester",
 "type": "master",
 "unique_id": "1lk3gh5",
 "updated_at": 1790022795.122162
}

out.lifecycle_id  # 'qlc_000179' — an attribute, not a key
```

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

## 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.

**Call get-process-flow**

**Wexa MCP server**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get-process-flow",
    "arguments": {
      "flow_name": "docs-fixture-flow"
    }
  }
}
```

**REST API**

```bash
curl -sS https://fabric.wexa.ai/v1/get-process-flow \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "content-type: application/json" \
  -d '{"flow_name":"docs-fixture-flow"}'
```

**TypeScript SDK**

```ts
import { Fabric } from '@wexa-fabric/sdk'

const fabric = new Fabric()
const { result } = await fabric.getProcessFlow({
  flow_name: "docs-fixture-flow"
})
```

**Python SDK**

```python
from wexa import Fabric

fabric = Fabric()
out = fabric.get_process_flow(flow_name="docs-fixture-flow")
```

## Errors

Both SDKs raise the same typed errors, chosen from the gateway's own error string first and its
HTTP status second. `get-process-flow` checks the `fabric:orchestrate.read` grant, and reaches the seven classes every
tool reaches — listed under [the common set](/docs/tools/errors#the-common-set). These are the ones specific to it:

| Error | Status | Raised when |
| --- | --- | --- |
| `NotFound` | 404 | Neither `process_flow_id` nor `flow_name` matches a process flow in this project. |
| `ConfigurationError` | 5xx | `get-process-flow` is not available to you. Retrying will not help. |

## Governance

Every call to `get-process-flow` 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-process-flow` 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](/docs/tools/overview), [errors](/docs/tools/errors),
and [which identifier goes where](/docs/tools/identifiers).
