<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Sandip Mandal</title>
    <description>The latest articles on Forem by Sandip Mandal (@sandipm03).</description>
    <link>https://forem.com/sandipm03</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3329146%2F0c9ec14c-e5cf-409e-9d0d-dc89573647a8.jpg</url>
      <title>Forem: Sandip Mandal</title>
      <link>https://forem.com/sandipm03</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sandipm03"/>
    <language>en</language>
    <item>
      <title>Effortless PostgreSQL Environment in Docker For Windows</title>
      <dc:creator>Sandip Mandal</dc:creator>
      <pubDate>Tue, 04 Nov 2025 20:45:28 +0000</pubDate>
      <link>https://forem.com/sandipm03/effortless-postgresql-environment-in-docker-for-windows-3i13</link>
      <guid>https://forem.com/sandipm03/effortless-postgresql-environment-in-docker-for-windows-3i13</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
PostgreSQL is a powerful, open-source object-relational database system. It is a highly scalable, SQL-compliant database management system that is used to handle large workloads. PostgreSQL is a popular choice for many developers and organizations due to its robust features, extensibility, and reliability.&lt;/p&gt;

&lt;p&gt;Installing PostgreSQL directly on your local machine can be a difficult and also take multiple steps, configuration issues, and potential conflicts with other software. This process is especially cumbersome on Windows. Fortunately, Docker provides a much simpler, faster, and more portable solution. Let’s go through how to set up and run PostgreSQL inside a Docker container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before Docker&lt;/strong&gt; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You must install PostgreSQL locally, configure paths, users, and ports manually. &lt;/li&gt;
&lt;li&gt;Resetting the database means manually dropping tables or reinstalling.&lt;/li&gt;
&lt;li&gt;Different projects may need different PostgreSQL versions — hard to manage on one system.&lt;/li&gt;
&lt;li&gt;Config files, logs, and data clutter your OS. Uninstalling doesn’t clean everything.&lt;/li&gt;
&lt;li&gt;Every team member must install and configure PostgreSQL the same way.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;After Docker&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;One &lt;code&gt;docker-compose up&lt;/code&gt; and you have a running PostgreSQL instance.&lt;/li&gt;
&lt;li&gt;Just &lt;code&gt;docker down&lt;/code&gt; and &lt;code&gt;docker up&lt;/code&gt; to reset everything.&lt;/li&gt;
&lt;li&gt;You can switch PostgreSQL versions by changing one line in your config.&lt;/li&gt;
&lt;li&gt;Everything runs inside a container — no system pollution.&lt;/li&gt;
&lt;li&gt;Easily link PostgreSQL with backend services (Node.js, Django, etc.) in one Compose file.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;br&gt;
Before you begin, you will need to have the following prerequisites:&lt;/p&gt;

&lt;p&gt;A system running Windows&lt;br&gt;
Docker installed on your system&lt;br&gt;
Basic knowledge of using the command line&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installing Docker&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you doesn't have Docker installed on your Windows, you can download and install it from the official &lt;a href="https://docs.docker.com/desktop/setup/install/windows-install/" rel="noopener noreferrer"&gt;Docker website&lt;/a&gt;. Follow the instructions provided on the website step by step to install Docker on your Windows.&lt;/p&gt;

&lt;p&gt;Once the docker is installed, you can verify the installation by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will display the version of Docker installed on your system.&lt;/p&gt;

&lt;p&gt;To create a PostgreSQL environment in Docker you can choose between two approaches GUI-based or terminal-based. Let's start with GUI-based method first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create Folder&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a new folder to store your PostgreSQL data. This folder will be used to store the data files for your PostgreSQL instance. Usually keep this directory in your project folder so that it is easy to manage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker Compose File&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a new file named &lt;code&gt;compose.yml&lt;/code&gt; in the same folder. This file will contain the configuration for your PostgreSQL container.&lt;/p&gt;

