Blog Post

Azure Database for PostgreSQL Blog
14 MIN READ

New Azure PostgreSQL Solution Accelerator: AgenticShop

JaredMeade's avatar
JaredMeade
Icon for Microsoft rankMicrosoft
Aug 25, 2025

Imagining A Multi Agent AI User Experience Powered by Azure PostgreSQL

Authors: Jared Meade, Senior PM; Jonathon Frost, ​​Principal PM.

Today’s new AI-driven platforms are radically boosting productivity and delivering engaging experiences for both development teams and for consumer audiences.  As the tech landscape continues to evolve, AI-based, “agentic” designs are introducing novel and exciting new opportunities to re-imagine applications as orchestrations of autonomous AI agents.  These remarkable new approaches are emerging as game-changers for both creators and users.  

On the engineering side, intelligent agents act like superpowered team members: they can analyze data, make decisions, and perform tasks at lightning speed with minimal human intervention.  These innovations allow developers and project teams to offload mundane or complex processes to AI, and this newfound freedom unlocks opportunities to work smarter, faster, and more efficiently on what really matters most.  AI agents also streamline workflows and enhance productivity by being “always-on” and proactive, translating to less time spent on manual operations or crunching repetitive and time-intensive tasks.   

At the same time, agentic AI is revolutionizing the consumer experience.  For users, autonomous AI agents serve as ultra-savvy personal assistants that can anticipate individual needs and provide highly personalized, context-aware assistance.  Instead of a one-size-fits-all interface, customers experience bespoke interactions tailored to their preferences and behavior. 

This kind of elevated, seamless journey is possible with agentic AI.  AI agents maintain continuous context of the customer (across browsing sessions or channels) and can help them find the perfect product or item for their needs.  They don’t just wait for the customer to type keywords; they can proactively offer relevant suggestions and answer complex questions on the fly.  The end user experience becomes more engaging and enjoyable, like working with your own personal companion rather than using a traditional search box.  Companies are finding that this leads to happier customers, more sales, and unlocking new avenues essential to staying competitive in the coming years.

 

 

Microsoft has created an open-source solution accelerator sample playground to introduce and demonstrate how multi-agent AI can reshape the user experience, and we’ve made this available for you to explore.  All the code and sample datasets are available in this GitHub repository.  Inside, you will discover how a team of AI agents (planning, product search, personalization, etc.) collaborate with cloud native services to deliver a next-generation user experience.

In this accompanying article, we’ll dive into AgenticShop’s features (like multi-agent workflows and personalization), the technical details under the hood, and the benefits it unlocks (from improved user experience to increased developer productivity).  By exploring this example, you’ll see exactly how agentic design can elevate project development and amaze consumers, and why embracing AI agents might just be the key to your organization’s next breakthrough launch.

What is AgenticShop?

AgenticShop is an open-source solution accelerator that showcases a modern user experience driven by AI agents and a robust Azure Postgres cloud database backend.   AgenticShop provides developers with a blueprint for building intelligent, multi-agent systems on Azure.  It leverages Azure Database for PostgreSQL Flexible Server as its data backbone and integrates advanced AI capabilities (via Azure OpenAI) to deliver a highly personalized and conversational platform.  Although this solution accelerator is showcasing a retail example, this technology suite can be equally applied to other industry verticals or use cases. By the end of this article, you should understand what AgenticShop is, how it works, and why it’s valuable for building your own next-generation agentic applications built upon Azure Database for PostgreSQL and Azure AI Foundry.

Introduction to AgenticShop

 

AgenticShop illustrates the concept of agentic commerce, where AI “agents” autonomously assist users in finding and selecting products.  At its core, AgenticShop uses a multi-agent AI workflow to handle complex user queries.  Underlying components integrate with a Postgres database (Azure Database for PostgreSQL Flex Server) to store your product catalog and user data, enabling the AI to ground its responses in accurate, up-to-date information.  

Key characteristics of the AgenticShop Solution Accelerator include:

  • Multi-agent architecture: Instead of a single monolithic AI, AgenticShop employs multiple specialized agents (for planning, product reviews analysis, product personalization, UI presentation customization, etc.) that are all collaborating to fulfill the user’s request.  This mimics a team-of-experts approach, with the ability to handle complex or multi-step queries to answer questions, recommend products, and provide detailed information.

  • One-click deployment: The entire solution can be deployed with minimal effort using Azure’s Developer CLI (AZD).  This means developers can quickly spin up the demo environment (database, AI services, and frontend) with a single command, accelerating experimentation and testing.

  • Modular service-based architecture: AgenticShop has been designed following modern architecture best practices, with separate front-end and back-end services, and integrated end-to-end observability.  The solution additionally incorporates containerization features to ensure consistency and streamline future extensibility.

Key Features of AgenticShop

