Architecture of Pricefx Copilot

This page outlines the architecture of the Pricefx Copilot. The architecture consists of the following layers:

Copilot_Architecture_Schema_updated.png

Frontend

The frontend integrates a chat interface for users to send textual messages to the Assistant. It provides the Assistant with the content of the current Dashboard and the name of the Portlet from where the chat is open.

Backend

The backend is responsible for:

  • Acting as a proxy between the frontend and the Assistant, managing Assistant sessions, and converting Assistant responses into a displayable format (e.g., ResultMatrix).

  • Providing the REST API by delegating the user's JWT to the Assistant.

  • Providing dedicated Groovy logic for execution on demand by the Assistant.

  • Manages Assistant sessions, stores Copilot session history in the Core database. Session state is preserved across Assistant restarts for a limited time.

Assistant

The Assistant, a Python application relying on the LLM, is in charge of answering user messages. It interprets messages, makes decisions, and generates responses. It utilizes the REST API from the backend to interact with the partition for:

  • Retrieving data (e.g., accessing Datamarts and Data Sources).

  • Updating data (e.g., Pricing Parameters).

  • Executing Groovy logic for advanced data manipulation (e.g., Action creation).

The Assistant also analyzes data from the current Dashboard, using data sent by the frontend alongside the Portlet. For security, untrusted Python code execution is performed in separate jobs.

LLM

The LLM processes textual messages and provides answers. It is stateless and requires the assistant to provide all needed information and context in every message.

MCP Server

The Pricefx MCP Server is the Model Context Protocol endpoint that enables LLM-based agents to interact with Pricefx through standardized prompts, resources, and tools, providing a consistent way for agents to obtain dynamic information and perform actions across systems.