&lt;p&gt;Insert the following content into the &lt;code&gt;compose.yml&lt;/code&gt;file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;services:
  db:
    image: postgres:alpine
    container_name: postgres
    restart: always
    environment:
      POSTGRES_DB: ${DB_NAME}
      POSTGRES_USER: ${DB_USER}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    ports:
      - ${DB_PORT}:5432  # Ensure no other service is using this port
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -d $${DB_NAME} -U $${DB_USER}"]
      interval: 10s
      timeout: 30s
      retries: 5
    volumes:
      - ./data/db:/var/lib/postgresql/data

  pgadmin:
    image: dpage/pgadmin4
    container_name: pgadmin
    restart: always
    environment:
      PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
      PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
    ports:
      - 8080:80  # Access pgAdmin at http://localhost:8080
    depends_on:
      - db
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration defines two services: db and pgAdmin.&lt;br&gt;
The db service runs a PostgreSQL instance using the official Docker image, with data stored in &lt;code&gt;./data/db&lt;/code&gt;. It exposes port 5432 and uses environment variables to set the database name, user, and password.&lt;/p&gt;

&lt;p&gt;The pgAdmin service uses the &lt;code&gt;dpage/pgadmin4&lt;/code&gt; image to provide a web-based PostgreSQL management interface. It maps port 8080 on the host to port 80 in the container, letting you access pgAdmin at &lt;code&gt;http://localhost:8080&lt;/code&gt; using the credentials defined in the environment file. &lt;/p&gt;

&lt;p&gt;If you want a fast, portable, and minimal tool to manage multiple databases — especially in Docker or lightweight environments. Can use these code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;adminer:
    image: adminer
    container_name: adminer
    restart: always
    ports:
      - 8080:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;replace pgadmin code with adminer code .&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Environment Variables&lt;/strong&gt;&lt;br&gt;
To configure the database name, username, and password, create a &lt;code&gt;.env&lt;/code&gt; file in the same directory as your &lt;code&gt;docker-compose.yml&lt;/code&gt; file and add the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DB_NAME=test-db
DB_USER=testuser
DB_PASSWORD=userpass
DB_PORT=5432
# Use PGADMIN_EMAIL and PGADMIN_PASSWORD only if you’re using pgAdmin. 
PGADMIN_EMAIL=admin@example.com
PGADMIN_PASSWORD=adminpass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace the values with your preferred database name, username, and credentials.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start the Container&lt;/strong&gt;&lt;br&gt;
 Run the following command to start PostgreSQL and the chosen management tool(s):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker compose up -d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will pull the necessary Docker images and start PostgreSQL, pgAdmin, and/or Adminer in the background. You can verify that the containers are running by executing the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker ps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see postgres, pgadmin, and/or adminer listed in the output.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Access the Web Interfaces&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can choose between pgAdmin or Adminer, depending on your preference: by opening a web browser and navigating to &lt;a href="http://localhost:8080" rel="noopener noreferrer"&gt;http://localhost:8080&lt;/a&gt;. In the login page, enter the database name, username, and password that you specified in the &lt;code&gt;compose.yml&lt;/code&gt; file. You should now be able to interact with your PostgreSQL database through the Adminer or pgAdmin  web interface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect with PostgreSQL&lt;/strong&gt;&lt;br&gt;