AgenticShop is packed with features that demonstrate the power of combining AI agents with a robust backend. The Solution Accelerator provides the following feature demos:

  • Personalized Product Details Based on User Profile: The system tailors its responses to each user.  For example, if the user’s profile indicates a preference for certain brands or past purchases, the AI agents adjust recommendations accordingly.  This personalization is driven by the “Product Personalization Agent” plus data in the PostgreSQL database (user history, preferences) which the agent invoking tailored queries and filters to prioritize products, making the user experience highly relevant to the individual.
  • Elevated User Experience: AgenticShop delivers an “elevated” user experience through natural language interaction and rich responses.  Instead of clicking through menus and filters, users can simply ask in plain English for what they want: “Find me smartwatches with accurate heart rate monitoring”, for instance, and receive a curated answer.
  • Multi-Agent Workflows for Multiple Tasks: Under the hood, AgenticShop uses multiple AI agents working in concert to handle user requests.  Each agent has a specialized role, and together they form a pipeline that can tackle complex queries.  In one example, a typical workflow might involve:
    • A Planning Agent that parses the user’s query and decides which tasks need to be done (e.g., search for products, personalize results, fetch reviews).
    • An Inventory Agent that executes a database search on Azure PostgreSQL to check the product availability of certain products and models (leveraging SQL and vector similarity queries for semantic matching).
    • A Product Personalization Agent that adjusts the results based on the user’s profile (e.g., favoring brands the user likes).
    • A Review/Summary Agent that might summarize product reviews or technical specs (possibly using additional data).
    • A Presentation Agent that compiles the information from the other agents and customizes the UI of the product page for the user.  These agents communicate and pass data among themselves, orchestrated by the system so that the user’s request is fulfilled seamlessly.

The multi-agent design allows parallel handling of tasks and modularity, which leads to faster and more relevant results.

 

 

  • Debug Panel with Arize Phoenix (AI Tracing): For developers and AI engineers, AgenticShop includes a built-in debugging and monitoring panel powered by Arize Phoenix.  Arize Phoenix is an observability tool for AI agents/LLMs which helps track each step the agents take, what prompts were sent, and how the models responded.  In AgenticShop, this manifests as a “trace view” where you can see the chain of agent invocations and intermediate results.  This feature is extremely useful for understanding the behavior of the AI (especially when it makes an unexpected decision) and for performance tuning.  Developers can see, for example, that the Planning Agent decided to call the Inventory Agent and the Review Agent, and inspect the queries and outputs of each.  This level of transparency makes it easier to debug multi-agent workflows and ensure the AI is doing what it’s supposed to do.

The key takeaway is that the use of specialized agents and tools provides flexibility and extensibility.  Developers can easily add new agents (for new functionalities) or adjust existing ones without rewriting the entire system.   The resulting experience isn’t just a list of products; it’s enriched with explanations, comparisons, or even follow-up questions, much like a product expert would offer.  This conversational, intuitive interface lowers the barrier for users to find what they need.

AgenticShop Reference Cases

AgenticShop is designed as a reference implementation that can be valuable to various professionals in tech.  Let’s discuss how different roles can utilize and benefit from AgenticShop, with practical examples and use cases relevant to each.

How DB developers utilize it: AgenticShop provides an example of how to integrate advanced AI with a relational database.  As a database developer, you can study how the solution uses Azure Database for PostgreSQL as the single source of truth for product and user data, while still enabling semantic searches and AI queries.  The schema (see the repository’s ERD diagram) includes tables for products (with attributes like category, specs, price, etc.) and user profiles.  A DB developer can understand how to structure data for AI consumption, such as ensuring there are fields that store embeddings for product descriptions, enabling similarity search via the pgvector extension.

Practical example: If your organization manages a product catalog, you can use AgenticShop as a template for adding AI-driven search on top of it.  The solution creates vector embeddings of product text (e.g., descriptions or specs) and stores them in a Postgres table (using pgvector extension).  When a user asks for “cameras with 4K output”, rather than execute a simple SQL LIKE query, the Inventory Agent instead performs a nearest-neighbor search in this vector space to find the most relevant items.  As a DB developer, you can replicate this by using the same methods: enabling pgvector in your database and using AI-generated embeddings to represent text data.  AgenticShop’s code shows how the queries are constructed and optimized, serving as a learning tool for writing efficient SQL that cooperates with AI.

Key takeaways for DB Devs:
  • Data preparation: How to prepare and store data for AI consumption.  For example, AgenticShop demonstrates storing product info in normal form but augmenting it with a vector index for semantic search.
  • Using PostgreSQL extensions: It uses pgvector (an extension for vector similarity search in Postgres) to enable AI-friendly queries.  This way, the AI agents can ask the database questions like “find similar products” by vector comparison, all within SQL.
  • Performance considerations: You’ll see how a cloud Postgres (Flexible Server) performs under AI query workloads.  As more agents query the DB in parallel, you might consider typical DB tuning: indexing (both B-tree for categorical filters and vector indexes for embeddings), query plan caching, and perhaps use of read replicas for scale.  The solution’s use of DiskANN (a high-performance approximate nearest neighbor algorithm) for vector search suggests that the system is tuned for quick responses even with many items.  
