{"id":159221,"date":"2025-03-27T06:56:25","date_gmt":"2025-03-27T06:56:25","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/a-python-library-for-sql-databases\/"},"modified":"2025-03-27T06:56:25","modified_gmt":"2025-03-27T06:56:25","slug":"a-python-library-for-sql-databases","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=159221","title":{"rendered":"A Python Library for SQL Databases"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div id=\"article-start\">\n<p>Google has introduced the Google Gen AI Toolbox for Databases, an open-source Python library designed to simplify database interaction with GenAI. By converting natural language queries into optimized <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2022\/05\/a-quick-refresher-on-all-the-commonly-used-sql-commands\/\" target=\"_blank\" rel=\"noreferrer noopener\">SQL commands<\/a>, the toolbox eliminates the complexities of SQL, making data retrieval more intuitive and accessible for both developers and non-technical users. As part of its public beta launch, Google has integrated Google GenAI tools with <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2024\/06\/langchain-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\">LangChain<\/a>, to enhance tool management. This collaboration enables seamless AI-driven database operations, improving efficiency and automation in data workflows. This article explores the features, benefits, and setup process of the Google Gen AI Toolbox, highlighting its integration with LangChain and how it simplifies AI-powered database interactions.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-the-need-for-ai-driven-sql-querying\">The Need for AI-driven SQL Querying<\/h2>\n<p>SQL has been the backbone of database management for decades. However, writing complex queries requires expertise and can be time-consuming. The Gen AI Toolbox eliminates this barrier by enabling users to interact with databases using plain language, allowing for seamless and efficient data retrieval.<\/p>\n<p><em>Also Read: <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2022\/01\/learning-sql-from-basics-to-advance\/\" target=\"_blank\" rel=\"noreferrer noopener\">SQL: A Full Fledged Guide from Basics to Advance Level<\/a><\/em><\/p>\n<p>The Gen AI Toolbox enables seamless integration between AI agents and SQL databases, ensuring secure access, scalability, and observability while streamlining the creation and management of AI-powered tools. Currently, it supports <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2022\/09\/interacting-with-remote-databases-postgresql-and-dbapis\/\" target=\"_blank\" rel=\"noreferrer noopener\">PostgreSQL<\/a>, MySQL, AlloyDB, Spanner, and <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2022\/07\/managing-sql-database-on-google-cloud\/\" target=\"_blank\" rel=\"noreferrer noopener\">Cloud SQL<\/a>, with opportunities for further expansion beyond Google Cloud.<\/p>\n<p>The Toolbox enhances how GenAI tools interact with data by serving as an intermediary between the application\u2019s orchestration layer and databases. This setup accelerates development, improves security, and enhances production-quality AI tools.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-key-features-of-gen-ai-toolbox\">Key Features of Gen AI Toolbox<\/h3>\n<p>The Gen AI Toolbox for Databases is designed to make AI-powered database interaction seamless and efficient. It simplifies query generation, enhances accessibility for non-technical users, and ensures smooth integration with existing systems. Here are some key features that make it a powerful tool:<\/p>\n<ul class=\"wp-block-list\">\n<li><strong>Ask in Plain English:<\/strong> Users can input queries like \u201cShow me the top 10 customers by sales\u201d, and the toolbox generates the corresponding SQL command.<\/li>\n<li><strong>Empowering Non-Experts:<\/strong> Business analysts and non-technical users can extract insights without needing SQL expertise.<\/li>\n<li><strong>Plug &amp; Play:<\/strong> Built as a Python library, it integrates smoothly into existing applications and AI models.<\/li>\n<li><strong>Flexible &amp; Open-Source:<\/strong> Developers can customize and extend its functionality to suit unique needs.<\/li>\n<li><strong>Optimized for Production:<\/strong> Works with PostgreSQL, <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2021\/08\/python-and-mysql-a-practical-introduction-for-data-analysis\/\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL<\/a>, AlloyDB, Spanner, and Cloud SQL, ensuring broad compatibility.<\/li>\n<li><strong>Simplified Management:<\/strong> Acts as a central AI layer, streamlining updates, maintenance, and security.<\/li>\n<\/ul>\n<h3 class=\"wp-block-heading\" id=\"h-components-of-gen-ai-toolbox-for-databases\">Components of Gen AI Toolbox for Databases<\/h3>\n<p>Google\u2019s Gen AI Toolbox consists of two primary components:<\/p>\n<ol class=\"wp-block-list\">\n<li>A <strong>server<\/strong> that defines tools for application usage.<\/li>\n<li>A <strong>client<\/strong> that interacts with the server to integrate these tools into orchestration frameworks.<\/li>\n<\/ol>\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"676\" height=\"424\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp.webp\" alt=\"Components of Google Gen AI Toolbox\" class=\"wp-image-228529\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp.webp 676w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp-300x188.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp-150x94.webp 150w\" sizes=\"(max-width: 676px) 100vw, 676px\"\/><\/figure>\n<h3 class=\"wp-block-heading\" id=\"h-how-the-gen-ai-toolbox-works\">How the Gen AI Toolbox Works<\/h3>\n<p>At its core, the Gen AI Toolbox leverages state-of-the-art LLMs to understand and translate natural language queries into SQL commands. The process involves:<\/p>\n<ol class=\"wp-block-list\">\n<li><strong>Schema Training:<\/strong> The library ingests database schemas, sample queries, and documentation to build an internal model of the database\u2019s structure.<\/li>\n<li><strong>Query Generation:<\/strong> When a user inputs a natural language request, the toolbox processes the query and generates a corresponding SQL statement.<\/li>\n<li><strong>Execution &amp; Feedback:<\/strong> The generated SQL can be executed directly on the connected database, with feedback mechanisms to refine query accuracy over time.<\/li>\n<\/ol>\n<p>This streamlined approach significantly reduces the need for manual query crafting and paves the way for more intuitive data exploration.<\/p>\n<p>The Google GenAI Toolbox enhances database interaction by automating SQL query generation, simplifying development, and integrating seamlessly with modern AI frameworks. Here are the key advantages:<\/p>\n<ul class=\"wp-block-list\">\n<li><strong>Accelerated Insights &amp; Broader Accessibility:<\/strong> By automating SQL queries, organizations can extract and analyze data faster. Non-technical users can interact with databases easily, fostering a data-driven culture.<\/li>\n<li><strong>Seamless AI Integration &amp; Deployment:<\/strong> Designed to work with frameworks like LangChain, the toolbox enables sophisticated, agent-driven workflows. It supports both local and cloud environments, ensuring flexible deployment.<\/li>\n<li><strong>Simplified Development:<\/strong> Reduces boilerplate code and streamlines integration across multiple AI agents.<\/li>\n<li><strong>Optimized Performance &amp; Scalability:<\/strong> Features database connectors and connection pooling for efficient resource management.<\/li>\n<li><strong>Zero Downtime Deployment:<\/strong> A configuration-driven approach allows seamless updates without service interruptions.<\/li>\n<li><strong>Enhanced Security:<\/strong> Supports OAuth2 and OpenID Connect (OIDC) to control access to tools and data securely.<\/li>\n<li><strong>End-to-End Observability:<\/strong> Integration with OpenTelemetry enables real-time logging, metrics, and tracing for better monitoring and troubleshooting.<\/li>\n<\/ul>\n<p>By combining automation, flexibility, and security, the GenAI Toolbox empowers both developers and data analysts to work more efficiently with databases.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-integration-with-langchain\">Integration with LangChain<\/h2>\n<p>LangChain, a widely used developer framework for LLM applications, is fully compatible with Toolbox.\u00a0 With LangChain, developers can leverage LLMs such as Gemini on Vertex AI to build sophisticated agentic workflows.<\/p>\n<p>LangGraph extends LangChain\u2019s functionality by offering state management, coordination, and workflow structuring for multi-actor AI applications. This framework ensures precise tool execution, reliable responses, and controlled tool interactions, making it an ideal partner for Toolbox in managing AI agent workflows.<\/p>\n<p>Harrison Chase, CEO of LangChain, <a href=\"https:\/\/cloud.google.com\/blog\/products\/ai-machine-learning\/announcing-gen-ai-toolbox-for-databases-get-started-today?utm_campaign=61eec5413886930001e78963&amp;utm_content=67a512a0073f650001090044&amp;utm_medium=smarpshare&amp;utm_source=twitter\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">highlighted<\/a> the significance of this integration, stating: \u201cThe integration of Gen AI Toolbox for Databases with the LangChain ecosystem is a boon for all developers. In particular, the tight integration between Toolbox and LangGraph will allow developers to build more reliable agents than ever before.\u201d<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-setting-up-toolbox-locally-with-python-postgresql-and-langgraph\">Setting Up Toolbox Locally with Python, PostgreSQL, and LangGraph<\/h2>\n<p>To use the full potential of the GenAI Toolbox, setting it up locally with Python, PostgreSQL, and LangGraph is essential. This setup enables seamless database interaction, AI-driven query generation, and smooth integration with existing applications. Follow the steps below to get started.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-prerequisites\">Prerequisites<\/h3>\n<p>Before beginning, ensure that the following are installed on your system:<\/p>\n<ol class=\"wp-block-list\">\n<li><strong>Python 3.9+:<\/strong> Install Python along with pip and venv for dependency management.<\/li>\n<li><strong>PostgreSQL 16+:<\/strong> Install PostgreSQL along with the psql client.<\/li>\n<li><strong>LangChain Chat Model Setup: <\/strong>You need one of the following packages installed based on your model preference:<\/li>\n<\/ol>\n<ul class=\"wp-block-list\">\n<li>langchain-vertexai<\/li>\n<li>langchain-google-genai<\/li>\n<li>langchain-anthropic<\/li>\n<\/ul>\n<h3 class=\"wp-block-heading\" id=\"h-step-1-set-up-your-database\">Step 1: Set Up Your Database<\/h3>\n<p>In this step, we will create a PostgreSQL database, set up authentication, and insert some sample data.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-1-1-connect-to-postgresql\">1.1 Connect to PostgreSQL<\/h4>\n<p>First, connect to your PostgreSQL server using the following command:<\/p>\n<pre class=\"wp-block-code\"><code>psql -h 127.0.0.1 -U postgres\n<\/code><\/pre>\n<p>Here, postgres is the default superuser.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-1-2-create-a-new-database-and-user\">1.2 Create a New Database and User<\/h4>\n<p>For security, create a new user specifically for Toolbox and assign it a new database:<\/p>\n<pre class=\"wp-block-code\"><code>CREATE USER bookstore_user WITH PASSWORD 'my-password';\n\nCREATE DATABASE bookstore_db;\nGRANT ALL PRIVILEGES ON DATABASE bookstore_db TO bookstore_user;\n\nALTER DATABASE bookstore_db OWNER TO bookstore_user;\n<\/code><\/pre>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1873\" height=\"627\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/creatingpostgres.webp\" alt=\"creating new database\" class=\"wp-image-228530\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/creatingpostgres.webp 1873w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/creatingpostgres-300x100.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/creatingpostgres-768x257.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/creatingpostgres-1536x514.webp 1536w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/creatingpostgres-150x50.webp 150w\" sizes=\"auto, (max-width: 1873px) 100vw, 1873px\"\/><\/figure>\n<p>This ensures that bookstore_user has full access to bookstore_db.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-1-3-exit-and-reconnect-as-the-new-user\">1.3 Exit and Reconnect as the New User<\/h4>\n<p>Exit the current session:<\/p>\n<pre class=\"wp-block-code\"><code>\\q\n<\/code><\/pre>\n<p>Now, reconnect using the new user:<\/p>\n<pre class=\"wp-block-code\"><code>psql -h 127.0.0.1 -U bookstore_user -d bookstore_db\n<\/code><\/pre>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1603\" height=\"278\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/loginbookstore.webp\" alt=\"login bookstore\" class=\"wp-image-228531\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/loginbookstore.webp 1603w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/loginbookstore-300x52.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/loginbookstore-768x133.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/loginbookstore-1536x266.webp 1536w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/loginbookstore-150x26.webp 150w\" sizes=\"auto, (max-width: 1603px) 100vw, 1603px\"\/><\/figure>\n<h4 class=\"wp-block-heading\" id=\"h-1-4-create-a-books-table\">1.4 Create a Books Table<\/h4>\n<p>We will now create a books table to store book details.<\/p>\n<pre class=\"wp-block-code\"><code>CREATE TABLE books(\n  id           SERIAL PRIMARY KEY,\n  title        VARCHAR NOT NULL,\n  author       VARCHAR NOT NULL,\n  genre        VARCHAR NOT NULL,\n  price        DECIMAL(10,2) NOT NULL,\n  stock        INTEGER NOT NULL,\n  published_on DATE NOT NULL\n);\n<\/code><\/pre>\n<p>This table contains book metadata like title, author, genre, price, stock availability, and publication date.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-1-5-insert-sample-data\">1.5 Insert Sample Data<\/h4>\n<p>Add some books to the database:<\/p>\n<pre class=\"wp-block-code\"><code>INSERT INTO books(title, author, genre, price, stock, published_on)\nVALUES \n  ('The Great Gatsby', 'F. Scott Fitzgerald', 'Classic', 12.99, 5, '1925-04-10'),\n  ('1984', 'George Orwell', 'Dystopian', 9.99, 8, '1949-06-08'),\n  ('To Kill a Mockingbird', 'Harper Lee', 'Fiction', 14.50, 3, '1960-07-11'),\n  ('The Hobbit', 'J.R.R. Tolkien', 'Fantasy', 15.00, 6, '1937-09-21'),\n  ('Sapiens', 'Yuval Noah Harari', 'Non-Fiction', 20.00, 10, '2011-02-10');\n<\/code><\/pre>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1598\" height=\"658\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/inserting_data.webp\" alt=\"Google Gen AI Toolbox: A Python Library for SQL Databases\" class=\"wp-image-228532\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/inserting_data.webp 1598w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/inserting_data-300x124.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/inserting_data-768x316.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/inserting_data-1536x632.webp 1536w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/inserting_data-150x62.webp 150w\" sizes=\"auto, (max-width: 1598px) 100vw, 1598px\"\/><\/figure>\n<p>Exit the session using:<\/p>\n<pre class=\"wp-block-code\"><code>\\q\n<\/code><\/pre>\n<h3 class=\"wp-block-heading\" id=\"h-step-2-install-and-configure-the-gen-ai-toolbox\">Step 2: Install and Configure the Gen AI Toolbox<\/h3>\n<p>Now, we will install Toolbox and configure it to interact with our PostgreSQL database.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-2-1-download-and-install-the-toolbox\">2.1 Download and Install the Toolbox<\/h4>\n<p>Download the latest version of Toolbox:<\/p>\n<pre class=\"wp-block-code\"><code>export OS=\"linux\/amd64\" # Adjust based on your OS\ncurl -O https:\/\/storage.googleapis.com\/genai-toolbox\/v0.2.0\/$OS\/toolbox\nchmod +x toolbox\n<\/code><\/pre>\n<p>This command downloads the appropriate version of Toolbox and makes it executable.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-2-2-configure-the-toolbox\">2.2 Configure the Toolbox<\/h4>\n<p>Create a tools.yaml file to define database connections and SQL queries.<\/p>\n<p>Define Database Connection<\/p>\n<pre class=\"wp-block-code\"><code>sources:\nmy-pg-source:\nkind: postgres\nhost: 127.0.0.1\nport: 5432\ndatabase: bookstore_db\nuser: bookstore_user\npassword: my-password\n<\/code><\/pre>\n<p>This connects Toolbox to our PostgreSQL database.<\/p>\n<p>Define Query-Based Tools<\/p>\n<p>We define SQL queries for various operations:<\/p>\n<pre class=\"wp-block-code\"><code>tools:\nsearch-books-by-title:\nkind: postgres-sql\nsource: my-pg-source\ndescription: Search for books based on title.\nparameters:\n- name: title\ntype: string\ndescription: The title of the book.\nstatement: |\nSELECT * FROM books\nWHERE title ILIKE '%' || $1 || '%';\n\nsearch-books-by-author:\nkind: postgres-sql\nsource: my-pg-source\ndescription: Search for books by a specific author.\nparameters:\n- name: author\ntype: string\ndescription: The name of the author.\nstatement: |\nSELECT * FROM books\nWHERE author ILIKE '%' || $1 || '%';\n\ncheck-book-stock:\nkind: postgres-sql\nsource: my-pg-source\ndescription: Check stock availability of a book.\nparameters:\n- name: title\ntype: string\ndescription: The title of the book.\nstatement: |\nSELECT title, stock\nFROM books\nWHERE title ILIKE '%' || $1 || '%';\n\nupdate-book-stock:\nkind: postgres-sql\nsource: my-pg-source\ndescription: Update stock after a purchase.\nparameters:\n- name: book_id\ntype: integer\ndescription: The ID of the book.\n- name: quantity\ntype: integer\ndescription: The number of books purchased.\nstatement: |\nUPDATE books\nSET stock = stock - $2\nWHERE id = $1\nAND stock &gt;= $2;\n<\/code><\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-2-3-run-the-toolbox-server\">2.3 Run the Toolbox Server<\/h4>\n<p>Start the Toolbox server using the configuration file:<\/p>\n<pre class=\"wp-block-code\"><code>.\/toolbox --tools_file \"tools.yaml\"\n<\/code><\/pre>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1564\" height=\"256\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/readytoserve.webp\" alt=\"Google Gen AI Toolbox: A Python Library for SQL Databases\" class=\"wp-image-228535\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/readytoserve.webp 1564w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/readytoserve-300x49.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/readytoserve-768x126.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/readytoserve-1536x251.webp 1536w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/readytoserve-150x25.webp 150w\" sizes=\"auto, (max-width: 1564px) 100vw, 1564px\"\/><\/figure>\n<h3 class=\"wp-block-heading\" id=\"h-step-3-connecting-an-agent-to-toolbox\">Step 3: Connecting an Agent to Toolbox<\/h3>\n<p>Now, we set up a LangGraph agent to interact with Toolbox.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-3-1-install-dependencies\">3.1 Install Dependencies<\/h4>\n<p>To connect a LangGraph agent, install the required dependencies:<\/p>\n<pre class=\"wp-block-code\"><code>pip install toolbox-langchain\npip install langgraph langchain-google-vertexai\n# Optional:\n# pip install langchain-google-genai\n# pip install langchain-anthropic\n<\/code><\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-3-2-create-a-langgraph-agent\">3.2 Create a LangGraph Agent<\/h4>\n<p>Create a Python script named langgraph_hotel_agent.py and include the following code:<\/p>\n<pre class=\"wp-block-code\"><code>import asyncio\nfrom langgraph.prebuilt import create_react_agent\nfrom langchain_google_genai import ChatGoogleGenerativeAI\nfrom langgraph.checkpoint.memory import MemorySaver\nfrom toolbox_langchain import ToolboxClient\nimport time\n\nprompt = \"\"\"\nYou're a helpful bookstore assistant. You help users search for books by title and author, check stock availability, and update stock after purchases. Always mention book IDs when performing any searches.\n\"\"\"\n\nqueries = [\n\"Find books by George Orwell.\",\n\"Do you have 'The Hobbit' in stock?\",\n\"I want to buy 2 copies of 'Sapiens'.\",\n]\n\ndef main():\n# Replace ChatVertexAI with ChatGoogleGenerativeAI (Gemini)\nmodel = ChatGoogleGenerativeAI(\nmodel=\"gemini-1.5-flash\",\ntemperature=0,\nmax_retries=5,\nretry_min_seconds=5,\nretry_max_seconds=30\n)\n\n# Load tools from Toolbox\nclient = ToolboxClient(\"http:\/\/127.0.0.1:5000\")\ntools = client.load_toolset()\n\nagent = create_react_agent(model, tools, checkpointer=MemorySaver())\nconfig = {\"configurable\": {\"thread_id\": \"thread-1\"}}\n\nfor query in queries:\ninputs = {\"messages\": [(\"user\", prompt + query)]}\ntry:\nresponse = agent.invoke(inputs, stream_mode=\"values\", config=config)\nprint(response[\"messages\"][-1].content)\nexcept Exception as e:\nprint(f\"Error processing query '{query}': {e}\")\n# Wait before trying the next query\ntime.sleep(10)\n\nmain()\n<\/code><\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-3-3-run-the-agent\">3.3 Run the Agent<\/h4>\n<p>Execute the script to interact with the Toolbox:<\/p>\n<pre class=\"wp-block-code\"><code>python langgraph_hotel_agent.py\n<\/code><\/pre>\n<p>Output:<\/p>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1432\" height=\"440\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-3.webp\" alt=\"Google Gen AI Toolbox output\" class=\"wp-image-228533\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-3.webp 1432w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-3-300x92.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-3-768x236.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/03\/output-3-150x46.webp 150w\" sizes=\"auto, (max-width: 1432px) 100vw, 1432px\"\/><\/figure>\n<p>From the output, we can see that the script langgraph_bookstore_agent.py manages bookstore inventory by listing books, confirming availability, and updating stock. The stock of \u201cSapiens\u201d decreases across runs (from 8 to 6), indicating persistent storage or database updates.<\/p>\n<p>This setup provides a quick and efficient way to get started with Google\u2019s Gen AI Toolbox locally using Python, PostgreSQL, and LangGraph. By following these steps, you can configure a PostgreSQL database, define SQL-based tools, and integrate them with a LangGraph agent to manage your store\u2019s inventory, seamlessly.<\/p>\n<p>Developers working with AI agents often face multiple challenges when integrating tools, frameworks, and databases. The same exists when working with Google\u2019s Gen AI Toolbox as well. Some of these challenges include:<\/p>\n<ul class=\"wp-block-list\">\n<li>Scaling tool management: Managing AI tools requires extensive, repetitive coding and modifications across various applications, hindering consistency and integration.<\/li>\n<li>Complex database connections: Configuring databases for optimal performance at scale demands connection pooling, caching, and efficient resource management.<\/li>\n<li>Security vulnerabilities: Ensuring secure access between GenAI models and sensitive data requires robust authentication mechanisms, increasing complexity and risk.<\/li>\n<li>Inflexible tool updates: The process of adding or updating tools often necessitates complete application redeployment, leading to potential downtime.<\/li>\n<li>Limited workflow observability: Existing solutions lack built-in monitoring and troubleshooting support, making it difficult to gain insights into AI workflows.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-alternative-ai-solutions-for-sql-query-generation\">Alternative AI Solutions for SQL Query Generation<\/h2>\n<p>While Google\u2019s Gen AI Toolbox offers an innovative approach to AI-powered database interaction, several other tools also simplify SQL querying using generative AI. These solutions enable users to retrieve data effortlessly without requiring deep SQL expertise.<\/p>\n<p>Here are some notable alternatives:<\/p>\n<ul class=\"wp-block-list\">\n<li><strong>SQLAI.ai: <\/strong>An AI-powered tool that can generate, optimize, fix, simplify, and explain SQL queries. It supports multiple database systems, allowing non-experts to extract insights quickly.<\/li>\n<li><strong>Text2SQL.ai:<\/strong> Converts everyday language into SQL queries, supporting various database engines to streamline query generation.<\/li>\n<li><strong>QueryGPT by Uber:<\/strong> Uses large language models to generate SQL queries from natural language prompts, significantly reducing query-writing time.<\/li>\n<li><strong>SQLPilot: <\/strong>Uses a knowledge base to generate SQL queries and supports user customization, including OpenAI key integration.<\/li>\n<li><strong>BlazeSQL:<\/strong> A chatbot-powered SQL AI tool that connects directly to databases, offering instant SQL generation, dashboarding, and security-focused features.<\/li>\n<li><strong>Microsoft Copilot in Azure SQL: <\/strong>Integrated within the Azure portal, enabling natural language prompts for T-SQL query generation.<\/li>\n<li><strong>NL2SQL Frameworks:<\/strong> Research and commercial implementations that convert natural language into SQL, catering to specific industries and use cases.<\/li>\n<\/ul>\n<p>These alternatives, like Google\u2019s Gen AI Toolbox, aim to bridge the gap between AI and SQL by making database interactions more intuitive and accessible. Depending on specific use cases, organizations can choose a tool that best aligns with their database infrastructure and workflow needs.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n<p>Google\u2019s Gen AI Toolbox simplifies SQL querying with natural language processing, making database interactions intuitive for both developers and non-technical users. With LangChain integration and support for major SQL databases, it ensures secure, scalable, and efficient AI-driven data retrieval. By addressing challenges like scalability, security, and workflow management, the toolbox streamlines AI adoption in database operations. Looking ahead, its continued evolution promises smarter, more accessible AI-powered data solutions.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-frequently-asked-questions\">Frequently Asked Questions<\/h2>\n<div class=\"schema-faq wp-block-yoast-faq-block\">\n<div class=\"schema-faq-section\" id=\"faq-question-1743055365641\"><strong class=\"schema-faq-question\">Q1. What is the Google Gen AI Toolbox?<\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. The Google Gen AI Toolbox is an open-source Python library that enables AI-powered SQL querying. It allows users to retrieve database information using natural language instead of writing complex SQL commands.<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1743055375928\"><strong class=\"schema-faq-question\">Q2. Which databases are supported by the Gen AI Toolbox?<\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. The toolbox currently supports PostgreSQL, MySQL, AlloyDB, Spanner, and Cloud SQL, with potential expansion to other databases in the future.<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1743055385245\"><strong class=\"schema-faq-question\">Q3. Do I need to know SQL to use the Gen AI Toolbox?<\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. No, the toolbox is designed for both developers and non-technical users. It translates plain language queries into optimized SQL commands, making database interactions intuitive.<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1743055391285\"><strong class=\"schema-faq-question\">Q4. How does the Gen AI Toolbox integrate with LangChain?<\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. The toolbox seamlessly integrates with LangChain and LangGraph, enabling AI agents to query databases and process structured data efficiently within AI-driven applications.<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1743055402211\"><strong class=\"schema-faq-question\">Q5. Is the Gen AI Toolbox open-source?<\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. Yes, the toolbox is open-source, allowing developers to customize, extend, and integrate it with their existing applications and workflows.<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1743055410879\"><strong class=\"schema-faq-question\">Q6. How secure is the Gen AI Toolbox?<\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. It supports OAuth2 and OpenID Connect (OIDC) for secure access control and integrates with OpenTelemetry for monitoring and observability.<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1743055420651\"><strong class=\"schema-faq-question\">Q7. Can I use the Gen AI Toolbox in a production environment?<\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. Yes, the toolbox is optimized for production workloads, featuring connection pooling, caching, and zero-downtime deployments for seamless updates.<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<div class=\"border-top py-3 author-info my-4\">\n<div class=\"author-card d-flex align-items-center\">\n<div class=\"flex-shrink-0 overflow-hidden\">\n                                    <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/author\/janvikumari01\/\" class=\"text-decoration-none active-avatar\"><br \/>\n                                                                       <img decoding=\"async\" src=\"https:\/\/av-eks-lekhak.s3.amazonaws.com\/media\/lekhak-profile-images\/converted_image_ToTu2tx.webp\" width=\"48\" height=\"48\" alt=\"Janvi Kumari\" loading=\"lazy\" class=\"rounded-circle\"\/><\/p>\n<p>                                <\/a>\n                                <\/div>\n<\/p><\/div>\n<p>Hi, I am Janvi, a passionate data science enthusiast currently working at Analytics Vidhya. My journey into the world of data began with a deep curiosity about how we can extract meaningful insights from complex datasets.<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<p><h4 class=\"fs-24 text-dark\">Login to continue reading and enjoy expert-curated content.<\/h4>\n<p>                        <button class=\"btn btn-primary mx-auto d-table\" data-bs-toggle=\"modal\" data-bs-target=\"#loginModal\" id=\"readMoreBtn\">Keep Reading for Free<\/button>\n                    <\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Google has introduced the Google Gen AI Toolbox for Databases, an open-source Python library designed to simplify database interaction with GenAI. By converting natural language queries into optimized SQL commands, the toolbox eliminates the complexities of SQL, making data retrieval more intuitive and accessible for both developers and non-technical users. As part of its public [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":159222,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[37824,5129,21302,65481],"dealstore":[],"offerexpiration":[],"class_list":["post-159221","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-databases","tag-library","tag-python","tag-sql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>A Python Library for SQL Databases - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=159221\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Python Library for SQL Databases - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"Google has introduced the Google Gen AI Toolbox for Databases, an open-source Python library designed to simplify database interaction with GenAI. By converting natural language queries into optimized SQL commands, the toolbox eliminates the complexities of SQL, making data retrieval more intuitive and accessible for both developers and non-technical users. As part of its public [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=159221\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-27T06:56:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp.webp.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"676\" \/>\n\t<meta property=\"og:image:height\" content=\"424\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=159221#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=159221\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"A Python Library for SQL Databases\",\"datePublished\":\"2025-03-27T06:56:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=159221\"},\"wordCount\":2036,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=159221#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp.webp.webp\",\"keywords\":[\"Databases\",\"Library\",\"Python\",\"SQL\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=159221#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=159221\",\"url\":\"https:\/\/fivemor.com\/?p=159221\",\"name\":\"A Python Library for SQL Databases - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=159221#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=159221#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp.webp.webp\",\"datePublished\":\"2025-03-27T06:56:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=159221#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=159221\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=159221#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp.webp.webp\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp.webp.webp\",\"width\":676,\"height\":424},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=159221#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A Python Library for SQL Databases\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A Python Library for SQL Databases - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=159221","og_locale":"en_US","og_type":"article","og_title":"A Python Library for SQL Databases - Som2ny Network","og_description":"Google has introduced the Google Gen AI Toolbox for Databases, an open-source Python library designed to simplify database interaction with GenAI. By converting natural language queries into optimized SQL commands, the toolbox eliminates the complexities of SQL, making data retrieval more intuitive and accessible for both developers and non-technical users. As part of its public [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=159221","og_site_name":"Som2ny Network","article_published_time":"2025-03-27T06:56:25+00:00","og_image":[{"width":676,"height":424,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp.webp.webp","type":"image\/webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=159221#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=159221"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"A Python Library for SQL Databases","datePublished":"2025-03-27T06:56:25+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=159221"},"wordCount":2036,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=159221#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp.webp.webp","keywords":["Databases","Library","Python","SQL"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=159221#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=159221","url":"https:\/\/fivemor.com\/?p=159221","name":"A Python Library for SQL Databases - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=159221#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=159221#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp.webp.webp","datePublished":"2025-03-27T06:56:25+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=159221#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=159221"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=159221#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp.webp.webp","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/03\/Servergenaiapp.webp.webp","width":676,"height":424},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=159221#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"A Python Library for SQL Databases"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/159221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=159221"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/159221\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/159222"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=159221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=159221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=159221"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=159221"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=159221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}