On this page

create-process-flow

Create a multi-agent process flow. Two modes: (1) shell-only -- pass just name/description/role to create an empty flow you'll add agents to later, one at a time, via update-process-flow; (2) full manifest -- pass a manifest (Process Flow Manifest v1.0: flow, agents[] of skilled_agent/decider_agent nodes, wiring) to provision the flow + all agents + wiring in ONE call. Prefer the manifest form whenever you already know the complete structure -- e.g. after reasoning about what the request needs, or after running a compiler-style flow and reading its raw JSON via get-execution's last_agent_output (never its conclusion, which is always prose). Use mode="upsert" to update an existing flow by name instead of erroring on a duplicate. If any agent needs a skill (connector action), call list-skills first to find its real id -- this tool never creates skills, only references existing ones. See docs {topic:'orchestrate'} for the full manifest contract and a worked example.

What it is called on each surface

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

SurfaceName
Wexa MCP servercreate-process-flow
REST APIPOST /v1/create-process-flow
TypeScript SDKfabric.createProcessFlow()
Python SDKfabric.create_process_flow()

Arguments

None of the 7 arguments is declared required: the gateway's schema for this tool has no required set, so nothing is refused at the validation stage. A call passing only name and description is accepted and creates a bare flow. Supply a manifest instead when you want the agents and their wiring created in the same call.

ArgumentTypeRequiredNotes
descriptionstringOptionalOptional.
flow_namestringOptionalOnly used together with manifest. Optional override for manifest.flow.name.
kb_tagsarrayOptionalOnly used together with manifest. Sets manifest.knowledge_base.tags and its ingest entries, and REPLACES (never merges with) the context of every agent with has_knowledge_base true. Required when the manifest leaves knowledge_base.tags empty and an ingest entry has no tags of its own. Each entry must be a tag token (e.g. "b2b_saas_icp"), never a sentence: retrieval matches tags by exact string, so a prose context is refused.
manifestobjectOptionalThe declarative form: agents and wiring in one payload. Supply this, or name for a bare flow — the gateway declares neither required, and a call carrying only name and description is accepted.
modeone of 3OptionalOnly used together with manifest. create (default) always creates a new flow — names are NOT unique, so a retried create leaves a duplicate. create_if_absent returns the existing flow untouched if the name is taken, so it is safe to repeat. upsert updates the flow with this name, replacing its agents. Both name-based modes fail with 409 if several flows share the name. One of: create, create_if_absent, upsert.
namestringOptionalNames the flow when you are not supplying a manifest. Names are not unique.
rolestringOptionalOptional.

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.

The three node types

Every entry in manifest.agents[] is one node in the process flow. type picks which kind, and it defaults to skilled_agent when you leave it out. There are three, and no others: an unknown type is refused with a message naming all three.

typeWhat the node doesYou must setRefused on this type
skilled_agentRuns the task itself, inside Wexa, using the skills you give it. The default.skills — or make it conversational: role: "conversational" with has_knowledge_base: true and a non-empty contextregistration_id
decider_agentBranches. It picks one route and the flow carries on down it.conditions, at least 2, one per branch; next_agents maps each decision to another agent's refregistration_id, is_terminal_agent, is_user_specific_task
interop_agentThe external agent node. Hands the whole task to an agent on another platform and waits for it.registration_id — a peer agent connection from list-peer-agentsskills, is_preview_mode_enabled, conditions, is_terminal_agent, is_user_specific_task

A skilled agent with no skills is refused, because the executor cannot run it. The refusal says so and offers the conversational form as the alternative — context is an ARRAY of tag tokens like ["b2b_saas_icp"], never a sentence.

Settings every node type takes