For AI/ML Developers

How AI developers utilize it: For AI and machine learning developers, AgenticShop is a playground for advanced LLM orchestration techniques.  It implements an agent-based reasoning approach, which is more complex than a single prompt/response model.  AI developers can examine how the system uses a large language model (like GPT-4) not just to answer questions, but to reason about tasks and invoke tools (like database queries) along the way.  The use of LlamaIndex is particularly relevant, as this library connects LLMs with external data and can manage workflows of tools/agents.  The AI dev can see how LlamaIndex’s capabilities are leveraged: for example, constructing indices over the product data, then using an agent that can query that index when needed.

Key takeaways for AI/ML devs:
  • Multi-agent orchestration: AgenticShop shows one way to implement the “planner-executor” pattern of multi-agent systems.  You’ll see how the agents are defined and how they communicate.  For example, the Planner might invoke the Inventory agent by passing it a specific query (like an SQL or a product search query).  The code then uses LlamaIndex workflows to manage this chain that feeds outputs of one agent as input to the next.  This example can guide you in structuring your own multi-agent flows for different use cases (not just shopping – the pattern could extend to customer support bots, AI coders, etc.).
  • Model and embedding usage: AgenticShop requires access to Azure OpenAI models, specifically GPT-4 (referred to as “gpt-4o” in deployment configs) and an embedding model like text-embedding-ada-002.  AI developers will appreciate the reasoning behind these choices: GPT-4 is used for its advanced reasoning and fluency (needed for the Planner and Presenter agents), while Ada embeddings are used for vector similarity due to cost and speed efficiency.  The separation of duties between models ensures performance and accuracy – a crucial design point in AI systems.  You can use this knowledge to plan your own systems (e.g., use a smaller model for simple classification or retrieval tasks, and a heavier model for final output or complex reasoning).
  • Tracing and evaluation: With Arize Phoenix integrated, AI devs can analyze the behavior of the multi-agent system quantitatively.  They can replay a query and see where the AI might have taken a suboptimal step.  For example, if the Planner agent made a wrong call (I thought I needed a Review Agent, but actually no reviews were available), the developer can adjust the prompt or logic.  This kind of AI chain-of-thought debugging is an emerging skill and having a ready environment to practice it is invaluable.  AgenticShop essentially provides a sandbox to observe multi-turn, multi-agent reasoning in action and refine it.

Technical Details and Architecture

Let’s now delve into the technical underpinnings of AgenticShop, covering the solution architecture and important implementation details.

Architecture Overview: The AgenticShop architecture can be visualized as a multi-tier system:

  • Frontend: A web application (written in TypeScript/React) that provides the user interface for the user experience. This is where the user interacts (asks questions, views product results).  The frontend communicates with the backend via API calls.  

  • Backend API: A Python-based service (using FastAPI) that receives requests from the frontend. This service orchestrates the various AI agents.  It has endpoints such as “POST /query” which takes the user’s query and executes the agent workflow.  The backend is also responsible for connecting to the PostgreSQL database and pulling in data when agents require it.

  • AI Agents & Orchestration Layer: This is the core intelligence.  AgenticShop uses the LlamaIndex library to manage agents and tools.  LlamaIndex provides a framework where you define “tools” (like a SQL query tool) and the LLM can plan a sequence of tool uses to answer a question.  The underlying LLM calls are made to Azure OpenAI Service (which hosts models like GPT-4).  The orchestration layer includes:
    • Prompts and logic for the Planning Agent (to decide what to do).
    • Handlers for each sub-agent (some call the database, some call an LLM to summarize text).
    • A memory or context manager to retain conversation state (so agents know what happened previously).
    • Integration with Arize Phoenix for logging each step of the agent’s reasoning.

  • Database (Azure Database for PostgreSQL): The persistent data store holding the application’s data.  This includes product information (name, category, specs, price, stock, etc.), user profile data, and transaction history or wish list data.  The database is enhanced with the pgvector extension, enabling vector similarity search on product text embeddings.  It also contains precomputed embeddings for product descriptions computed using OpenAI’s embedding model.

  • Vector Index / Knowledge Base: LlamaIndex analyzes ingested product descriptions and customer reviews into an index structure.

  • Azure OpenAI Service: This cloud service provides the GPT-4 model for agent reasoning and dialog generation and Ada embedding model for converting text to vectors.  The backend calls the OpenAI endpoints when the agents need to generate text or compare semantic similarity.  The GPT-4 model is the powerhouse behind the conversation and planning, while the embedding model allows the system to vectorize queries or texts to perform similarity search in the database.

