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

# get-process-flow

Fetch a process flow by id or by exact name, including its agents and wiring. Needs the `fabric:orchestrate.read` grant.

**Read a process flow**

**Wexa MCP server**

```bash
curl -sS -X POST https://fabric.wexa.ai/mcp/$FABRIC_PROJECT_ID \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "Mcp-Session-Id: $MCP_SESSION_ID" \
  -H "content-type: application/json" -H "accept: application/json" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get-process-flow","arguments":{"flow_name":"docs-fixture-flow"}}}'
```

```json
{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000179\",\"result\":{\"_id\":\"6ab1945e7566f41b5c28e308\",\"name\":\"docs-fixture-flow\",\"description\":\"A stable process flow the documentation cites.\",\"initialAgent\":\"6ab1948bf90472594bd3e7d5\"}}"
    }
  ],
  "isError": false
}
```

**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"}'
```

```json
{
  "lifecycle_id": "qlc_000179",
  "result": {
    "_id": "6ab1945e7566f41b5c28e308",
    "name": "docs-fixture-flow",
    "description": "A stable process flow the documentation cites.",
    "initialAgent": "6ab1948bf90472594bd3e7d5"
  }
}
```

**TypeScript SDK**

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

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

```ts
// result is the payload itself, with no `.result` to read
{
  _id: '6ab1945e7566f41b5c28e308',
  name: 'docs-fixture-flow',
  description: 'A stable process flow the documentation cites.',
  initialAgent: '6ab1948bf90472594bd3e7d5'
}
```

**Python SDK**

```python
from wexa import Fabric

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

```python
# out is the result, already unwrapped
{
    "_id": "6ab1945e7566f41b5c28e308",
    "name": "docs-fixture-flow",
    "description": "A stable process flow the documentation cites.",
    "initialAgent": "6ab1948bf90472594bd3e7d5"
}
```

## Parameters

| Parameter | Type | Required | Notes |
| --- | --- | --- | --- |
| `flow_name` | string | Optional | Lookup by exact process flow name when the id is unknown. Names are not unique: if several process flows share it the call fails and lists their ids, and you pass `process_flow_id` instead. A name that matches no process flow in this project is refused. |
| `process_flow_id` | string | Optional | Process flow id. A process flow in this project. |

**Show full response**

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://files.example.com/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
  }
}
```

**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://files.example.com/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://files.example.com/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
```

**More details**

Every parameter is optional: `get-process-flow` answers a bare call. The result carries the process flow with its agents and wiring; `agents` is the populated list of the process flow's agents, and the full response shows it as `…` because the real value runs to thousands of characters.

To build one, see [`create-process-flow`](/docs/automation/create-process-flow); to change an agent in it, [`update-process-flow`](/docs/automation/update-process-flow).

Not marked consequential: it is audited lightly and the project's write gate never holds it.

Every tool call works the same way: [How every tool call works](/docs/sdks-and-apis/how-every-tool-call-works).
