{"id":55672,"date":"2026-11-20T00:32:38","date_gmt":"2026-11-20T08:32:38","guid":{"rendered":"https:\/\/www.griddb.net\/?p=55672"},"modified":"2026-11-20T00:32:38","modified_gmt":"2026-11-20T08:32:38","slug":"building-microstock-ai-agents-with-griddb","status":"publish","type":"post","link":"https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/","title":{"rendered":"Building Microstock AI Agents with GridDB"},"content":{"rendered":"<h2 id=\"overview\">Overview<\/h2>\n<p><strong>Microstock<\/strong> refers to a business model in the stock photography, illustration, and media industry where creators (photographers, designers, videographers) upload their work to online platforms and license it to customers for a small fee (&#8220;micro&#8221; pricing). These platforms aggregate content from thousands of contributors and make it available for purchase by individuals, businesses, or media outlets.<\/p>\n<p>\nOne of the biggest problems with stock photo metadata is that most of the user flow is manual and requires human intervention.\n<\/p>\n<h3 id=\"stockpilot\">StockPilot<\/h3>\n<p>\nAdobe Stock is a popular platform for stock photography and illustration where creators can upload their work and license it to customers. It provides a rich set of metadata fields to describe the stock photo.\n<\/p>\n<p>\nHowever, manually entering metadata for each stock photo can be time-consuming and error-prone, especially when dealing with a large number of photos.\n<\/p>\n<p><a href=\"\/wp-content\/uploads\/2026\/11\/adobe-stock.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/11\/adobe-stock.png\" alt=\"\" width=\"2098\" height=\"1592\" class=\"aligncenter size-full wp-image-55676\" srcset=\"\/wp-content\/uploads\/2026\/11\/adobe-stock.png 2098w, \/wp-content\/uploads\/2026\/11\/adobe-stock-300x228.png 300w, \/wp-content\/uploads\/2026\/11\/adobe-stock-1024x777.png 1024w, \/wp-content\/uploads\/2026\/11\/adobe-stock-768x583.png 768w, \/wp-content\/uploads\/2026\/11\/adobe-stock-1536x1166.png 1536w, \/wp-content\/uploads\/2026\/11\/adobe-stock-2048x1554.png 2048w, \/wp-content\/uploads\/2026\/11\/adobe-stock-600x455.png 600w\" sizes=\"(max-width: 2098px) 100vw, 2098px\" \/><\/a><\/p>\n<p>\nIn this article, we will build <strong>StockPilot<\/strong>, a tool that converts stock photos into <strong>Adobe Stock-ready metadata<\/strong> using three stateless agents, AI models for inference, and GridDB as the data bus between steps. With this approach, we can automate the metadata generation process and reduce the need for human intervention.\n<\/p>\n<h2 id=\"how-to-run\">How to run<\/h2>\n<ol>\n<li>Clone the repository and install dependencies:<\/li>\n<\/ol>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">$ git clone https:\/\/github.com\/junwatu\/mstck-ageai\r\n$ cd mstck-ageai\r\n$ cd apps<\/code><\/pre>\n<\/div>\n<p>\nMake sure you have Node.js installed, then install all the dependencies:\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">$ npm install<\/code><\/pre>\n<\/div>\n<ol>\n<li>Set up the environment variables:<\/li>\n<\/ol>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\"># Change this to your desired port and host\r\n$ PORT=3000\r\n$ HOST=0.0.0.0\r\n\r\n# GridDB Cloud Web API\r\n$ GRIDDB_CLOUD_URL=\r\n$ GRIDDB_USERNAME=\r\n$ GRIDDB_PASSWORD=\r\n\r\n# GMI Cloud will provide AI models\r\n$ GMI_CLOUD_API_KEY=<\/code><\/pre>\n<\/div>\n<p>\nFor more information on the environment variables, read this article.\n<\/p>\n<ol>\n<li>Start the application with this command:<\/li>\n<\/ol>\n<div class=\"clipboard\">\n<pre><code class=\"language-bash\">$ npm run start<\/code><\/pre>\n<\/div>\n<p>\nGo to the application at <code>http:\/\/localhost:3000<\/code> and start selecting one of the images, submit, and get the metadata results. You can also get the CSV file on the same page.\n<\/p>\n<h2 id=\"system-architecture\">System architecture<\/h2>\n<p><a href=\"\/wp-content\/uploads\/2026\/11\/system-arch.png\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/11\/system-arch.png\" alt=\"\" width=\"1644\" height=\"1152\" class=\"aligncenter size-full wp-image-55681\" srcset=\"\/wp-content\/uploads\/2026\/11\/system-arch.png 1644w, \/wp-content\/uploads\/2026\/11\/system-arch-300x210.png 300w, \/wp-content\/uploads\/2026\/11\/system-arch-1024x718.png 1024w, \/wp-content\/uploads\/2026\/11\/system-arch-768x538.png 768w, \/wp-content\/uploads\/2026\/11\/system-arch-1536x1076.png 1536w, \/wp-content\/uploads\/2026\/11\/system-arch-600x420.png 600w\" sizes=\"(max-width: 1644px) 100vw, 1644px\" \/><\/a><\/p>\n<p>\nBasically, system architecture follows the pipeline flow as follows:\n<\/p>\n<p><strong>1. User Selects Image<\/strong>. Pipeline will assign a UUID for the selected image, save <code>filename<\/code> and <code>image_path<\/code> to the <code>images<\/code> container in GridDB.<\/p>\n<p><strong>2. Compress<\/strong>. Resizes\/compresses the image before sending it to the Vision Agent.<\/p>\n<p>  <strong>3. Vision Agent<\/strong>. This agent uses a multimodal model that analyzes the image, and the result is written to the <code>vision<\/code> container in GridDB.<\/p>\n<p><strong>4. Metadata Agent<\/strong>. Text model reads <code>vision<\/code> from GridDB, generates title, keywords, and category, then writes metadata to the <code>metadata<\/code> container in GridDB.<\/p>\n<p><strong>5. Export Agent<\/strong>. This agent doesn&#8217;t use an LLM. The task is to append one row to <code>adobe_stock.csv<\/code>.<\/p>\n<p><strong>6. Result<\/strong>. The result is shown on the client UI.<\/p>\n<h2 id=\"software-stack\">Software Stack<\/h2>\n<h3 id=\"nodejs\">Node.js<\/h3>\n<p>\nYou can install Node.js from the official website: <a href=\"https:\/\/nodejs.org\/\">https:\/\/nodejs.org<\/a>. Use the LTS version.\n<\/p>\n<h3 id=\"griddb\">GridDB<\/h3>\n<h4 id=\"sign-up-for-griddb-cloud-free-plan\">Sign Up for GridDB Cloud Free Plan<\/h4>\n<p>\nIf you would like to sign up for a GridDB Cloud Free instance, you can do so at the following link: <a href=\"https:\/\/form.ict-toshiba.jp\/download_form_griddb_cloud_freeplan_e\">https:\/\/form.ict-toshiba.jp\/download_form_griddb_cloud_freeplan_e<\/a>.\n<\/p>\n<p>\nAfter successfully signing up, you will receive a free instance along with the necessary details to access the GridDB Cloud Management GUI, including the <strong>GridDB Cloud Portal URL<\/strong>, <strong>Contract ID<\/strong>, <strong>Login<\/strong>, and <strong>Password<\/strong>.\n<\/p>\n<h4 id=\"griddb-webapi-url\">GridDB WebAPI URL<\/h4>\n<p>\nGo to the GridDB Cloud Portal and copy the WebAPI URL from the <strong>Clusters<\/strong> section. It should look like this:\n<\/p>\n<p><a href=\"\/wp-content\/uploads\/2026\/11\/griddb-cloud-portal-scaled.png\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/11\/griddb-cloud-portal-scaled.png\" alt=\"\" width=\"2560\" height=\"1265\" class=\"aligncenter size-full wp-image-55677\" srcset=\"\/wp-content\/uploads\/2026\/11\/griddb-cloud-portal-scaled.png 2560w, \/wp-content\/uploads\/2026\/11\/griddb-cloud-portal-300x148.png 300w, \/wp-content\/uploads\/2026\/11\/griddb-cloud-portal-1024x506.png 1024w, \/wp-content\/uploads\/2026\/11\/griddb-cloud-portal-768x380.png 768w, \/wp-content\/uploads\/2026\/11\/griddb-cloud-portal-1536x759.png 1536w, \/wp-content\/uploads\/2026\/11\/griddb-cloud-portal-2048x1012.png 2048w, \/wp-content\/uploads\/2026\/11\/griddb-cloud-portal-600x297.png 600w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><\/a><\/p>\n<h4 id=\"griddb-username-and-password\">GridDB Username and Password<\/h4>\n<p>\nGo to the <strong>GridDB Users<\/strong> section of the GridDB Cloud portal and create or copy the username for <code>GRIDDB_USERNAME<\/code>. The password is set when the user is created for the first time. Use this as the <code>GRIDDB_PASSWORD<\/code>.\n<\/p>\n<p><a href=\"\/wp-content\/uploads\/2026\/11\/griddb-cloud-users-scaled.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/11\/griddb-cloud-users-scaled.png\" alt=\"\" width=\"2560\" height=\"1351\" class=\"aligncenter size-full wp-image-55678\" srcset=\"\/wp-content\/uploads\/2026\/11\/griddb-cloud-users-scaled.png 2560w, \/wp-content\/uploads\/2026\/11\/griddb-cloud-users-300x158.png 300w, \/wp-content\/uploads\/2026\/11\/griddb-cloud-users-1024x540.png 1024w, \/wp-content\/uploads\/2026\/11\/griddb-cloud-users-768x405.png 768w, \/wp-content\/uploads\/2026\/11\/griddb-cloud-users-1536x810.png 1536w, \/wp-content\/uploads\/2026\/11\/griddb-cloud-users-2048x1080.png 2048w, \/wp-content\/uploads\/2026\/11\/griddb-cloud-users-600x317.png 600w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><\/a><\/p>\n<p>\nFor more details, to get started with GridDB Cloud, please follow this <a href=\"https:\/\/griddb.net\/en\/blog\/griddb-cloud-quick-start-guide\/\">quick start guide<\/a>.\n<\/p>\n<h4 id=\"ip-whitelist\">IP Whitelist<\/h4>\n<p>\nWhen running this project, please ensure that the IP address where the project is running is whitelisted. Failure to do so will result in a 403 status code or forbidden access.\n<\/p>\n<p>\nYou can use a website like <a href=\"https:\/\/whatismyipaddress.com\/\">What Is My IP Address<\/a> to find your public IP address.\n<\/p>\n<p>\nTo whitelist the IP, go to the GridDB Cloud Admin and navigate to the <strong>Network Access<\/strong> menu.\n<\/p>\n<p><a href=\"\/wp-content\/uploads\/2026\/11\/ip-whitelist-scaled.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/11\/ip-whitelist-scaled.png\" alt=\"\" width=\"2560\" height=\"1095\" class=\"aligncenter size-full wp-image-55679\" srcset=\"\/wp-content\/uploads\/2026\/11\/ip-whitelist-scaled.png 2560w, \/wp-content\/uploads\/2026\/11\/ip-whitelist-300x128.png 300w, \/wp-content\/uploads\/2026\/11\/ip-whitelist-1024x438.png 1024w, \/wp-content\/uploads\/2026\/11\/ip-whitelist-768x329.png 768w, \/wp-content\/uploads\/2026\/11\/ip-whitelist-1536x657.png 1536w, \/wp-content\/uploads\/2026\/11\/ip-whitelist-2048x876.png 2048w, \/wp-content\/uploads\/2026\/11\/ip-whitelist-600x257.png 600w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><\/a><\/p>\n<h2 id=\"gmi-cloud\">GMI Cloud<\/h2>\n<p><a href=\"https:\/\/gmicloud.ai\">GMI Cloud<\/a> is an inference provider that provides access to AI models. We will use two models: <code>Qwen\/Qwen3.5-35B-A3B<\/code> for Vision and <code>Qwen\/Qwen3.6-Plus<\/code> for Metadata.<\/p>\n<p>\nYou need an API key from GMI Cloud to use these models. Go to this <a href=\"https:\/\/console.gmicloud.ai\/user-setting\/api-keys\">GMI Cloud API key page<\/a> to get one.\n<\/p>\n<h2 id=\"technical-implementation-details\">Technical implementation details<\/h2>\n<h2 id=\"ai-agents\">AI Agents<\/h2>\n<p>\nIn this project, we need three agents: <strong>Vision<\/strong>, <strong>Metadata<\/strong>, and <strong>Export<\/strong>.\n<\/p>\n<p>\nThis is the summary of the agents and their responsibilities:\n<\/p>\n<table style=\"border-collapse: collapse; width: 100%; margin: 1em 0; table-layout: fixed;\">\n<colgroup>\n<col style=\"width: 14%;\">\n<col style=\"width: 24%;\">\n<col style=\"width: 26%;\">\n<col style=\"width: 36%;\">\n<\/colgroup>\n<thead>\n<tr>\n<th style=\"border: 1px solid #ddd; padding: 8px; background-color: #2c3e50; color: #fff; text-align: left;\">Agent<\/th>\n<th style=\"border: 1px solid #ddd; padding: 8px; background-color: #2c3e50; color: #fff; text-align: left;\">Model (GMI Cloud)<\/th>\n<th style=\"border: 1px solid #ddd; padding: 8px; background-color: #2c3e50; color: #fff; text-align: left;\">GridDB<\/th>\n<th style=\"border: 1px solid #ddd; padding: 8px; background-color: #2c3e50; color: #fff; text-align: left;\">Output<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><strong>Vision<\/strong><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code style=\"word-break: break-all;\">Qwen\/Qwen3.5-35B-A3B<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\">writes <code>vision<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top; hyphens: none;\">description, objects, scene, style, colors, concepts, mood<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><strong>Metadata<\/strong><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code style=\"word-break: break-all;\">Qwen\/Qwen3.6-Plus<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\">reads <code>vision<\/code>, writes <code>metadata<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top; hyphens: none;\">title, description, category (1-21), keywords (max 49)<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><strong>Export<\/strong><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\">None (no LLM)<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\">reads <code>metadata<\/code> (in pipeline)<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top; hyphens: none;\">CSV: <code>Filename<\/code>, <code>Title<\/code>, <code>Keywords<\/code>, <code>Category<\/code>, <code>Releases<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\nFor more details, see the individual agent sections below.\n<\/p>\n<h3 id=\"vision-agent\">Vision Agent<\/h3>\n<p>\nThis agent function is responsible for analyzing an input image (provided as a base64-encoded) and generating structured metadata using an AI model (e.g., <code>Qwen\/Qwen3.5-35B-A3B<\/code>). The output is saved to <code>vision<\/code> container in <strong>GridDB<\/strong>.\n<\/p>\n<p>\nThe main code for this agent is shown below:\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-typescript\">export async function runVisionAgent(\r\n  client: OpenAI,\r\n  imageDataUrl: string,\r\n  context: VisionAgentContext,\r\n): Promise&lt;VisionResult&gt; {\r\n  const { visionModel } = loadModelConfig();\r\n  logAgent(&#x27;vision&#x27;, `running with ${visionModel}`);\r\n\r\n  const vision = await chatJson(\r\n    client,\r\n    visionModel,\r\n    [\r\n      {\r\n        role: &#x27;system&#x27;,\r\n        content:\r\n          &#x27;You analyze stock photos for metadata generation. Return JSON only with keys: description, objects, scene, style, colors, concepts, mood.&#x27;,\r\n      },\r\n      {\r\n        role: &#x27;user&#x27;,\r\n        content: [\r\n          { type: &#x27;text&#x27;, text: &#x27;Analyze this stock photo.&#x27; },\r\n          { type: &#x27;image_url&#x27;, image_url: { url: imageDataUrl } },\r\n        ],\r\n      },\r\n    ],\r\n    VisionSchema,\r\n    { maxTokens: 800, label: &#x27;vision-agent&#x27; },\r\n  );<\/code><\/pre>\n<\/div>\n<p>\nThe code above will scan the image, stores the generated metadata in GridDB for the next agent (Metadata Agent) to use. The agent&#8217;s JSON response is validated against <code>VisionSchema<\/code> and includes:\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-json\">{\r\n  description: string;  \/\/ e.g., &quot;A serene mountain landscape at sunset&quot;\r\n  objects: string[];    \/\/ e.g., [&quot;mountain&quot;, &quot;lake&quot;, &quot;trees&quot;]\r\n  scene: string;        \/\/ e.g., &quot;outdoor, nature&quot;\r\n  style: string;        \/\/ e.g., &quot;photorealistic&quot;\r\n  colors: string[];     \/\/ e.g., [&quot;blue&quot;, &quot;orange&quot;, &quot;green&quot;]\r\n  concepts: string[];   \/\/ e.g., [&quot;tranquility&quot;, &quot;adventure&quot;]\r\n  mood: string;         \/\/ e.g., &quot;calm&quot;\r\n}<\/code><\/pre>\n<\/div>\n<p>\nThe schema will make sure that the data output is always valid and structured.\n<\/p>\n<p>\nWe use Qwen 3.5 for this agent. This model is an open-weight multimodal AI model that suits our needs for stock photo analysis.\n<\/p>\n<p>\nFurthermore, because the model is open-source, you can install it locally and run it on your own hardware. For more details, see the <a href=\"https:\/\/huggingface.co\/Qwen\/Qwen3.5-35B-A3B\">Qwen 3.5 official repository<\/a>.\n<\/p>\n<h3 id=\"metadata-agent\">Metadata Agent<\/h3>\n<p>\nThe Metadata Agent takes the output from the <strong>Vision Agent<\/strong> and the original image filename, then generates <strong>Adobe Stock-ready metadata<\/strong> using an AI model. The result is saved to <strong>GridDB<\/strong> for the next agent (<strong>Export Agent<\/strong>).\n<\/p>\n<p>\nThe main code for this agent is shown below:\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-typescript\">export async function runMetadataAgent(\r\n  client: OpenAI,\r\n  input: MetadataAgentInput,\r\n): Promise&lt;MetadataResult&gt; {\r\n  const { metadataModel, keywordLimit } = loadModelConfig();\r\n  logAgent(&#x27;metadata&#x27;, `running with ${metadataModel}`);\r\n\r\n  const vision = await getVisionRecord(input.griddb, input.imageId);\r\n\r\n  const metadata = await chatJson(\r\n    client,\r\n    metadataModel,\r\n    [\r\n      {\r\n        role: &#x27;system&#x27;,\r\n        content: `You generate Adobe Stock metadata.\r\nUse the filename exactly as provided \u2014 do not invent a new filename.\r\n\r\n${CATEGORY_SELECTION_RULES}\r\n\r\nSelect exactly one category number from this list:\r\n${CATEGORY_PROMPT_LIST}\r\n\r\nReturn JSON with: title, description, category (number), keywords (max ${keywordLimit} strings).`,\r\n      },\r\n      {\r\n        role: &#x27;user&#x27;,\r\n        content: `Filename: ${input.filename}\\nVision analysis:\\n${JSON.stringify(vision)}`,\r\n      },\r\n    ],\r\n    MetadataSchema,\r\n    { maxTokens: 1000, label: &#x27;metadata-agent&#x27; },\r\n  );\r\n\r\n  await saveMetadataRecord(input.griddb, input.imageId, metadata);\r\n  return metadata;\r\n}<\/code><\/pre>\n<\/div>\n<p>\nThe system prompt defines the metadata generation rules to ensure the output conforms to Adobe&#8217;s CSV format.\n<\/p>\n<p>\nHere is an example of the real sample of Adobe Stock metadata:\n<\/p>\n<p><a href=\"\/wp-content\/uploads\/2026\/11\/adobe-csv.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/11\/adobe-csv.png\" alt=\"\" width=\"1948\" height=\"418\" class=\"aligncenter size-full wp-image-55675\" srcset=\"\/wp-content\/uploads\/2026\/11\/adobe-csv.png 1948w, \/wp-content\/uploads\/2026\/11\/adobe-csv-300x64.png 300w, \/wp-content\/uploads\/2026\/11\/adobe-csv-1024x220.png 1024w, \/wp-content\/uploads\/2026\/11\/adobe-csv-768x165.png 768w, \/wp-content\/uploads\/2026\/11\/adobe-csv-1536x330.png 1536w, \/wp-content\/uploads\/2026\/11\/adobe-csv-600x129.png 600w\" sizes=\"(max-width: 1948px) 100vw, 1948px\" \/><\/a><\/p>\n<p>\nOne important thing to note is that the category list is fixed and predefined. So the model shouldn&#8217;t generate categories that are not in the list.\n<\/p>\n<p>\nThe file <code>categories.ts<\/code> contains the predefined list of categories that was manually taken from the Adobe Stock category list.\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-typescript\">\r\nexport const ADOBE_CATEGORIES = [\r\n  &#x27;Animals&#x27;,\r\n  &#x27;Buildings and Architecture&#x27;,\r\n  &#x27;Business&#x27;,\r\n  &#x27;Drinks&#x27;,\r\n  &#x27;The Environment&#x27;,\r\n  &#x27;States of Mind&#x27;,\r\n  &#x27;...&#x27;\r\n] as const;<\/code><\/pre>\n<\/div>\n<p>\nThe following example demonstrates how this agent works:\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-typescript\">const metadataResult = await runMetadataAgent(openaiClient, {\r\n  imageId: &quot;123e4567-e89b-12d3-a456-426614174000&quot;,\r\n  filename: &quot;golden-retriever.jpg&quot;,\r\n  griddb,\r\n});<\/code><\/pre>\n<\/div>\n<p>\nThis would generate metadata like:\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-typescript\">{\r\n  &quot;title&quot;: &quot;Golden Retriever Playing Fetch&quot;,\r\n  &quot;description&quot;: &quot;A golden retriever joyfully leaps to catch a tennis ball in a green park.&quot;,\r\n  &quot;category&quot;: 5,  \/\/ e.g., &quot;Animals&quot;\r\n  &quot;keywords&quot;: [&quot;dog&quot;, &quot;golden retriever&quot;, &quot;play&quot;, &quot;fetch&quot;, &quot;park&quot;, &quot;summer&quot;, &quot;happy&quot;]\r\n}<\/code><\/pre>\n<\/div>\n<p>\nThen, the output metadata is written to the <code>metadata<\/code> container in GridDB.\n<\/p>\n<h3 id=\"export-agent\">Export Agent<\/h3>\n<p>\nThis agent takes the <strong>metadata<\/strong> generated by the Metadata Agent and exports it to a <strong>CSV file<\/strong> formatted for Adobe Stock uploads.\n<\/p>\n<p>\nThe main code for this agent is shown below:\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-typescript\">export function runExportAgent(\r\n  rows: ExportRow[],\r\n  options: { outputDir?: string } = {},\r\n): ExportResult {\r\n  const outputDir = options.outputDir ?? resolve(appsRoot, &#x27;output&#x27;);\r\n  mkdirSync(outputDir, { recursive: true });\r\n\r\n  const csvPath = resolve(outputDir, &#x27;adobe_stock.csv&#x27;);\r\n  const lines = [CSV_HEADER, ...rows.map(toCsvRow)];\r\n\r\n  writeFileSync(csvPath, `${lines.join(&#x27;\\n&#x27;)}\\n`, &#x27;utf8&#x27;);\r\n\r\n  logAgent(&#x27;export&#x27;, `wrote ${csvPath}`, { rows: rows.length });\r\n\r\n  return {\r\n    csvPath,\r\n    exported: rows.length &gt; 0,\r\n    rowCount: rows.length,\r\n  };\r\n}<\/code><\/pre>\n<\/div>\n<p>\nThis agent will create a CSV file from the pipeline result and save it to the <code>output<\/code> directory.\n<\/p>\n<p>\nThe CSV includes columns for <code>Filename<\/code>, <code>Title<\/code>, <code>Keywords<\/code>, <code>Category<\/code>, and <code>Releases<\/code>. Pay attention to the filename column; do not change it because Adobe will use it to map to the image on Adobe Stock with CSV data.\n<\/p>\n<h2 id=\"griddb\">GridDB<\/h2>\n<p>\nStockPilot is a three-agent pipeline, but the agents do not call each other directly. GridDB Cloud here sits <strong>between<\/strong> agents like a bus data line.\n<\/p>\n<p>\nHere is the data flow:\n<\/p>\n<ul>\n<li>Each image gets a UUID (<code>image_id<\/code>).<\/li>\n<li>The pipeline registers it in <code>images<\/code>. <\/li>\n<li>Vision Agent writes <code>vision<\/code>.<\/li>\n<li>Metadata Agent <strong>reads<\/strong> <code>vision<\/code> from the database (not from memory), then writes <code>metadata<\/code>.<\/li>\n<li>Export Agent still builds the CSV from the pipeline result, but every AI step is persisted.<\/li>\n<\/ul>\n<p>\nSo, all containers read and write to GridDB Cloud using <code>image_id<\/code> as the key and every agents data is persisted in the database.\n<\/p>\n<table style=\"border-collapse: collapse; width: 100%; margin: 1em 0; table-layout: fixed;\">\n<colgroup>\n<col style=\"width: 18%;\">\n<col style=\"width: 18%;\">\n<col style=\"width: 30%;\">\n<col style=\"width: 34%;\">\n<\/colgroup>\n<thead>\n<tr>\n<th style=\"border: 1px solid #ddd; padding: 8px; background-color: #2c3e50; color: #fff; text-align: left;\">Container<\/th>\n<th style=\"border: 1px solid #ddd; padding: 8px; background-color: #2c3e50; color: #fff; text-align: left;\">Row key<\/th>\n<th style=\"border: 1px solid #ddd; padding: 8px; background-color: #2c3e50; color: #fff; text-align: left;\">Written by<\/th>\n<th style=\"border: 1px solid #ddd; padding: 8px; background-color: #2c3e50; color: #fff; text-align: left;\">Read by<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code>images<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code>image_id<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top; hyphens: none;\">Pipeline<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top; hyphens: none;\">Not read by an agent<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code>vision<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code>image_id<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top; hyphens: none;\">Vision agent<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top; hyphens: none;\">Metadata agent<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code>metadata<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code>image_id<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top; hyphens: none;\">Metadata agent<\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top; hyphens: none;\">Export (via pipeline)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\nAll the containers has schemas defined for <code>images<\/code>, <code>vision<\/code>, and <code>metadata<\/code>. You can look at the schema definitions for all containers in the <code>apps\/server\/src\/schemas<\/code> directory.\n<\/p>\n<p>\nFor example, the <code>vision<\/code> schema is defined in <code>apps\/server\/src\/schemas\/vision.ts<\/code>.\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-typescript\">{\r\n  image_id: &quot;STRING&quot;,\r\n  description: &quot;STRING&quot;,\r\n  objects: &quot;STRING&quot;,  \/\/ JSON-encoded array\r\n  scene: &quot;STRING&quot;,\r\n  style: &quot;STRING&quot;,\r\n  colors: &quot;STRING&quot;,   \/\/ JSON-encoded array\r\n  concepts: &quot;STRING&quot;, \/\/ JSON-encoded array\r\n  mood: &quot;STRING&quot;,\r\n  created_at: &quot;STRING&quot;,\r\n}<\/code><\/pre>\n<\/div>\n<p>\nGridDB doesn\u2019t natively support arrays or nested objects, so arrays (e.g.,<code>colors<\/code>, <code>objects<\/code>) are <strong>JSON-encoded<\/strong> before storage and <strong>decoded<\/strong> when retrieved.\n<\/p>\n<p>\nThe <code>griddb-store.js<\/code> is the central code for GridDB in this project. It serves as the <strong>primary interface<\/strong> between our Agentic AI pipeline and GridDB, handling all interactions with the database.\n<\/p>\n<p>\nLet&#8217;s look at a few code snippets to understand how GridDB is used in this project.\n<\/p>\n<h3 id=\"save-vision-record\">Save vision record<\/h3>\n<p>\nThe <strong><code>saveVisionRecord<\/code><\/strong> function is called by the <strong>Vision Agent<\/strong> to store its AI analysis of an image in GridDB.\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-typescript\">export async function saveVisionRecord(\r\n  griddb: GridDB,\r\n  imageId: string,\r\n  vision: VisionResult,\r\n): Promise&lt;void&gt; {\r\n  await griddb.insert({\r\n    containerName: CONTAINERS.vision,\r\n    data: {\r\n      image_id: imageId,\r\n      description: vision.description,\r\n      objects: encodeJson(vision.objects),\r\n      scene: vision.scene,\r\n      style: vision.style,\r\n      colors: encodeJson(vision.colors),\r\n      concepts: encodeJson(vision.concepts),\r\n      mood: vision.mood,\r\n      created_at: nowIso(),\r\n    },\r\n    schema: STOCKPILOT_SCHEMAS.vision,\r\n  });\r\n  logAgent(&#x27;griddb&#x27;, &#x27;saved vision&#x27;, { imageId });\r\n}<\/code><\/pre>\n<\/div>\n<p>\nThe <code>schema<\/code> parameter ensures that the data is validated against the <code>vision<\/code> schema before insertion. This data is later used by the <strong>Metadata Agent<\/strong> to generate stock photo metadata.\n<\/p>\n<p>\nThe save vision method internally will called <code>griddb.insert()<\/code> to insert the data into the <code>vision<\/code> container. This comes from the npm package <code>@junwatu\/griddb-client<\/code>.\n<\/p>\n<h3 id=\"get-metadata\">Get Metadata<\/h3>\n<p>\nThis is the <code>getMetadataRecord<\/code> function that retrieves a metadata record from the <code>metadata<\/code> container in GridDB.\n<\/p>\n<p>\nThere are other functions in <code>griddb-store.ts<\/code> that handle other database operations, but this function is important because it contains the category and keywords data from image AI analysis.\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-typescript\">export async function getMetadataRecord(\r\n  griddb: GridDB,\r\n  imageId: string,\r\n): Promise&lt;MetadataResult | null&gt; {\r\n  const row = await griddb.selectOne&lt;Record&lt;string, unknown&gt;&gt;({\r\n    containerName: CONTAINERS.metadata,\r\n    where: `image_id = &#x27;${imageId}&#x27;`,\r\n  });\r\n\r\n  if (!row) {\r\n    return null;\r\n  }\r\n\r\n  return {\r\n    title: String(row.title ?? &#x27;&#x27;),\r\n    description: String(row.description ?? &#x27;&#x27;),\r\n    category: Number(row.category),\r\n    keywords: decodeJsonArray(row.keywords, &#x27;keywords&#x27;),\r\n  };\r\n}<\/code><\/pre>\n<\/div>\n<p>\nThe function will get the metadata record from the <code>metadata<\/code> container in GridDB based on the <code>imageId<\/code>, and the returned data will be used by the pipeline to make the Export Agent save the metadata into a CSV file.\n<\/p>\n<h2 id=\"api-server\">API server<\/h2>\n<p>\nStockPilot exposes its agent pipeline over HTTP so a UI client can trigger scans and read results from GridDB.\n<\/p>\n<p>\nWe use <a href=\"https:\/\/fastify.dev\/\">Fastify<\/a> to expose the pipeline to a UI client. GridDB initialization runs <strong>on server start only<\/strong>, not per request.\n<\/p>\n<h3 id=\"api-routes\">API routes<\/h3>\n<table style=\"border-collapse: collapse; width: 100%; margin: 1em 0; table-layout: fixed;\">\n<colgroup>\n<col style=\"width: 11%;\">\n<col style=\"width: 27%;\">\n<col style=\"width: 24%;\">\n<col style=\"width: 38%;\">\n<\/colgroup>\n<thead>\n<tr>\n<th style=\"border: 1px solid #ddd; padding: 8px; background-color: #2c3e50; color: #fff; text-align: left;\">Method<\/th>\n<th style=\"border: 1px solid #ddd; padding: 8px; background-color: #2c3e50; color: #fff; text-align: left;\">Path<\/th>\n<th style=\"border: 1px solid #ddd; padding: 8px; background-color: #2c3e50; color: #fff; text-align: left;\">File<\/th>\n<th style=\"border: 1px solid #ddd; padding: 8px; background-color: #2c3e50; color: #fff; text-align: left;\">Purpose<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code>GET<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code style=\"word-break: break-all;\">\/api\/health<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code style=\"word-break: break-all;\">routes\/health.ts<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top; hyphens: none;\">Liveness + GridDB container status<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code>POST<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code style=\"word-break: break-all;\">\/api\/pipeline\/scan<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code style=\"word-break: break-all;\">routes\/pipeline.ts<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top; hyphens: none;\">Run full agent pipeline on one image<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code>GET<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code style=\"word-break: break-all;\">\/api\/images\/:imageId<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top;\"><code style=\"word-break: break-all;\">routes\/images.ts<\/code><\/td>\n<td style=\"border: 1px solid #ddd; padding: 8px; vertical-align: top; hyphens: none;\">Read vision + metadata from GridDB<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\nBase URL: <code>http:\/\/localhost:3000<\/code>, but you can easily override by changing <code>PORT<\/code> or <code>HOST<\/code> in <code>.env<\/code>.\n<\/p>\n<p>\nThe code for server routes can be found in the <code>server\/src\/server\/routes<\/code> directory. For example, the code in <code>routes\/images.ts<\/code> is responsible for the <code>\/api\/images\/:imageId<\/code> route:\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-typescript\">\r\nexport async function registerImageRoutes(\r\n  app: FastifyInstance,\r\n  ctx: AppContext,\r\n): Promise&lt;void&gt; {\r\n  app.get&lt;{ Params: { imageId: string } }&gt;(&#x27;\/api\/images\/:imageId&#x27;, async (request, reply) =&gt; {\r\n    const { imageId } = request.params;\r\n\r\n    const [vision, metadata] = await Promise.all([\r\n      getVisionRecord(ctx.griddb, imageId).catch(() =&gt; null),\r\n      getMetadataRecord(ctx.griddb, imageId),\r\n    ]);\r\n\r\n    if (!vision &amp;&amp; !metadata) {\r\n      return reply.status(404).send({ error: `No records for image_id=${imageId}` });\r\n    }\r\n\r\n    return {\r\n      imageId,\r\n      vision,\r\n      metadata: metadata\r\n        ? {\r\n            ...metadata,\r\n            categoryName: categoryName(metadata.category),\r\n          }\r\n        : null,\r\n    };\r\n  });\r\n}<\/code><\/pre>\n<\/div>\n<p>\nThe code will fetch the vision and metadata records from GridDB and return them as a JSON response than expose the data to the UI client.\n<\/p>\n<p><strong>Example Response<\/strong><\/p>\n<p>\nFor a request to <code>\/api\/images\/123e4567-e89b-12d3-a456-426614174000<\/code>, the response might look like this:\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-json\">{\r\n  &quot;imageId&quot;: &quot;123e4567-e89b-12d3-a456-426614174000&quot;,\r\n  &quot;vision&quot;: {\r\n    &quot;description&quot;: &quot;A golden retriever playing with a ball in a park&quot;,\r\n    &quot;objects&quot;: [&quot;dog&quot;, &quot;ball&quot;, &quot;grass&quot;],\r\n    &quot;scene&quot;: &quot;outdoor, park&quot;,\r\n    &quot;style&quot;: &quot;photorealistic&quot;,\r\n    &quot;colors&quot;: [&quot;golden&quot;, &quot;green&quot;],\r\n    &quot;concepts&quot;: [&quot;joy&quot;, &quot;playfulness&quot;],\r\n    &quot;mood&quot;: &quot;happy&quot;\r\n  },\r\n  &quot;metadata&quot;: {\r\n    &quot;title&quot;: &quot;Golden Retriever Playing Fetch&quot;,\r\n    &quot;description&quot;: &quot;A happy golden retriever catches a ball in a sunny park.&quot;,\r\n    &quot;category&quot;: 5,\r\n    &quot;keywords&quot;: [&quot;dog&quot;, &quot;golden retriever&quot;, &quot;play&quot;, &quot;park&quot;, &quot;summer&quot;],\r\n    &quot;categoryName&quot;: &quot;Animals&quot;\r\n  }\r\n}<\/code><\/pre>\n<\/div>\n<h2 id=\"ai-inference\">AI Inference<\/h2>\n<p>\nAll this functionality won&#8217;t be successful without the help of AI models. In this project, we use the GMI Cloud provider to provide the Qwen3.5 models.\n<\/p>\n<p>\nThe <code>gmi.ts<\/code> is the bridge that connects our agents with the AI models. Since the GMI Cloud API supports OpenAI API, we can easily use the <code>openai<\/code> package to interact with the Qwen3.5 models.\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-typescript\">export function createGmiClient(): OpenAI {\r\n  const apiKey = process.env.GMI_CLOUD_API_KEY;\r\n  if (!apiKey) {\r\n    throw new Error(&#x27;GMI_CLOUD_API_KEY is not set in apps\/.env&#x27;);\r\n  }\r\n\r\n  return new OpenAI({\r\n    apiKey,\r\n    baseURL: GMI_BASE_URL,\r\n  });\r\n}\r\n\r\nexport async function chat(\r\n  client: OpenAI,\r\n  model: string,\r\n  messages: OpenAI.Chat.Completions.ChatCompletionMessageParam[],\r\n  options?: { json?: boolean; maxTokens?: number },\r\n): Promise&lt;string&gt; {\r\n  const response = await client.chat.completions.create({\r\n    model,\r\n    messages,\r\n    max_tokens: options?.maxTokens ?? 1024,\r\n    temperature: 0,\r\n    ...(options?.json ? { response_format: { type: &#x27;json_object&#x27; } } : {}),\r\n  });\r\n\r\n  const content = response.choices[0]?.message?.content;\r\n  if (!content) {\r\n    throw new Error(`Empty response from model: ${model}`);\r\n  }\r\n\r\n  return content;\r\n}<\/code><\/pre>\n<\/div>\n<p>\nThe above code basically creates a connection to the GMI Cloud API and provides a <code>chat<\/code> function to interact with the Qwen3.5 models.\n<\/p>\n<p>\nIf you want to change to another similar model, you can simply update the <code>config\/models.json<\/code> file.\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-json\">{\r\n  &quot;visionModel&quot;: &quot;Qwen\/Qwen3.5-35B-A3B&quot;,\r\n  &quot;metadataModel&quot;: &quot;Qwen\/Qwen3.6-Plus&quot;,\r\n  &quot;keywordLimit&quot;: 49,\r\n  &quot;compress&quot;: true,\r\n  &quot;quality&quot;: 95\r\n}<\/code><\/pre>\n<\/div>\n<h2 id=\"user-interface\">User Interface<\/h2>\n<p><a href=\"\/wp-content\/uploads\/2026\/11\/ui-app.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/11\/ui-app.png\" alt=\"\" width=\"1950\" height=\"1472\" class=\"aligncenter size-full wp-image-55682\" srcset=\"\/wp-content\/uploads\/2026\/11\/ui-app.png 1950w, \/wp-content\/uploads\/2026\/11\/ui-app-300x226.png 300w, \/wp-content\/uploads\/2026\/11\/ui-app-1024x773.png 1024w, \/wp-content\/uploads\/2026\/11\/ui-app-768x580.png 768w, \/wp-content\/uploads\/2026\/11\/ui-app-1536x1159.png 1536w, \/wp-content\/uploads\/2026\/11\/ui-app-600x453.png 600w\" sizes=\"(max-width: 1950px) 100vw, 1950px\" \/><\/a><\/p>\n<p>\nThe app allows users to select an image from the gallery and submit it for vision and metadata extraction.\n<\/p>\n<p>\nThe UI flow is simple:\n<\/p>\n<p>\nUsers can select an image from the gallery and submit it for vision and metadata extraction by clicking the &#8220;Generate metadata&#8221; button.\n<\/p>\n<p>\nAll connections to the server are centralized in <code>apps\/web\/src\/api\/client.ts<\/code>. This file acts as the <strong>API client layer<\/strong>, abstracting all HTTP requests to the backend. So, every operation on the server is handled through this code.\n<\/p>\n<p>\nThis is the main code that triggers the server pipeline to extract vision, metadata, and export the results as CSV for a single image.\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-typescript\">export async function scanImage(filename: string): Promise&lt;ScanResponse&gt; {\r\n  const response = await fetch(`${API_BASE_URL}\/scan`, {\r\n    method: &#x27;POST&#x27;,\r\n    headers: { &#x27;Content-Type&#x27;: &#x27;application\/json&#x27; },\r\n    body: JSON.stringify({ filename }),\r\n  });\r\n  if (!response.ok) throw new Error(&#x27;Scan failed&#x27;);\r\n  return response.json();\r\n}<\/code><\/pre>\n<\/div>\n<p>\nBasically, this function sends a POST request to the <code>\/api\/pipeline\/scan<\/code> route and returns the server&#8217;s response:\n<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-typescript\">{\r\n  imageId: string;          \/\/ UUID of the image\r\n  vision: VisionResult;     \/\/ Vision Agent output (description, objects, etc.)\r\n  metadata: MetadataResult; \/\/ Metadata Agent output (title, description, etc.)\r\n}<\/code><\/pre>\n<\/div>\n<p>\nLater, this response is processed by the frontend to display the results to the user.\n<\/p>\n<h3 id=\"result-panel\">Result Panel<\/h3>\n<p>\nThis panel displays the vision and metadata results after the image is submitted and also the CSV result file.\n<\/p>\n<p><a href=\"\/wp-content\/uploads\/2026\/11\/ui-response.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/11\/ui-response.png\" alt=\"\" width=\"2050\" height=\"1708\" class=\"aligncenter size-full wp-image-55683\" srcset=\"\/wp-content\/uploads\/2026\/11\/ui-response.png 2050w, \/wp-content\/uploads\/2026\/11\/ui-response-300x250.png 300w, \/wp-content\/uploads\/2026\/11\/ui-response-1024x853.png 1024w, \/wp-content\/uploads\/2026\/11\/ui-response-768x640.png 768w, \/wp-content\/uploads\/2026\/11\/ui-response-1536x1280.png 1536w, \/wp-content\/uploads\/2026\/11\/ui-response-2048x1706.png 2048w, \/wp-content\/uploads\/2026\/11\/ui-response-600x500.png 600w\" sizes=\"(max-width: 2050px) 100vw, 2050px\" \/><\/a><\/p>\n<h2 id=\"further-enhancements\">Further Enhancements<\/h2>\n<p>\nFor further enhancements, a production build would add:\n<\/p>\n<ul>\n<li><strong>Upload Interface<\/strong> so users can upload any images.<\/li>\n<li><strong>Reviewer Agent<\/strong> to check quality score.<\/li>\n<li><strong>Similarity Agent<\/strong> to reuse past metadata via GridDB search.<\/li>\n<li><strong>Batch<\/strong> for many images processing.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Overview Microstock refers to a business model in the stock photography, illustration, and media industry where creators (photographers, designers, videographers) upload their work to online platforms and license it to customers for a small fee (&#8220;micro&#8221; pricing). These platforms aggregate content from thousands of contributors and make it available for purchase by individuals, businesses, or [&hellip;]<\/p>\n","protected":false},"author":779,"featured_media":55680,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-55672","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Building Microstock AI Agents with GridDB | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"Overview Microstock refers to a business model in the stock photography, illustration, and media industry where creators (photographers, designers,\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building Microstock AI Agents with GridDB | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"Overview Microstock refers to a business model in the stock photography, illustration, and media industry where creators (photographers, designers,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-20T08:32:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.griddb.net\/wp-content\/uploads\/2026\/11\/microstock-ai-agents.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1774\" \/>\n\t<meta property=\"og:image:height\" content=\"887\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"reviewer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"reviewer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.griddb.net\\\/en\\\/blog\\\/building-microstock-ai-agents-with-griddb\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.griddb.net\\\/en\\\/blog\\\/building-microstock-ai-agents-with-griddb\\\/\"},\"author\":{\"name\":\"reviewer\",\"@id\":\"https:\\\/\\\/www.griddb.net\\\/#\\\/schema\\\/person\\\/9796b06dbb0e63dcaaf67892e45c3df2\"},\"headline\":\"Building Microstock AI Agents with GridDB\",\"datePublished\":\"2026-11-20T08:32:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.griddb.net\\\/en\\\/blog\\\/building-microstock-ai-agents-with-griddb\\\/\"},\"wordCount\":1874,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.griddb.net\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.griddb.net\\\/en\\\/blog\\\/building-microstock-ai-agents-with-griddb\\\/#primaryimage\"},\"thumbnailUrl\":\"\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/microstock-ai-agents.jpeg\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.griddb.net\\\/en\\\/blog\\\/building-microstock-ai-agents-with-griddb\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.griddb.net\\\/en\\\/blog\\\/building-microstock-ai-agents-with-griddb\\\/\",\"url\":\"https:\\\/\\\/www.griddb.net\\\/en\\\/blog\\\/building-microstock-ai-agents-with-griddb\\\/\",\"name\":\"Building Microstock AI Agents with GridDB | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.griddb.net\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.griddb.net\\\/en\\\/blog\\\/building-microstock-ai-agents-with-griddb\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.griddb.net\\\/en\\\/blog\\\/building-microstock-ai-agents-with-griddb\\\/#primaryimage\"},\"thumbnailUrl\":\"\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/microstock-ai-agents.jpeg\",\"datePublished\":\"2026-11-20T08:32:38+00:00\",\"description\":\"Overview Microstock refers to a business model in the stock photography, illustration, and media industry where creators (photographers, designers,\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.griddb.net\\\/en\\\/blog\\\/building-microstock-ai-agents-with-griddb\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.griddb.net\\\/en\\\/blog\\\/building-microstock-ai-agents-with-griddb\\\/#primaryimage\",\"url\":\"\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/microstock-ai-agents.jpeg\",\"contentUrl\":\"\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/microstock-ai-agents.jpeg\",\"width\":1774,\"height\":887},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.griddb.net\\\/#website\",\"url\":\"https:\\\/\\\/www.griddb.net\\\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.griddb.net\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.griddb.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.griddb.net\\\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\\\/\\\/www.griddb.net\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.griddb.net\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.griddb.net\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\\\/\\\/www.griddb.net\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\\\/\\\/www.griddb.net\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/griddbcommunity\\\/\",\"https:\\\/\\\/x.com\\\/GridDBCommunity\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.griddb.net\\\/#\\\/schema\\\/person\\\/9796b06dbb0e63dcaaf67892e45c3df2\",\"name\":\"reviewer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/56c7498f718fe0de13a8d0595e73985d070bf1fb1bcd75b4f3d4de32b5c7ad46?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/56c7498f718fe0de13a8d0595e73985d070bf1fb1bcd75b4f3d4de32b5c7ad46?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/56c7498f718fe0de13a8d0595e73985d070bf1fb1bcd75b4f3d4de32b5c7ad46?s=96&d=mm&r=g\",\"caption\":\"reviewer\"},\"url\":\"https:\\\/\\\/www.griddb.net\\\/en\\\/author\\\/reviewer\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building Microstock AI Agents with GridDB | GridDB: Open Source Time Series Database for IoT","description":"Overview Microstock refers to a business model in the stock photography, illustration, and media industry where creators (photographers, designers,","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:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/","og_locale":"en_US","og_type":"article","og_title":"Building Microstock AI Agents with GridDB | GridDB: Open Source Time Series Database for IoT","og_description":"Overview Microstock refers to a business model in the stock photography, illustration, and media industry where creators (photographers, designers,","og_url":"https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2026-11-20T08:32:38+00:00","og_image":[{"width":1774,"height":887,"url":"https:\/\/www.griddb.net\/wp-content\/uploads\/2026\/11\/microstock-ai-agents.jpeg","type":"image\/jpeg"}],"author":"reviewer","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"Written by":"reviewer","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/#article","isPartOf":{"@id":"https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/"},"author":{"name":"reviewer","@id":"https:\/\/www.griddb.net\/#\/schema\/person\/9796b06dbb0e63dcaaf67892e45c3df2"},"headline":"Building Microstock AI Agents with GridDB","datePublished":"2026-11-20T08:32:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/"},"wordCount":1874,"commentCount":0,"publisher":{"@id":"https:\/\/www.griddb.net\/#organization"},"image":{"@id":"https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2026\/11\/microstock-ai-agents.jpeg","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/","url":"https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/","name":"Building Microstock AI Agents with GridDB | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/www.griddb.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/#primaryimage"},"image":{"@id":"https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2026\/11\/microstock-ai-agents.jpeg","datePublished":"2026-11-20T08:32:38+00:00","description":"Overview Microstock refers to a business model in the stock photography, illustration, and media industry where creators (photographers, designers,","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.griddb.net\/en\/blog\/building-microstock-ai-agents-with-griddb\/#primaryimage","url":"\/wp-content\/uploads\/2026\/11\/microstock-ai-agents.jpeg","contentUrl":"\/wp-content\/uploads\/2026\/11\/microstock-ai-agents.jpeg","width":1774,"height":887},{"@type":"WebSite","@id":"https:\/\/www.griddb.net\/#website","url":"https:\/\/www.griddb.net\/","name":"GridDB: Open Source Time Series Database for IoT","description":"","publisher":{"@id":"https:\/\/www.griddb.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.griddb.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.griddb.net\/#organization","name":"Fixstars","url":"https:\/\/www.griddb.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.griddb.net\/#\/schema\/logo\/image\/","url":"https:\/\/www.griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/www.griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/www.griddb.net\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/www.griddb.net\/#\/schema\/person\/9796b06dbb0e63dcaaf67892e45c3df2","name":"reviewer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/56c7498f718fe0de13a8d0595e73985d070bf1fb1bcd75b4f3d4de32b5c7ad46?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/56c7498f718fe0de13a8d0595e73985d070bf1fb1bcd75b4f3d4de32b5c7ad46?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/56c7498f718fe0de13a8d0595e73985d070bf1fb1bcd75b4f3d4de32b5c7ad46?s=96&d=mm&r=g","caption":"reviewer"},"url":"https:\/\/www.griddb.net\/en\/author\/reviewer\/"}]}},"_links":{"self":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/55672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/users\/779"}],"replies":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/comments?post=55672"}],"version-history":[{"count":3,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/55672\/revisions"}],"predecessor-version":[{"id":55684,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/55672\/revisions\/55684"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media\/55680"}],"wp:attachment":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media?parent=55672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/categories?post=55672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/tags?post=55672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}