To connect with database url, you can use the following url:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;postgresql://testuser:userpass@localhost:5432/test-db
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s it! You’ve successfully set up PostgreSQL using Docker on your system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's start with terminal-based method&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Download the PostgreSQL Image&lt;/strong&gt;&lt;br&gt;
Download the PostgreSQL image from Docker Hub at &lt;a href="https://hub.docker.com/_/postgres/" rel="noopener noreferrer"&gt;docker Hub&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker pull postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Create a PostgreSQL Container&lt;/strong&gt;&lt;br&gt;
Start creating a container with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run --name test-db -e POSTGRES_PASSWORD=userpass -d -p 5432:5432 postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;“test-db” is the name of the container (you can choose a different name if you prefer).&lt;/li&gt;
&lt;li&gt;“userpass” is the password you want to set for the “postgres” user in PostgreSQL.&lt;/li&gt;
&lt;li&gt;The “-d” option runs the container in the background.&lt;/li&gt;
&lt;li&gt;The “-p 5432:5432” option maps port 5432 from the container to port 5432 on the host, allowing you to connect to PostgreSQL from the host.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*&lt;em&gt;Step 3: Download pgAdmin *&lt;/em&gt;&lt;br&gt;
Let's download the pgAdmin image from &lt;a href="https://hub.docker.com/r/dpage/pgadmin4/" rel="noopener noreferrer"&gt;Docker Hub&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker pull dpage/pgadmin4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Afterward, you need to create a container for running pgAdmin using the code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run --name testuser -p 15432:80 -e "PGADMIN_DEFAULT_EMAIL=my_email@test.com" -e "PGADMIN_DEFAULT_PASSWORD=userpass" -d dpage/pgadmin4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;“testuser” is the name of the container being created.&lt;/li&gt;
&lt;li&gt;The “-p 15432:80” option maps port 15432, which is used for communication with pgAdmin, to port 80.&lt;/li&gt;
&lt;li&gt;“PGADMIN_DEFAULT_EMAIL” will be the login you use to access pgAdmin.&lt;/li&gt;
&lt;li&gt;“PGADMIN_DEFAULT_PASSWORD” will be the password you use to access pgAdmin.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can access pgAdmin at &lt;a href="https://localhost:15432" rel="noopener noreferrer"&gt;https://localhost:15432&lt;/a&gt;, and you will see the pgAdmin interface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;br&gt;
That’s it! You’ve successfully set up PostgreSQL using Docker — through both GUI (Docker Compose) and terminal-based methods.&lt;br&gt;
With this setup, you can easily manage databases, switch PostgreSQL versions, and connect your applications — all without cluttering your local system.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>postgres</category>
      <category>webdev</category>
      <category>database</category>
    </item>
    <item>
      <title>Introducing Google Vertex AI Agent Engine Memory Bank: Making AI Agents Remember</title>
      <dc:creator>Sandip Mandal</dc:creator>
      <pubDate>Tue, 22 Jul 2025 19:53:32 +0000</pubDate>
      <link>https://forem.com/sandipm03/introducing-google-vertex-ai-agent-engine-memory-bank-making-ai-agents-remember-437b</link>
      <guid>https://forem.com/sandipm03/introducing-google-vertex-ai-agent-engine-memory-bank-making-ai-agents-remember-437b</guid>
      <description>&lt;p&gt;Ever wish your AI agent could actually remember things about you, like a real assistant? Google just released Memory Bank in Vertex AI Agent Engine—a powerful new solution for giving your AI agents real long-term memory! This isn’t just another GCP feature; it’s grounded in brand-new research on how to make memory work well for AI.&lt;/p&gt;

&lt;p&gt;In this blog, I’ll explain why long-term memory is such a game-changer for AI agents, what makes Memory Bank special, and how you can start using it in your projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Do AI Agents Need Long-Term Memory?&lt;/strong&gt;&lt;br&gt;
Most current AI agents—like chatbots powered by large language models—are stateless. That means every time you start a conversation, it’s a blank slate; your agent doesn’t know anything you shared in previous sessions unless you tell it all over again.&lt;/p&gt;

&lt;p&gt;For example, imagine asking your agent, “Can you help me plan a trip to Italy?” It can give some answers. But if you come back tomorrow and want to continue planning, it has no memory of that earlier conversation. This lack of continuity makes it hard to build helpful, personalized agents.&lt;/p&gt;

