Launchpad by Pegasystems icon

Launchpad by Pegasystems

Consume Pega Launchpad API

Agent → Initiate Conversation

AI-generated

Summary

Starts a new conversation with a Pega Launchpad AI agent for a given case context by POSTing to the agent's conversations endpoint. It returns the API response, which the workflow can use to continue the conversation.

Inputs

  • authentication — Authentication method. Only OAuth2 is offered (uses the pegalaunchpadOAuth2Api credential).
  • baseUrl (required) — Base URL of the Pega Launchpad instance, without a trailing slash. A trailing slash is stripped if present. It is read once from the first item and applies to all items.
  • agentName (required) — Fully qualified agent name, e.g. TestApp__SummaryAgent. It is URL-encoded into the request path.
  • contextId (required) — Encoded context ID (typically of a case) that the conversation is tied to. It is sent as contextID in the request body.
  • additionalFields.executeStarterQuestion — Whether to execute the agent's starter question when the conversation starts. Defaults to false.

Output shape

One output item per input item. It contains the fields of the API response body, plus a responseHeaders object holding the response headers. The conversation ID, which is needed for Send Message and Get Final Response, is expected in the body. The source looks for fields such as conversationID or ID.

The exact body fields depend on the Pega API. A non-JSON string body is returned as rawBody. If Continue On Fail is enabled, a failed item yields an item with only an error message. Otherwise the node throws.

Examples

Example 1: Start a summary agent conversation for a case and run its starter question.

Base URL=https://mycompany.pegacloud.com, Agent Name=TestApp__SummaryAgent, Context ID=, Additional Fields: Execute Starter Question=true.

Example 2: Open a conversation, then send follow-up messages to it.

Run Initiate Conversation with the agent name and context ID. Pass the returned conversation ID to Agent > Send Message and Get Final Response.

Links

Discussion