Usecases
Bakery Shop Agent
15 min
1\ overview this guide explains how to create and integrate an ai agent using the pusaka ai platform into a company’s internal information system the article walks through a step by step process—from setting up a fictional business to testing a fully operational ai agent—demonstrating how the integration can enhance both operational efficiency and customer interaction 2\ purpose and context the purpose of this integration is to harness pusaka's agentic ai product to streamline business processes and deliver smart assistance pusaka ai is platform that allows users to build and train their own ai agents these agents can be equipped with custom content and connected to an internal system via apis in this example, a fictional bakery named breakfastalley uses the ai agent “sophie” to manage inquiries, retrieve data, place production orders, and accept payment this setup not only reduces the manual workload but also improves the overall customer experience by providing real time, accurate responses below is a summary of what sophie can assist users with information delivery providing detailed insights about the company, its menu, and product specifics client recognition identifying registered clients and tailoring responses accordingly order management retrieving existing orders, checking production schedules, and processing new orders api utilization following strict instructions on when and how to call external apis to retrieve or update data these settings ensure that the agent behaves in a consistent, reliable manner while meeting various customer and business needs you can try interacting with sophie on this website set up for the fictional bakery breakfastalley https //demo pusaka ai vercel app/ https //demo pusaka ai vercel app/ 3\ behavior settings the agent is designed to function as an intelligent consultant within the company’s online system in pusaka, we can determine how an agent behave in its interaction with the customer 4\ sample dialog below are examples of interactions that illustrate sophie’s capabilities menu inquiry customer “can you tell me about today’s breakfast menu?” sophie “breakfastalley offers a variety of breads, including croissants, macarons, and pain au chocolat would you like details on ingredients or nutritional information?” product specific question customer “what are the ingredients in your pain au chocolat?” sophie “our pain au chocolat is made with premium cocoa, butter, and high quality flour it’s freshly baked to perfection ” client recognition customer “hello, i’m john doe ” sophie “welcome back, john! would you like to review your previous orders or place a new one?” order check customer “can you check the status of my recent order?” sophie “your order for 5 dozen items is currently in production and scheduled for delivery shortly ” placing order customer “i would like to order 5 dozens of macarons, please ” sophie “thank you for your order i have made an order of 60 macarons on your behalf and will be completed in march, 30th ” making payment customer “i would like to make a payment of rp 500 000 ” sophie “certainly you can make your payment using this va number xxx xxx xxx xxx from bank abc you can check again with me after you've made the payment thank you!” 5\ references and content to train sophie, a reference document was uploaded to instruct the agent on the specifics of the bakery’s products—covering flavors, ingredients, calories, and shelf life for every uploaded document, pusaka will create smaller coherent parts of the content in the form of "chunks" 6\ available actions sophie's ability to interact with the database, ie client recognition, order management, and payment gateway, is provided by a set of actions action can be an api endpoint or another agent in sophie's case, we've provided the agent with these api actions here is the complete openapi schema of the api actions used by sophie { "openapi" "3 0 0", "info" { "title" "breakfastalley api", "version" "1 0 0" }, "paths" { "/ba/items" { "post" { "summary" "load breakfastalley items", "responses" { "200" { "description" "a list of breakfastalley items", "content" { "application/json" { "schema" { "type" "array", "items" { "type" "object" } } } } } } } }, "/ba/find client" { "post" { "summary" "load breakfastalley client data by name", "requestbody" { "required" true, "content" { "application/json" { "schema" { "type" "object", "properties" { "keyword" { "type" "string", "example" "john doe" } } } } } }, "responses" { "200" { "description" "a list of clients matching the keyword", "content" { "application/json" { "schema" { "type" "array", "items" { "type" "object" } } } } } } } }, "/ba/item" { "post" { "summary" "load breakfastalley item data by id", "requestbody" { "required" true, "content" { "application/json" { "schema" { "type" "object", "properties" { "id" { "type" "integer", "example" 1 } } } } } }, "responses" { "200" { "description" "item data", "content" { "application/json" { "schema" { "type" "object" } } } } } } }, "/ba/find item" { "post" { "summary" "load breakfastalley item data by name", "requestbody" { "required" true, "content" { "application/json" { "schema" { "type" "object", "properties" { "keyword" { "type" "string", "example" "croissant" } } } } } }, "responses" { "200" { "description" "a list of items matching the keyword", "content" { "application/json" { "schema" { "type" "array", "items" { "type" "object" } } } } } } } }, "/ba/order" { "post" { "summary" "load breakfastalley order data by client id", "requestbody" { "required" true, "content" { "application/json" { "schema" { "type" "object", "properties" { "client id" { "type" "integer", "example" 1 } } } } } }, "responses" { "200" { "description" "a list of orders for the client", "content" { "application/json" { "schema" { "type" "array", "items" { "type" "object" } } } } } } } }, "/ba/make order" { "post" { "summary" "make an order for breakfastalley", "requestbody" { "required" true, "content" { "application/json" { "schema" { "type" "object", "properties" { "client id" { "type" "integer", "example" 1 }, "item id" { "type" "integer", "example" 1 }, "quantity" { "type" "integer", "example" 2 } } } } } }, "responses" { "200" { "description" "order created", "content" { "application/json" { "schema" { "type" "object" } } } } } } }, "/ba/make payment" { "post" { "summary" "make a payment for breakfastalley using midtrans", "description" "creates a payment transaction using midtrans and returns the virtual account number", "requestbody" { "required" true, "content" { "application/json" { "schema" { "type" "object", "properties" { "order id" { "type" "string", "example" "order 123" }, "order gross amount" { "type" "integer", "example" 75000 } }, "required" \["order id", "order gross amount"] } } } }, "responses" { "200" { "description" "payment created with virtual account details", "content" { "application/json" { "schema" { "type" "object", "properties" { "bank" { "type" "string", "example" "bca" }, "va number" { "type" "string", "example" "812785002530231" } } } } } }, "500" { "description" "error making payment" } } } }, "/ba/confirm payment" { "post" { "summary" "confirm payment status for breakfastalley using midtrans", "description" "checks the status of a payment transaction and returns the transaction status", "requestbody" { "required" true, "content" { "application/json" { "schema" { "type" "object", "properties" { "order id" { "type" "string", "example" "order 123", "description" "the id of the order to check payment status for" } }, "required" \["order id"] } } } }, "responses" { "200" { "description" "payment status", "content" { "application/json" { "schema" { "type" "string", "enum" \["settlement", "pending", "deny", "expire", "cancel", "refund", "chargeback"], "example" "settlement" } } } }, "500" { "description" "error confirming payment" } } } } } } when adding an api endpoint as action, we can provide information about what kind of action the endpoint does, what parameters it requires, and what kind of result is expected from the api endpoint once the action is integrated, the agent will be able to use an action based on the context of a user's prompt we can provide as many tools as necessary to help the agent in responding to user's requests the possibility is endless 7\ interaction scenarios several practical scenarios demonstrate how sophie interacts with the internal system general inquiries answering questions about breakfastalley’s offerings and operational details product information providing specifics about individual products, including nutritional facts and ingredients client recognition identifying returning clients based on their data stored in the system order management retrieving current orders and production schedules as well as accepting new orders by accessing the backend api endpoints data verification confirming details such as quantities by cross referencing the database payment assistance providing customers with virtual accounts from payment gateway services and checking the status of the payment 8\ impact & benefits integrating an ai agent like sophie into an internal information system offers numerous advantages operational efficiency automates routine tasks, allowing staff to focus on more complex issues enhanced customer experience provides quick, reliable, and personalized responses to inquiries data optimization streamlines access to and management of business critical data through integrated apis cost effectiveness reduces reliance on human operators for repetitive tasks, leading to lower operational costs scalability supports the growth of business operations by handling increased query volumes without additional resource investments 9\ possible improvements while the current integration demonstrates significant value, future enhancements could include advanced customization allowing the agent to handle even more complex queries and scenarios enhanced analytics implementing monitoring tools to analyze interaction patterns and improve the agent’s performance broader api integration expanding the range of external systems and databases that the agent can interact with, further automating business processes 10\ conclusion integrating ai agents like sophie via the pusaka ai platform into a company’s internal information system represents a forward thinking approach to modern business challenges by automating routine tasks and providing real time, personalized support, businesses can achieve higher efficiency and improve customer satisfaction—all at a lower operational cost as ai technology continues to evolve, such solutions are set to become even more integral to the success of both large organizations and individual entrepreneurs