&lt;p&gt;Some big AI platforms (like ChatGPT or Gemini) seem like they remember you—they personalize your experience by managing long-term memory in the background. But until now, most developers had to build complex workarounds to achieve this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Typical (and Painful) Old Approaches&lt;/strong&gt;&lt;br&gt;
Before Memory Bank, there were two common but imperfect ways to mimic memory:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Prompt Stuffing:&lt;/strong&gt;&lt;br&gt;
You’d cram the entire conversation history each time into the prompt. This gets expensive, slow, and confusing as conversations grow.&lt;br&gt;
&lt;strong&gt;2. Similarity Search or RAG:&lt;/strong&gt;&lt;br&gt;
Here, you save all conversation history, and when needed, retrieve “chunks” of relevant information. This is better, but the chunks are often disconnected facts that don’t always make sense together in context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problems with these methods:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hard to maintain.&lt;/li&gt;
&lt;li&gt;Inefficient and expensive.&lt;/li&gt;
&lt;li&gt;Often lose the true context you want the agent to remember.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What’s New With Memory Bank?&lt;/strong&gt;&lt;br&gt;
Google’s new Memory Bank was designed to solve exactly these problems. It combines new research and practical tools so your agent can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Truly Personalize:&lt;/strong&gt; Remember and recall user preferences, past actions, and interactions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintain Context Continuity:&lt;/strong&gt; Know what details to remember and what can be skipped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimize Retrieval:&lt;/strong&gt; Use reinforcement learning to highlight info that’s actually useful, not just what happens to match a keyword.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3bfn36kifgwrst0tfymr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3bfn36kifgwrst0tfymr.png" alt=" " width="800" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Innovations&lt;/strong&gt;&lt;br&gt;
Memory Bank introduces two core techniques from recent research:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Prospective Reflection
The agent summarizes scattered conversation fragments into cohesive, useful memories—reducing redundancy and improving recall.&lt;/li&gt;
&lt;li&gt;Retrospective Reflection
The system continually learns what “memories” are most helpful based on user interactions—refining and prioritizing important info over time.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With these, your agent not only stores user facts like allergies or travel destinations, but also understands which details to bring up at the right time (and which to leave out)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Can You Use Memory Bank?&lt;/strong&gt;&lt;br&gt;
Getting started is straightforward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;In Vertex AI Agent Engine:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;When you deploy an agent, set up a session in Google Cloud Platform’s Agent Engine. Memory Bank is built in—you just enable it!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Via REST API:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;There’s a REST API for Memory Bank. Whatever framework you use (LangGraph, LlamaIndex, Google’s ADK, etc.), you can call the API to update, save, or retrieve memory.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;With Google ADK:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Google’s new open-source Agent Development Kit (ADK) integrates Memory Bank natively—no extra setup needed! All memory management is handled automatically while you build with ADK.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Real-World Example&lt;/strong&gt;&lt;br&gt;
  Let’s say you tell your agent today that you have a gluten allergy and love aisle seats on flights. Next month, when you ask for dinner suggestions or book a trip, the agent recalls your allergy and seat preference without reminders. This seamless recall brings the magic of a personalized AI experience—with no hacks or complex prompts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;br&gt;
  With Memory Bank, Google just made powerful, long-term AI agent memory accessible to everyone. It’s efficient, smart, and easy to use—no more prompt-gymnastics or brittle hacks needed. If you want to build agents that remember users and act more like helpful assistants, it’s time to give Memory Bank a try.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/memory-bank/overview" rel="noopener noreferrer"&gt;You can find more details and try out the sample notebook from the official Vertex AI Memory Bank documentation.&lt;/a&gt;&lt;br&gt;
Let me know in the comments how you plan to use Memory Bank, or what features you want to see next!&lt;/p&gt;

</description>
      <category>vertexai</category>
      <category>memorybank</category>
      <category>googlecloud</category>
      <category>agentengine</category>
    </item>
  </channel>
</rss>
