Pega Agent¶
The Pega Agent
is a third-party agent hosted on Pega platform, designed to intelligently analyze business workflows in real time and generate context-aware answers using enterprise knowledge to help streamline issue resolution. These agents operate using the A2A protocol
, allowing them to collaborate through both event-driven inbound triggers and proactive outbound actions.
Our AI Refinery SDK enables seamless integration with a customized Pega Agent
through the PegaAgent
class. This integration brings the full power of the Pega Agent
to applications, enhancing performance and capabilities on our AI Refinery platform.
Creating Pega Agents ¶
Users can customize a Pega Agent
through the Pega platform. To create an agent, follow these steps:
- Sign Up for an account on Pega platform.
- Create agents and obtain their corresponding identifiers (
client_id
andclient_secret
).
Onboarding Pega Agent¶
To use the Pega agent through our AI Refinery SDK, users need the following configuration parameters:
Variable | Description | Required |
---|---|---|
client_id |
Name of the environment variable containing the Pega Client ID. | Yes |
client_secret |
Name of the environment variable containing the Pega Client Secret. | Yes |
token_url |
The URL of the OAuth token endpoint provided to authenticate on Pega platform. | Yes |
base_url |
Unique URL used to identify and locate each of the Pega agents. | Yes |
wait_time |
Time (in seconds) to wait for a Pega API response. | No |
contexts |
Allows for the provision of additional information during communication with the Pega Agent . |
No |
Workflow Overview¶
The workflow of the PegaAgent
class consists of four key stages:
- Initialization: An agent is created on the Pega platform and registered in AI Refinery with the specified configuration.
- Sending a Query: A user query is forwarded from AI Refinery to the
Pega Agent
running on the Pega platform. - Pega-side Processing: The
Pega Agent
decides whether to use predefined tools, knowledge bases, or other resources, and processes the query. - Receiving and Parsing the Response: The
Pega Agent
returns the processed results to AI Refinery, where they are then parsed to extract the final answer.
Usage and Quickstart¶
To quickly establish an AI Refinery project with a PegaAgent
, users should start by creating a new agent on the Pega platform, as previously described. After the agent is ready, use the YAML configuration template provided below to incorporate it into the AI Refinery project.
Specifically, ensure the following configurations are included:
- Add a utility agent with
agent_class: PegaAgent
underutility_agents
. - Ensure the
agent_name
you chose for yourPegaAgent
is listed in theagent_list
underorchestrator
.
Template YAML Configuration of PegaAgent¶
orchestrator:
agent_list:
- agent_name: "Pega Resolution Agent"
utility_agents:
- agent_class: PegaAgent
agent_name: "Pega Resolution Agent"
agent_description: "A customized agent to analyze business exceptions and provide potential resolutions."
config:
client_id: "PEGA_CLIENT_ID" # Required: Environment variable to store Pega Client ID
client_secret: "PEGA_CLIENT_SECRET" # Required: Environment variable to store Pega Client Secret
token_url: <token-url> # Required: URL of the OAuth token endpoint for authentication
base_url: <agent-url> # Required: Unique URL to identify and locate each Pega agent
wait_time: 300 # Optional: Time in seconds to wait for agent response (default: 300)
contexts: # Optional additional agent contexts
- "date"
- "chat_history"