FieldTypeLeave it out and…
titlestringRequired. It is how the node is named everywhere a person looks.
role, role_descriptionstringEmpty.
promptobject{"template": "..."} is the task. display_template is derived from template when you omit it.
llmobjectmodel is an id from list-models settable; omitted, the agent is stored with your organization's default registry model, or the first registry model when none is marked default. max_tokens 4000; temperature 0.
has_knowledge_base + contextboolean + arrayOff. context holds tag tokens, matched against document tags by exact string.
context_accessobjectFull access. Send {"mode": "off"} to withhold the context graph, or "brief_only" for the project brief alone. mode is required whenever you send the object at all.
agent_base_promptstringThe platform default reasoning prompt.
context_required + context_target_agent_idsboolean + arrayOff. When on, name the earlier agents by their ref.

Settings only a skilled agent takes

FieldTypeLeave it out and…
is_preview_mode_enabledbooleanAutomatic approval. true pauses the node for a person to approve.
is_terminal_agentbooleanOff. Marks the node as the end of the flow. It is recorded and read back, but nothing in the run engine acts on it yet.
is_user_specific_taskbooleanOff. true runs the task once per active user rather than once for the whole flow.

An external agent node, end to end

Register the external agent first, then point a node at the connection it returns:

conn = fabric.register_peer_agent(
    name="invoice-reconciler",
    endpoint="https://agents.example.com/a2a/invoice-reconciler",
    protocol="a2a",                 # or "mcp"
    secret="<the external agent's token>",
)

fabric.create_process_flow(manifest={
    "manifest_version": "1.0",
    "flow": {"name": "Invoice reconciliation", "role": "conversational"},
    "agents": [{
        "ref": "reconcile",
        "type": "interop_agent",
        "title": "Reconcile with the finance platform",
        "prompt": {"template": "Reconcile the outstanding supplier invoices."},
        "registration_id": conn["connection_id"],
        "next": None,
    }],
    "wiring": {"initial_agent": "reconcile"},
})

The node carries no skills and no approval step: the external agent brings its own abilities and runs the goal on its own platform. has_knowledge_base and context_access still work, and mean something narrower here — what Wexa knows is gathered once and bundled into the goal handed over, never live access back into your project. Poll the run with get-execution: a node like this can stay open for a long time, and it can stop to ask a question.

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 create-process-flow:

{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000209\",\"result\":{\"flow\":{\"_id\":\"6ab196817566f41b5c28e33a\",\"agents\":[],\"anomaly_detection\":{\"instructions\":\"\",\"is_enabled\":false},\"created_at\":1790023297.679563,\"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\":\"Created to capture delete-process-flow, then deleted.\",\"failover_agentflow_ids\":null,\"image\":\"https://wexadevelopment.blob.core.windows.net/connectors/knowledge_base.jpeg\",\"isActive\":true,\"is_cron_scheduled\":false,\"is_deleted\":false,\"kind\":\"flow\",\"last_used\":1790023297.679572,\"name\":\"docs-fixture-scratch-flow-1790023297678\",\"organization_id\":\"6a79a770b6c128ccc24bfca8\",\"projectID\":\"6aa9beb7ec8121a43b6c791b\",\"role\":\" \",\"type\":\"master\",\"unique_id\":\"1cuikfo\",\"updated_at\":1790023297.679571},\"process_flow_id\":\"6ab196817566f41b5c28e33a\"}}"
    }
  ],
  "isError": false
}

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.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create-process-flow",
    "arguments": {
      "name": "orders-triage", "description": "Triage incoming orders."
    }
  }
}

Errors

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

ErrorStatusRaised when
ApprovalRequired202A policy held this call for a person to approve. The error carries the approval id; see below.
ConfigurationError5xxcreate-process-flow is not available to you. Retrying will not help.

Governance

Every call to create-process-flow runs through the same ten-stage lifecycle as every other Wexa tool: the credential is resolved to a scope, the fabric:orchestrate.write 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.

create-process-flow is marked consequential, which means it changes something rather than only reading. Two things follow. It is audited in full rather than lightly, and a policy rule may hold it for human approval — in which case the call returns 202 and an ApprovalRequired error carrying the approval id, and the SDKs can wait for the decision and resume rather than making you call again.

See also

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