On this page

list-peer-agents

List the peer agent connections this project holds. A peer agent connection is the registered link to an external agent on another platform, one that a process flow can hand a whole goal to. Each entry carries its connection_id, its name, platform, protocol, endpoint and state, and what the external agent said it can do.

The connection_id is what an interop_agent node, the external agent node, in a process flow points at: it goes on the node as registration_id. Call this before you build one.

A stored credential is never returned, in any form, masked or otherwise. It is supplied once, to register-peer-agent, and no tool gives it back.

What it is called on each surface

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

SurfaceName
Wexa MCP serverlist-peer-agents
REST APIPOST /v1/list-peer-agents
TypeScript SDKfabric.listPeerAgents()
Python SDKfabric.list_peer_agents()

Arguments

list-peer-agents takes no arguments. Everything it needs — which organization and project you are asking about, and who you are — comes from the credential you authenticated with, so there is nothing left for the call itself to carry. Send an empty object.

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

connections holds one entry per connection, and count is how many there are. Each entry has these fields:

FieldWhat it is
connection_idThe id an interop_agent node takes as registration_id, and the id delete-peer-agent takes.
name, descriptionThe name given at registration, unique within the project, and its description.
platformThe label for which platform the external agent runs on, as given at registration.
protocol, endpointmcp or a2a, and the external agent's URL.
stateDraft when registered, Active once a call to the external agent has gone through.
external_agent_name, declared_capabilityThe name and the description the external agent gave for itself.
declared_abilitiesThe abilities the external agent listed for itself. Absent when it listed none.

The last three are what the external agent said about itself when it answered the handshake, and they are absent when it said nothing. declared_abilities are not skill ids: a skill is only ever what provisioning a connector mints, and an interop_agent node carries no skills.

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

An example of what list-peer-agents returns. Every field shown is one the tool really sets: the shape was checked against a live call to a running deployment. The ids, endpoints and names are illustrative, so swap them for your own.

{
  "content": [
    {
      "type": "text",
      "text": "{\"lifecycle_id\":\"qlc_000061\",\"result\":{\"connections\":[{\"connection_id\":\"6ab3e1c07f2d9a4b1c5e8d20\",\"name\":\"invoice-reconciler\",\"description\":\"Reconciles supplier invoices on the finance platform.\",\"platform\":\"finance-platform\",\"protocol\":\"a2a\",\"endpoint\":\"https://agents.example.com/a2a/invoice-reconciler\",\"state\":\"Active\",\"external_agent_name\":\"Invoice Reconciler\",\"declared_capability\":\"Matches supplier invoices against purchase orders and flags mismatches.\",\"declared_abilities\":[\"match-invoice\",\"flag-mismatch\"]}],\"count\":1}}"
    }
  ],
  "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.

A value in angle brackets is one only you can supply, and the platform refuses a literal <...>.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list-peer-agents",
    "arguments": {}
  }
}

Errors

Both SDKs raise the same typed errors, chosen from the gateway's own error string first and its HTTP status second. list-peer-agents 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
ConfigurationError5xxlist-peer-agents is not available to you. Retrying will not help.

Governance

Every call to list-peer-agents runs through the same ten-stage lifecycle as every other 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.

list-peer-agents 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

handshake-peer-agent to test an endpoint, register-peer-agent, delete-peer-agent, create-process-flow for the external agent node, the tool index, errors, and which identifier goes where.