Technology Stack Summary

Below is a summary of the main components and technologies used in AgenticShop:

Component

Technology / Service

Description and Role

Frontend Web App

React (TypeScript) + HTML/CSS

User interface for the application, with chat/search capability and results display. Runs in browser, deployed via Azure Container App.

Backend API Service

Python (FastAPI)

Orchestrates AI agents, handles HTTP requests from frontend, communicates with DB and OpenAI. Deployed in Azure Container App.

Database

Azure Database for PostgreSQL (Flexible Server) with pgvector, azure_ai, pg_diskann, and Apache AGE extensions.

Stores products, reviews, user profiles, embeddings, and conversation memory. pgvector enables vector similarity search, azure_ai provides in-database AI capabilities, pg_diskann optimizes vector search performance, and Apache AGE enables graph-based relationship queries.

AI Orchestration

LlamaIndex library

Manages the agent workflow: defines tools, agents, and sequences. LlamaIndex connects the LLM with the Postgres data.

Memory Management

mem0

Persistent user preference storage across sessions. Stores conversation history and user preferences in PostgreSQL (`mem0_chatstore` table). Enables agents to remember past interactions and personalize responses.

Large Language Model

Azure OpenAI Service – GPT-4 model

The brain of the agents (especially the Planner and Presenter).  Provides natural language understanding and generation.  Hosted by Azure OpenAI, called via REST API.

Embeddings Model

Azure OpenAI Service – text-embedding-ada-002

Converts text to vectors for semantic search.  Used to embed product info and user queries.

Vector Search Algorithm

DiskANN (integrated via pgvector index)

Ensures efficient nearest-neighbor search on high-dimensional embeddings.  Improves performance for finding similar items in the database.

Agent Debug/Monitoring

Arize Phoenix (ML observability tool)

Tracks and visualizes agent interactions and LLM calls.  Helps developers debug the agent chain and analyze model performance.

Deployment & DevOps

Azure Developer CLI (azd), Bicep templates

Infrastructure as code for provisioning all components.  Enables one-command deployment and tear-down.

Next Steps

AgenticShop demonstrates the art of the possible when autonomous AI agents meet a robust database-backed application.  We’ve introduced what AgenticShop is: a solution accelerator that fuses Azure PostgreSQL with multi-agent AI to deliver a next-gen user experience, and broken down its key features like personalized recommendations, multi-agent orchestration, and debugging capabilities.

We explored how different specialists (from database gurus to AI experts) can leverage this project: whether it’s learning how to do vector searches in SQL, how to orchestrate GPT-4 with tools, or how to deploy such a stack on Azure seamlessly.

From a technical standpoint, AgenticShop’s architecture is elegant.  It shows that you can keep your critical data in a reliable SQL database, enhance it with vector indexing and AI embeddings, and layer intelligent agents on top to transform the way users interact with that data.  The use of Azure OpenAI ensures that responses are relevant and up to date, while Azure’s cloud services take care of scalability and deployment concerns.  The entire pipeline, from a user’s query to the final answer, is traceable and tunable, and essential for building trust in AI systems.

If you’re a tech enthusiast interested in AI and applications, AgenticShop is a fantastic project to experiment with.  You can find the source code and deployment instructions in the AgenticShop GitHub repository.  With minimal setup, you’ll have a live Agentic Shopping assistant to play with.  Try asking it various questions about electronics and see how it responds.  

For development teams, peek into the Azure Portal to inspect the Postgres database – observe the new extensions or data it has.  Examine the README prompts and tailor one to see how the output changes.

Going further, think about how you could apply the AgenticShop pattern to your own domain.  The same architecture could power an AI-driven support center, a financial advisor tool, a medical information assistant, and more.  The domain changes, but the pattern: combining a knowledge base (database) with reasoning agents, stays effective.  AgenticShop provides a foundation that your team can build upon.

AgenticShop highlights the future of application development where AI agents cooperate with traditional software components to provide rich, personalized, and efficient user experiences.  It empowers developers to harness advanced AI (like GPT-4) in a practical, structured way.  By bridging the gap between databases and AI, it opens up new possibilities to create applications that are both deeply informed and highly intelligent.

We encourage everyone to deploy AgenticShop yourself and explore its capabilities.  Use it as a learning tool or the starting point of your next project.  The era of agentic applications is just beginning, and those who understand how to build and leverage them (using patterns from AgenticShop) will be at the forefront of the next revolution in software development and user experience.  

Happy building, and may your new AI agents deliver great user experiences!

 

 

 

 

 

Updated Aug 25, 2025
Version 1.0
No CommentsBe the first to comment