Skip to content
All prototypes
DiscoveryResearch

Cold Start Tuning for Python Agents on Cloud Run

Measuring where the six seconds actually go on a scale-to-zero agent container, and which mitigations are worth their monthly cost.

What I'm testing

Breaking down cold start latency: container pull, Python interpreter start, dependency import, and client library initialisation.

Finding so far

Client library init is the largest single slice — lazy-initialising the Vertex AI client until first use moves meaningful time off the critical path.

A Cloud Scheduler ping every ten minutes during business hours keeps one instance warm at a fraction of min-instances=1.

Open question

Whether the perceived-latency fix (streaming a thinking indicator immediately) makes the infrastructure fix unnecessary for this traffic profile.

Stack

  • Cloud Run
  • Python
  • Cloud Scheduler