Agent architecture · Oct 2026
Summary

Four AI agents make one coloring page a day, with no one in the loop

A daily schedule wakes the studio on Google Cloud. The agents pick an idea, draw it, check it against our quality bar and publish it to coloritdaily.com.

Creative Director

Pick an idea

Looks at the season, holidays and every past page, then chooses something new.

Studio loop
Stylist

Write the brief

Turns the idea into a precise drawing prompt in the collection's style.

Generator

Draw it

Gemini draws the page, then it becomes crisp, print-ready line art.

Critic

Check and publish

Inspects the image. Publishes it only if every check passes.

↺ If the Critic finds a problem, it sends notes back to the Stylist and the page is redrawn, up to 4 times.

8 checks

A strict quality bar

No text, no borders, no shading, child-safe, on-style, easy to color, true to the brief, good anatomy.

Always fresh

A memory of every page

Each published page is stored as an embedding, so new ideas are compared against all past ones. no twin otters

Hands-off

Fully on Google Cloud

Cloud Run, Gemini on Vertex AI, Firestore, Cloud Storage and PostgreSQL. Thumbnails and colored versions are made automatically.

The daily run

The full picture: every service, agent, tool and data store, top to bottom.

1 Wake up once a day

Cloud Scheduler

Fires the daily job.

trigger-agent

Cloud Run Function. Gets an OIDC token, opens a session and sends today's date, collection, keyword, audience and style.

2 Get ready Cloud Run · FastAPI + Google ADK · /run
color-it-daily-agent

Before any agent thinks, the service sets the table.

  • Single-flight guard: a duplicate /run joins the run already in progress
  • Applies overrides from Firestore coloritdaily_config/agent_input
  • Loads the collection and picks a micro-style from the Color It Daily API
  • Looks up the user and org in PostgreSQL for on-demand requests
  • Sets target audience, defaulting to kids_3_10
  • Pre-creates the page record with status running
3 The studio all four agents run on Gemini through Vertex AI
Publisher · SequentialAgent
Ideas

Creative Director

Decides what to draw today.

get_calendar_eventsSeason, holidays within ±3 days, fun observances
get_recent_historyLast 10 published titles and tags, from Firestore
search_past_conceptsEmbeds the idea and finds the 5 closest past pages

Hands off: title, description, tags, mood and SEO copy

so we never draw the same otter twice

StudioLoop · LoopAgent · max 4 passes
Prompt

Stylist

Turns the idea into an image prompt.

no toolsPure prompt craft: subject, framing, micro-style, audience and the no-text rule

Hands off: positive_prompt

Drawing

Generator

Draws it and makes it print-ready.

generate_imageGemini image model draws a raw PNG into Cloud Storage
optimize_imagepotrace vectorizes to SVG, then renders a 2550×3300 PNG and WebP

Hands off: raw and optimized image paths

Quality

Critic

Checks it like a picky art teacher.

download_imageFetches the optimized page
inspect_image_visuallyGemini vision fills a JSON checklist; any fail is a reject
publish_to_firestoreOn pass, writes Postgres, Firestore and the embedding, then ends the loop
No bordersNo textChild-safeNo shadingOn styleEasy to colorMatches promptGood anatomy

↺ On REJECT, the Critic's feedback goes back to the Stylist, who rewrites the prompt. Up to 4 passes.

PASS
4 Where it lands files, records and memory

Cloud Storage

color-it-daily-agent-assets

  • raw/ first drafts from the image model
  • optimized/ print PNG, SVG and WebP
  • optimized/thumbnail/ and optimized/colored/

Firestore

coloring_pages

  • Every run: status, prompt, critic feedback, SEO copy
  • coloring_pages_user for on-demand pages
  • coloritdaily_config for live input overrides

Embeddings

coloring_pages_vectors

  • text-embedding-004, 768 dimensions
  • Written on publish as RETRIEVAL_DOCUMENT
  • Queried with cosine find_nearest by the Creative Director

PostgreSQL

pages · tags · page_tags

  • The published catalog the website lists
  • Slug, tags, image URLs, SEO fields
  • organization_users maps users to orgs
new file in the bucket
5 After publish Cloud Run Functions fired by Cloud Storage events
Event · optimized/

generate-thumbnail

Makes a WebP four times smaller and saves it to optimized/thumbnail/.

Event · optimized/thumbnail/

colorize

Gemini paints a colored version of the page as a guide, saves it to optimized/colored/ and updates Firestore and Postgres.

Live

coloritdaily.com

The new page appears as today's free printable, with its colored version alongside.