Skip to main content
Version: 1.12.x (Next)

A2A Agent

tip

As of Langflow 1.11.x, A2A support is off by default. To enable it, set the following environment variable before starting Langflow:

LANGFLOW_A2A_ENABLED=true

LANGFLOW_A2A_ENABLED enables Langflow's A2A server endpoints. Set it when you publish Langflow flows as A2A agents, or when you use Internal mode to call those published flows. You do not need it to call a remote agent in External mode.

The A2A Agent component calls an Agent2Agent (A2A) agent and returns its reply.

Use Internal mode to call published A2A agent flows within the same Langflow project, or use External mode to call a remote A2A agent by its published URL.

For more information on publishing a Langflow flow, see Publish a flow as an A2A agent.

Use Internal mode in a flow

  1. Add an A2A Agent component to your flow.
  2. In the A2A Agent component, set Mode to Internal.
  3. In Agent, select a published A2A agent flow within your Langflow project. The flow must have Chat Input and Chat Output components. For more information, see Publish a flow as an A2A agent.
  4. Connect a Chat Input component to the A2A Agent component's Message input.
  5. Connect the Response output to the next component in your flow, such as a Chat Output component.

Use External mode in a flow

  1. Add an A2A Agent component to your flow.
  2. In the A2A Agent component, set Mode to External.
  3. Enter the remote agent's base URL in the Agent URL field. Alternatively, enter the agent's /.well-known/agent-card.json card URL in the Agent URL field. Both options resolve the same agent. When the URL returns a card, the component displays a read-only Agent card preview.
  4. Optional: If the remote agent requires x-api-key authentication, enter the API key in the API Key field, or use a global variable.
  5. Connect a Chat Input component to the A2A Agent component's Message input.
  6. Connect the Response output to the next component in your flow, such as a Chat Output component.

Local and private agent URLs

Langflow enables SSRF protection by default. Loopback and private addresses such as localhost, 127.0.0.1, and ::1 are blocked unless you allow them.

If the remote agent URL points at a local or private host, such as another Langflow instance on http://localhost:7862, set LANGFLOW_SSRF_ALLOWED_HOSTS on the Langflow instance that runs the A2A Agent component. The allowlist takes hostnames and not full URLs. For example:

export LANGFLOW_SSRF_ALLOWED_HOSTS=localhost,127.0.0.1

Restart Langflow after changing the variable.

For more information, see SSRF protection.

A2A Agent parameters

NameTypeDescription
modeTabInput parameter. Internal calls another agent flow in this project. External calls a remote A2A agent by URL. Default: External.
agent_name_selectedDropdownInput parameter. Internal mode only. An agent flow in this project (one with Chat Input and Chat Output components).
agent_urlStringInput parameter. External mode only. The remote A2A agent's base URL or /.well-known/agent-card.json card URL.
agent_cardData displayInput parameter. External mode only. Read-only preview of the remote agent's advertised card. Appears when the URL returns a card.
input_valueStringInput parameter. The message to send to the agent. Supports Tool Mode.
api_keySecret stringInput parameter. External mode only. Optional API key sent as x-api-key for agents that require it.
timeoutIntegerInput parameter. External mode only. Maximum seconds to wait for the agent's reply. Default: 60.
responseMessageOutput parameter. The agent's reply text.

See also

Was this page helpful?

Support
Search