<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged gemini</title>
<link>https://coderlegion.com/tag/gemini</link>
<description>Powered by Question2Answer</description>
<item>
<title>I Built ArchShield: An AI Architecture &amp; Security Baseline Assistant.</title>
<link>https://coderlegion.com/32441/i-built-archshield-an-ai-architecture-security-baseline-assistant</link>
<description>&lt;p&gt;&lt;em&gt;This post is my submission for &lt;a rel=&quot;nofollow&quot; href=&quot;https://dev.to/deved/build-apps-with-google-ai-studio&quot;&gt;DEV Education Track: Build Apps with Google AI Studio&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&quot;what-i-built&quot;&gt;What I Built&lt;/h3&gt;
&lt;p&gt;I built &lt;strong&gt;ArchShield&lt;/strong&gt;, an AI-powered architecture visualizer and security baseline assistant for developers.&lt;/p&gt;
&lt;p&gt;The goal was to turn a natural-language software architecture description into a structured, interactive architecture diagram while also checking for basic security controls across the detected components.&lt;/p&gt;
&lt;p&gt;The main prompt I used was:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Build a web application called ArchShield that analyzes a software architecture described in natural language. Identify components such as frontend, backend/API, database, cache, authentication, storage, external services, AI/LLM providers, and CDN/WAF. Visualize the architecture as an interactive multi-tier technical diagram with communication paths and network exposure. Add a basic security baseline review that distinguishes CONFIRMED, NOT MENTIONED, POTENTIAL CONCERN, and NOT APPLICABLE controls. Provide actionable security recommendations and integrate Imagen to generate a visual architectural blueprint.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I then iterated on the generated application to refine the architecture visualization, security analysis, error handling, and generated blueprint experience.&lt;/p&gt;
&lt;h3 id=&quot;demo&quot;&gt;Demo&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Live application:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://archshield.ai.studio&quot;&gt;https://archshield.ai.studio&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ArchShield can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Interpret architecture descriptions using Gemini&lt;/li&gt;
&lt;li&gt;Detect frontend, backend, databases, caches, authentication, storage, external services, AI/LLM providers, and edge components&lt;/li&gt;
&lt;li&gt;Render an interactive multi-tier architecture diagram&lt;/li&gt;
&lt;li&gt;Inspect individual architecture components&lt;/li&gt;
&lt;li&gt;Perform a basic security baseline review&lt;/li&gt;
&lt;li&gt;Generate actionable security recommendations&lt;/li&gt;
&lt;li&gt;Generate a visual architecture blueprint using Imagen&lt;/li&gt;
&lt;li&gt;Export architecture and security information as Markdown and JSON&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/x7m1vvarar3d2vwkm3uc.png&quot; alt=&quot;ArchShield architecture visualization&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/qgsjhmx2qh21xb3to6v1.png&quot; alt=&quot;ArchShield security baseline&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/0c8bk9idizogv8ew9j7o.png&quot; alt=&quot;ArchShield generated architecture blueprint&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;my-experience&quot;&gt;My Experience&lt;/h3&gt;
&lt;p&gt;This track was a great demonstration of how quickly an AI-assisted development workflow can move from an idea to a working application.&lt;/p&gt;
&lt;p&gt;What surprised me most was not the initial code generation, but the iterative workflow. Gemini could generate a functional application quickly, but getting the result to behave exactly as intended still required testing, inspecting failures, and refining the instructions.&lt;/p&gt;
&lt;p&gt;I also ran into an XML parsing issue during the process. Instead of treating the generated application as finished once it worked in the preview, I used the error output to guide another iteration and corrected the generated implementation.&lt;/p&gt;
&lt;p&gt;The project also made me think about the difference between generating an application and engineering one. A working UI is only part of the result. Clear boundaries, predictable behavior, useful security guidance, and honest handling of uncertainty matter just as much.&lt;/p&gt;
&lt;p&gt;ArchShield deliberately treats &lt;code&gt;NOT MENTIONED&lt;/code&gt; differently from &lt;code&gt;POTENTIAL CONCERN&lt;/code&gt;: the absence of evidence is not automatically treated as evidence of a vulnerability.&lt;/p&gt;
&lt;p&gt;Overall, the track gave me a practical look at Google AI Studio's Build workflow and how Gemini can act as an implementation partner while still requiring engineering judgment, testing, and iteration from the developer.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/32441/i-built-archshield-an-ai-architecture-security-baseline-assistant</guid>
<pubDate>Mon, 26 Oct 2026 01:35:09 +0000</pubDate>
</item>
<item>
<title>Most people use AI wrong: Stop pasting raw links and hoping for magic.</title>
<link>https://coderlegion.com/31635/most-people-use-ai-wrong-stop-pasting-raw-links-and-hoping-for-magic</link>
<description>&lt;p&gt;You read 10 articles, highlight sentences, copy fragments into notes, open 5 tabs, and manually assemble prompts.&lt;/p&gt;
&lt;p&gt;It kills your focus. &lt;/p&gt;
&lt;p&gt;So I built MindContext — the local-first AI research copilot for Chrome. 🧵👇&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;1/ 💡 How it works:&lt;br&gt;
While reading any webpage, take instant notes &amp;amp; highlight key quotes directly in a sleek side panel. &lt;/p&gt;
&lt;p&gt;With one click, MindContext compiles your clean article text + thoughts + quotes into a structured AI handoff prompt.&lt;/p&gt;
&lt;p&gt;No formatting hassle. No lost context.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;2/ 🎯 Structured AI Handoffs:&lt;br&gt;
Stop getting generic AI answers. &lt;/p&gt;
&lt;p&gt;Choose from curated prompt frameworks right inside your browser:&lt;br&gt;
• Executive Summary (distinguish facts from hype)&lt;br&gt;
• Critical Analysis &amp;amp; Counterarguments&lt;br&gt;
• Action Items &amp;amp; Next Steps&lt;br&gt;
• Multi-Source Synthesis&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;3/ 🚀 Take it to the next level with MindContext PRO:&lt;/p&gt;
&lt;p&gt;For serious researchers, founders, and knowledge workers:&lt;/p&gt;
&lt;p&gt;📺 YouTube Full Transcripts: Turn 2-hour podcast or technical talk transcripts into structured AI context in 2 seconds.&lt;br&gt;
📁 Unlimited Research Projects: Group notes &amp;amp; quotes across dozens of tabs for comparative cross-source synthesis.&lt;br&gt;
🎨 4-Color Smart Highlighter: Color-code ideas, facts, bugs, or competitors — click any quote to jump directly to its exact spot on the page!&lt;br&gt;
⚡ Saved Chat Links: Automatically routes prompts straight into your ongoing ChatGPT/Claude/Gemini chats instead of spamming new conversations.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;4/ 🔒 100% Privacy-First by Design:&lt;br&gt;
Your notes and research NEVER touch external servers. Everything lives locally in your browser sandbox (&lt;code&gt;chrome.storage.local&lt;/code&gt;). Zero tracking, zero cloud dependencies.&lt;/p&gt;
&lt;p&gt;Try MindContext Free on the Chrome Web Store:&lt;br&gt;
👉 chromewebstore.google.com/detail/mindcontext-ai-research-n/nmagjifaanaaddbogdebppjdcoaignnd&lt;/p&gt;
&lt;p&gt;Unlock Pro for just $24/year (~$2/mo):&lt;br&gt;
⚡ [Link to Lemon Squeezy / Store]&lt;/p&gt;
&lt;h2 id=&quot;buildinpublic-ai-productivity-chatgpt-claude-chromeextension-pkm&quot;&gt;buildinpublic #AI #productivity #ChatGPT #Claude #ChromeExtension #PKM&lt;/h2&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/31635/most-people-use-ai-wrong-stop-pasting-raw-links-and-hoping-for-magic</guid>
<pubDate>Sun, 18 Oct 2026 17:12:22 +0000</pubDate>
</item>
<item>
<title>Copy-pasting research into ChatGPT, Claude, or Gemini is broken!</title>
<link>https://coderlegion.com/31634/copy-pasting-research-into-chatgpt-claude-or-gemini-is-broken</link>
<description>&lt;p&gt;You read 10 articles, highlight sentences, copy fragments into notes, open 5 tabs, and manually assemble prompts.&lt;/p&gt;
&lt;p&gt;It kills your focus. &lt;/p&gt;
&lt;p&gt;So I built MindContext — the local-first AI research copilot for Chrome. 🧵👇&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;1/ 💡 How it works:&lt;br&gt;
While reading any webpage, take instant notes &amp;amp; highlight key quotes directly in a sleek side panel. &lt;/p&gt;
&lt;p&gt;With one click, MindContext compiles your clean article text + thoughts + quotes into a structured AI handoff prompt.&lt;/p&gt;
&lt;p&gt;No formatting hassle. No lost context.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;2/ 🎯 Structured AI Handoffs:&lt;br&gt;
Stop getting generic AI answers. &lt;/p&gt;
&lt;p&gt;Choose from curated prompt frameworks right inside your browser:&lt;br&gt;
• Executive Summary (distinguish facts from hype)&lt;br&gt;
• Critical Analysis &amp;amp; Counterarguments&lt;br&gt;
• Action Items &amp;amp; Next Steps&lt;br&gt;
• Multi-Source Synthesis&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;3/ 🚀 Take it to the next level with MindContext PRO:&lt;/p&gt;
&lt;p&gt;For serious researchers, founders, and knowledge workers:&lt;/p&gt;
&lt;p&gt;📺 YouTube Full Transcripts: Turn 2-hour podcast or technical talk transcripts into structured AI context in 2 seconds.&lt;br&gt;
📁 Unlimited Research Projects: Group notes &amp;amp; quotes across dozens of tabs for comparative cross-source synthesis.&lt;br&gt;
🎨 4-Color Smart Highlighter: Color-code ideas, facts, bugs, or competitors — click any quote to jump directly to its exact spot on the page!&lt;br&gt;
⚡ Saved Chat Links: Automatically routes prompts straight into your ongoing ChatGPT/Claude/Gemini chats instead of spamming new conversations.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;4/ 🔒 100% Privacy-First by Design:&lt;br&gt;
Your notes and research NEVER touch external servers. Everything lives locally in your browser sandbox (&lt;code&gt;chrome.storage.local&lt;/code&gt;). Zero tracking, zero cloud dependencies.&lt;/p&gt;
&lt;p&gt;Try MindContext Free on the Chrome Web Store:&lt;br&gt;
👉 chromewebstore.google.com/detail/mindcontext-ai-research-n/nmagjifaanaaddbogdebppjdcoaignnd&lt;/p&gt;
&lt;p&gt;Unlock Pro for just $24/year (~$2/mo):&lt;br&gt;
⚡ [Link to Lemon Squeezy / Store]&lt;/p&gt;
&lt;h2 id=&quot;buildinpublic-ai-productivity-chatgpt-claude-chromeextension-pkm-1&quot;&gt;buildinpublic #AI #productivity #ChatGPT #Claude #ChromeExtension #PKM&lt;/h2&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/31634/copy-pasting-research-into-chatgpt-claude-or-gemini-is-broken</guid>
<pubDate>Sun, 18 Oct 2026 17:10:04 +0000</pubDate>
</item>
<item>
<title>Gemini 3.1 Pro Is Gone From My Antigravity Model Selector. Here's What I Can (and Can't) Confirm</title>
<link>https://coderlegion.com/30897/gemini-3-1-pro-is-gone-from-my-antigravity-model-selector-heres-what-i-can-and-cant-confirm</link>
<description>&lt;p&gt;Gemini 3.1 Pro quietly disappeared from Google Antigravity. Here is what is confirmed, what isn't, and real-world web dev notes on Gemini 3.8 Flash (High).&lt;/p&gt;
&lt;p&gt;On October 13, 2026, I opened the model selector in Google Antigravity and found a single Gemini option: &lt;strong&gt;Gemini 3.8 Flash&lt;/strong&gt;. Gemini 3.1 Pro, the model I used to treat as the safe, top-of-the-list choice, was not there.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/z01yl1uujze6a509x75o.png&quot; alt=&quot;Image description&quot;&gt;Google Antigravity model only showing Gemini 3.8 Flash&lt;/p&gt;
&lt;p&gt;I wasn't surprised, but I want to explain why without claiming more than I know. Google hasn't said why this happened, and some of the picture is still unclear.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;1-what-s-confirmed-and-what-isn-t&quot;&gt;1. What's Confirmed, and What Isn't&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Confirmed in my account&lt;/strong&gt;: The selector shows 3.8 Flash as the only Gemini model on my Google One AI Premium plan (which includes Antigravity access). On the same day, another user posted on Google's developer forum that 3.1 Pro had quietly disappeared for subscribers after a recent update, leaving 3.8 Flash as the only Gemini choice.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not confirmed&lt;/strong&gt;: That this is permanent, or that it applies to every tier. In the most recent versions I could find, Antigravity's own models documentation still listed 3.1 Pro across all plans, and the Gemini API deprecations page showed no shutdown date for &lt;code&gt;gemini-3.1-pro-preview&lt;/code&gt;. So either the documentation lags behind the product, or this is a phased rollout that hasn't reached everyone. I haven't found an official announcement yet.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;2-a-pattern-not-a-one-off&quot;&gt;2. A Pattern, Not a One-Off&lt;/h3&gt;
&lt;p&gt;Two things point in the same direction, even if neither conclusively proves Google's internal reasoning:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cadence&lt;/strong&gt;: Gemini 3.1 Pro was released on February 19, 2026, and as far as I can find it is still Google's latest Pro-tier model. Over the same months, Flash went through 3.5 (May 19), 3.6, 3.7, and 3.8 (early September). That is four Flash releases in under four months, with no new Pro in between.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The wider lineup is being trimmed&lt;/strong&gt;: Antigravity's models page carries a note that some models will be removed on November 2, 2026. The &quot;Notice&quot; badges beside certain third-party models (like older Claude variants) similarly point to an active consolidation of the selector lineup.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Possible explanations include compute costs, simplifying the catalog before a next-generation launch, or Google's conviction that Flash is now capable enough for primary workflows. None of these has been officially confirmed.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;3-what-my-own-experience-adds-and-what-it-doesn-t&quot;&gt;3. What My Own Experience Adds, and What It Doesn't&lt;/h3&gt;
&lt;p&gt;My work is mostly Excel VBA and web apps. I used to pick the highest model with the highest thinking mode by default. When I stepped down to Gemini 3.7 Flash (High), in day-to-day tasks I didn't hit a wall I could pin on the model (large rewrites were the exception, discussed below). I described those results in my earlier posts on &lt;a rel=&quot;nofollow&quot; href=&quot;https://dev.to/juna_go15/i-stopped-using-gemini-31-pro-for-agentic-coding-why-i-moved-to-gemini-37-flash-high-mode-43hf&quot;&gt;dev.to&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; href=&quot;https://medium.com/@junaediachmad194/not-just-for-coding-gemini-flash-in-antigravity-can-also-handle-data-analysis-and-excel-vba-1144ad24de31&quot;&gt;Medium&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The main shift between versions was in &lt;strong&gt;reasoning&lt;/strong&gt;: 3.7 Flash frequently struggled with complex problem-solving and nuanced debugging, whereas 3.8 Flash significantly closed that gap—resolving tricky multi-step logic on the first attempt without sacrificing Flash's rapid turnaround.&lt;/p&gt;
&lt;p&gt;The limits matter. This is one developer doing two specific kinds of work, mostly with well-structured tasks. My prompting also improved over the same period, and Antigravity itself kept changing. It is a data point, not a verdict.&lt;/p&gt;
&lt;p&gt;There is one more distinction: choosing Flash because it worked for me is a &lt;strong&gt;preference&lt;/strong&gt;. Having Flash as the only Gemini option is &lt;strong&gt;not a preference&lt;/strong&gt;, and I shouldn't treat the two as the same evidence.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;4-notes-on-3-8-flash-high-for-web-development&quot;&gt;4. Notes on 3.8 Flash (High) for Web Development&lt;/h3&gt;
&lt;p&gt;With Gemini 3.8 Flash on High thinking mode currently standing as the top Gemini option in my selector, my notes as a web developer come down to five points:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;It is very fast&lt;/strong&gt;: Agent loops stay quick, making small iterations cheap and responsive.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It reads large context well&lt;/strong&gt;: It ingests a large portion of a project at once, so I rarely have to feed it files piece by piece.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Large rewrites are where it breaks&lt;/strong&gt;: When I ask for a major architectural overhaul in one go, bugs tend to emerge. It works much better when I split the job into small modules and fix them one at a time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Its visual design is not very creative on its own&lt;/strong&gt;: For a clean, modern interface, I usually provide reference images or design tokens, and the output quality improves dramatically.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It is very dependable at automating document files&lt;/strong&gt;: Despite its utilitarian design sense, I have found it remarkably reliable for working with &lt;code&gt;.docx&lt;/code&gt; and &lt;code&gt;.xlsx&lt;/code&gt; files, maintaining clean, well-structured layouts.&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Concrete Example&lt;/strong&gt;: During a database migration from a local setup to the cloud for our POS and accounting reporting system at &lt;a rel=&quot;nofollow&quot; href=&quot;https://setvy.id&quot;&gt;setvy.id&lt;/a&gt;, asking 3.8 Flash to handle the entire shift in one massive pass resulted in a cascade of subtle query bugs and broken balance calculations. I had to step back and tackle the job in small, isolated slices—migrating one schema at a time, patching individual endpoints, and verifying the accounting logic module by module. Handled in small pieces, it was fast and reliable; tasked with the entire overhaul at once, it struggled.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This third point lines up with the forum user's report in one respect: both of us ran into trouble when the change scope was too broad.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;5-the-other-side&quot;&gt;5. The Other Side&lt;/h3&gt;
&lt;p&gt;The forum user who reported the missing model had the opposite experience. On a medium-sized project, they reported that 3.8 Flash invented APIs, edited unrelated files, and got stuck in read-and-think loops that drained quota—prompting them to revert with Git and return to 3.1 Pro. It is the same kind of critique I previously leveled against 3.1 Pro, mirrored in reverse.&lt;/p&gt;
&lt;p&gt;Outside testing reflects this mixed reality:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Harness dependency&lt;/strong&gt;: One hands-on review concludes that 3.8 Flash suits cost-sensitive, well-scoped coding tasks, noting that results depend heavily on the harness—performing noticeably better inside an agentic environment like Antigravity than in standard chat.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Benchmark ceiling&lt;/strong&gt;: The same review notes that 3.8 Flash trails Opus 5 and GPT-5.6 on the harder Terminal-Bench 4.0, observing that its 89.4% headline score stems from Terminal-Bench 2.1, a benchmark widely considered saturated.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My working hypothesis (not a definitive finding): &lt;strong&gt;Flash holds up exceptionally well on scoped tasks&lt;/strong&gt; (like a workbook, an API route, or a single module), but strains on large codebases where deep, cross-file interdependencies are at play.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;6-what-i-d-do-now&quot;&gt;6. What I'd Do Now&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Check your own selector and plan&lt;/strong&gt;: Take a dated screenshot so you have a baseline for what changed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Commit to Git frequently&lt;/strong&gt;: Keep agent iterations short so that an erratic run is cheap to rollback.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keep tasks tightly scoped&lt;/strong&gt;: State constraints explicitly (tenant IDs, soft-delete flags, precise table names).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Maintain a fallback strategy&lt;/strong&gt;: Be aware of what alternative models are available in Antigravity as lineups shift.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test on your own stack&lt;/strong&gt;: Benchmark against your actual daily code rather than relying solely on generic benchmark charts.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h3 id=&quot;a-question-for-you&quot;&gt;A Question for You&lt;/h3&gt;
&lt;p&gt;When did you last genuinely need the top-tier Pro model, and would the outcome have been different with a better-scoped prompt and smaller iterations? &lt;/p&gt;
&lt;p&gt;Has Gemini 3.1 Pro disappeared from your Antigravity selector as well? Let me know your experience and subscription plan in the comments below!&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;About the Author: Achmad Junaedi is a web developer and founder of &lt;a rel=&quot;nofollow&quot; href=&quot;https://setvy.id&quot;&gt;setvy&lt;/a&gt;, building custom web applications, database architectures, and operational automation.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;sources-amp-references&quot;&gt;Sources &amp;amp; References&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://discuss.ai.google.dev/t/please-bring-gemini-3-1-pro-model-back/188608&quot;&gt;Google AI Developers Forum: &quot;Please bring gemini 3.1 pro model back!&quot; (Oct 13, 2026)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://antigravity.google/docs/models&quot;&gt;Antigravity models documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://ai.google.dev/gemini-api/docs/deprecations&quot;&gt;Gemini API deprecations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.mindstudio.ai/blog/gemini-3-8-flash-harness-demos&quot;&gt;Gemini 3.8 Flash tested: cheap, fast, and harness-dependent&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/30897/gemini-3-1-pro-is-gone-from-my-antigravity-model-selector-heres-what-i-can-and-cant-confirm</guid>
<pubDate>Tue, 13 Oct 2026 06:31:47 +0000</pubDate>
</item>
<item>
<title>AudioFlow- STT and TTS tool</title>
<link>https://coderlegion.com/30084/audioflow-stt-and-tts-tool</link>
<description>&lt;p&gt;Welcome to AudioFlow in this app i created 2 simple ai tools that u can use in daily life&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Voise to Text (STT)&lt;/li&gt;
&lt;li&gt;Text to Voise (TTS)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This project is completely open-source so u can re-use this tools for your any kind of chatbot project&lt;/p&gt;
&lt;p&gt;features of this app&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Real-time audio streaming using web-socket&lt;/li&gt;
&lt;li&gt;Reactive waveform which improve UX&lt;/li&gt;
&lt;li&gt;Keeps Audio and Transaction history in local-storage&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;How to use this app ?&lt;br&gt;
both tools are use Gemini models so u need to provide an api key it free generous tier for you personal use and it safely stored in local storage.&lt;/p&gt;
&lt;p&gt;Live Demo: &lt;a rel=&quot;nofollow&quot; href=&quot;https://audio-flow-ai.vercel.app/&quot;&gt;website-link&lt;/a&gt;&lt;br&gt;
GitHub Repository: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/OnkarK0273/audio-flow&quot;&gt;repo-link&lt;/a&gt;&lt;br&gt;
Video Demo: &lt;a rel=&quot;nofollow&quot; href=&quot;https://lnkd.in/p/e4Exwiv5&quot;&gt;video-link&lt;/a&gt;&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/30084/audioflow-stt-and-tts-tool</guid>
<pubDate>Wed, 07 Oct 2026 06:52:22 +0000</pubDate>
</item>
<item>
<title>Building a Real-Time Social Listening &amp; Brand Sentiment Engine with Python, Gemini 1.5, and DuckDB</title>
<link>https://coderlegion.com/29747/building-real-time-social-listening-brand-sentiment-engine-with-python-gemini-and-duckdb</link>
<description>&lt;p&gt;Enterprise social listening platforms like Brandwatch or Sprout charge upwards of $800 to $2,000/month per seat. Under the hood, many still rely on brittle dictionary lookup tables (VADER-style positive/negative lexical scoring) or generic regex filters. When a developer tweets &lt;em&gt;&quot;Oh fantastic, another breaking API change deployed straight to prod on a Friday!&quot;&lt;/em&gt;, classical sentiment classifiers mark it as overwhelmingly positive due to &quot;fantastic&quot;.&lt;/p&gt;
&lt;p&gt;Meanwhile, writing your own real-time monitoring service often degrades into a distributed systems mess: rate limits across Reddit and Hacker News, unstructured LLM hallucinations, deduplication bottlenecks, and ballooning database costs.&lt;/p&gt;
&lt;p&gt;Here is how to build an asynchronous, production-ready brand intelligence engine using Python, Google's Gemini 1.5 Flash structured outputs, and DuckDB—running for less than $1/month in API costs.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;1-the-architecture&quot;&gt;1. The Architecture&lt;/h3&gt;
&lt;p&gt;The engine is designed around a decoupled, non-blocking ingestion and evaluation pattern:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-mermaid&quot;&gt;graph TD
    A[Reddit API / HN Firebase / Bluesky Firehose / RSS] --&amp;gt;|Async Polling| B[Ingestion Layer: Asyncio + HTTPX]
    B --&amp;gt;|Content Hash SHA-256| C[(DuckDB Local Store - Deduplication)]
    C --&amp;gt;|New Items| D[Gemini 1.5 Flash Engine]
    D --&amp;gt;|Pydantic Structured JSON| E[Alert Dispatcher]
    E --&amp;gt;|Urgency &amp;gt;= High or Polarity &amp;lt;= -0.6| F[Slack / Discord Webhook]
    E --&amp;gt;|Daily Rollup &amp;amp; Trend Metrics| G[Parquet / Analytical Store]
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;core-pillars-&quot;&gt;Core Pillars:&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Async Multi-Source Ingestion:&lt;/strong&gt; Pulls from Reddit (&lt;code&gt;asyncpraw&lt;/code&gt;), Hacker News (Firebase REST API), Bluesky (AT Protocol firehose), and custom RSS feeds asynchronously.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deduplication Engine:&lt;/strong&gt; Generates an identity fingerprint (&lt;code&gt;sha256(platform + post_id)&lt;/code&gt;) checked against local embedded DuckDB before hitting LLM inference.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Structured Gemini 1.5 Flash Parsing:&lt;/strong&gt; Uses schema-constrained JSON outputs to extract polarity (&lt;code&gt;-1.0&lt;/code&gt; to &lt;code&gt;1.0&lt;/code&gt;), urgency classification (&lt;code&gt;low&lt;/code&gt;, &lt;code&gt;medium&lt;/code&gt;, &lt;code&gt;critical&lt;/code&gt;), entity references, and sarcasm detection.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Downstream Alert Dispatcher:&lt;/strong&gt; Routes critical events directly to Slack/Discord webhooks while appending all metadata into DuckDB for fast OLAP rollups.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h3 id=&quot;2-ingestion-amp-deduplication-via-duckdb&quot;&gt;2. Ingestion &amp;amp; Deduplication via DuckDB&lt;/h3&gt;
&lt;p&gt;Rather than spinning up Postgres or Redis for transient social data, we use DuckDB. DuckDB runs in-process, provides zero-latency ACID writes, and allows vector-like analytical SQL on JSON columns.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;import duckdb
import hashlib

class StorageManager:
    def __init__(self, db_path: str = &quot;brand_intel.duckdb&quot;):
        self.con = duckdb.connect(db_path)
        self._init_schema()

    def _init_schema(self):
        self.con.execute(&quot;&quot;&quot;
            CREATE TABLE IF NOT EXISTS raw_mentions (
                id VARCHAR PRIMARY KEY,
                platform VARCHAR,
                author VARCHAR,
                content VARCHAR,
                url VARCHAR,
                created_at TIMESTAMP,
                processed BOOLEAN DEFAULT FALSE
            );
            CREATE TABLE IF NOT EXISTS sentiment_results (
                id VARCHAR PRIMARY KEY,
                polarity FLOAT,
                urgency VARCHAR,
                is_sarcastic BOOLEAN,
                entities JSON,
                summary VARCHAR,
                evaluated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
                FOREIGN KEY (id) REFERENCES raw_mentions(id)
            );
        &quot;&quot;&quot;)

    def is_duplicate(self, platform: str, external_id: str) -&amp;gt; bool:
        uid = hashlib.sha256(f&quot;{platform}:{external_id}&quot;.encode()).hexdigest()
        res = self.con.execute(&quot;SELECT 1 FROM raw_mentions WHERE id = ?&quot;, [uid]).fetchone()
        return res is not None

    def insert_mention(self, platform: str, external_id: str, author: str, content: str, url: str, created_at):
        uid = hashlib.sha256(f&quot;{platform}:{external_id}&quot;.encode()).hexdigest()
        self.con.execute(&quot;&quot;&quot;
            INSERT INTO raw_mentions (id, platform, author, content, url, created_at)
            VALUES (?, ?, ?, ?, ?, ?)
            ON CONFLICT (id) DO NOTHING
        &quot;&quot;&quot;, [uid, platform, author, content, url, created_at])
        return uid
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;3-structured-gemini-1-5-flash-evaluation&quot;&gt;3. Structured Gemini 1.5 Flash Evaluation&lt;/h3&gt;
&lt;p&gt;To eliminate hallucinations and avoid parsing regex out of freeform LLM completions, we leverage Google GenAI's native Pydantic schema validation. We use &lt;code&gt;gemini-1.5-flash&lt;/code&gt; due to its sub-second latency and $0.075 per 1M tokens cost tier.&lt;/p&gt;
&lt;h4 id=&quot;the-evaluation-schema&quot;&gt;The Evaluation Schema&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;from pydantic import BaseModel, Field
from typing import List, Literal
import google.generativeai as genai
import os

genai.configure(api_key=os.environ[&quot;GEMINI_API_KEY&quot;])

class SentimentEvaluation(BaseModel):
    polarity: float = Field(
        description=&quot;Polarity score strictly between -1.0 (extremely negative/hostile) and 1.0 (enthusiastic/positive).&quot;
    )
    urgency: Literal[&quot;low&quot;, &quot;medium&quot;, &quot;high&quot;, &quot;critical&quot;] = Field(
        description=&quot;'critical' indicates data breaches, service downtime, or legal threats; 'high' indicates severe bugs or churn threats; 'medium' is regular feedback; 'low' is passive mention.&quot;
    )
    is_sarcastic: bool = Field(description=&quot;True if the statement implies the opposite of its literal words.&quot;)
    entities: List[str] = Field(description=&quot;List of specific products, competitor names, or people mentioned.&quot;)
    summary: str = Field(description=&quot;1-sentence technical digest of the user's issue or praise.&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;inference-function-with-enforced-json-schema&quot;&gt;Inference Function with Enforced JSON Schema&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;import json

def evaluate_mention(brand_name: str, text: str) -&amp;gt; SentimentEvaluation:
    prompt = f&quot;&quot;&quot;
    Analyze the following social mention referencing the brand: '{brand_name}'.
    Contextualize sarcasm, tech nuances, and developer sentiment.
    
    Content:
    &quot;&quot;&quot;{text}&quot;&quot;&quot;
    &quot;&quot;&quot;
    
    model = genai.GenerativeModel(&quot;gemini-1.5-flash&quot;)
    
    response = model.generate_content(
        prompt,
        generation_config=genai.GenerationConfig(
            response_mime_type=&quot;application/json&quot;,
            response_schema=SentimentEvaluation,
            temperature=0.1,
        ),
    )
    
    return SentimentEvaluation.model_validate_json(response.text)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;4-threshold-alerting-amp-webhook-routing&quot;&gt;4. Threshold Alerting &amp;amp; Webhook Routing&lt;/h3&gt;
&lt;p&gt;When a negative spike occurs (e.g., a critical authentication vulnerability drops on Hacker News), latency matters. The dispatcher inspects the structured output and fires immediate payloads to Slack, Discord, or an incident management endpoint like PagerDuty.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;import httpx
import asyncio

SLACK_WEBHOOK_URL = os.environ.get(&quot;SLACK_WEBHOOK_URL&quot;)

async def dispatch_alert(eval_data: SentimentEvaluation, platform: str, url: str, content: str):
    # Alert trigger: high/critical urgency OR heavily negative sentiment
    if eval_data.urgency in [&quot;high&quot;, &quot;critical&quot;] or eval_data.polarity &amp;lt;= -0.5:
        color = &quot;#FF0000&quot; if eval_data.urgency == &quot;critical&quot; else &quot;#FFA500&quot;
        
        payload = {
            &quot;attachments&quot;: [
                {
                    &quot;color&quot;: color,
                    &quot;title&quot;: f&quot;🚨 Brand Alert [{eval_data.urgency.upper()}] on {platform}&quot;,
                    &quot;title_link&quot;: url,
                    &quot;fields&quot;: [
                        {&quot;title&quot;: &quot;Summary&quot;, &quot;value&quot;: eval_data.summary, &quot;short&quot;: False},
                        {&quot;title&quot;: &quot;Polarity&quot;, &quot;value&quot;: f&quot;{eval_data.polarity:.2f}&quot;, &quot;short&quot;: True},
                        {&quot;title&quot;: &quot;Sarcasm Detected&quot;, &quot;value&quot;: str(eval_data.is_sarcastic), &quot;short&quot;: True},
                        {&quot;title&quot;: &quot;Entities&quot;, &quot;value&quot;: &quot;, &quot;.join(eval_data.entities) or &quot;None&quot;, &quot;short&quot;: True},
                    ],
                    &quot;text&quot;: f&quot;*Snippet:*
&amp;gt; {content[:280]}...&quot;,
                }
            ]
        }
        
        async with httpx.AsyncClient() as client:
            resp = await client.post(SLACK_WEBHOOK_URL, json=payload)
            resp.raise_for_status()
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;5-deployment-concurrency-amp-rate-limits&quot;&gt;5. Deployment, Concurrency &amp;amp; Rate Limits&lt;/h3&gt;
&lt;p&gt;Running high-frequency pollers against varied APIs presents two main issues:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Rate Limit Exhaustion:&lt;/strong&gt; Reddit restricts standard OAuth to 60 requests/minute. Gemini 1.5 Flash has a free-tier limit of 15 RPM and Tier-1 pay-as-you-go limit of 1,000 RPM.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Event Loop Starvation:&lt;/strong&gt; Blocking HTTP calls freeze background listeners.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;the-concurrency-pool-pattern&quot;&gt;The Concurrency Pool Pattern&lt;/h4&gt;
&lt;p&gt;Use an &lt;code&gt;asyncio.Queue&lt;/code&gt; paired with worker pools to guarantee your workers respect rate bounds:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;async def analysis_worker(queue: asyncio.Queue, db: StorageManager, brand_name: str):
    while True:
        item = await queue.get()
        uid, platform, author, content, url = item
        try:
            # Non-blocking run for Gemini evaluation
            eval_res = await asyncio.to_thread(evaluate_mention, brand_name, content)
            
            # Save analytics to DuckDB
            db.con.execute(&quot;&quot;&quot;
                INSERT INTO sentiment_results (id, polarity, urgency, is_sarcastic, entities, summary)
                VALUES (?, ?, ?, ?, ?, ?)
            &quot;&quot;&quot;, [uid, eval_res.polarity, eval_res.urgency, eval_res.is_sarcastic, 
                  json.dumps(eval_res.entities), eval_res.summary])
            
            # Route Alerts
            await dispatch_alert(eval_res, platform, url, content)
            
        except Exception as e:
            print(f&quot;[ERROR] Failed to process {uid}: {e}&quot;)
        finally:
            queue.task_done()
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;analytical-daily-rollups-via-duckdb&quot;&gt;Analytical Daily Rollups via DuckDB&lt;/h4&gt;
&lt;p&gt;To view aggregated brand health over the past 24 hours without loading heavy Pandas workflows:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SELECT 
    date_trunc('hour', evaluated_at) as hour_bucket,
    AVG(polarity) as avg_sentiment,
    COUNT(CASE WHEN urgency IN ('high', 'critical') THEN 1 END) as critical_count,
    COUNT(*) as total_mentions
FROM sentiment_results
WHERE evaluated_at &amp;gt;= NOW() - INTERVAL '24 HOURS'
GROUP BY 1
ORDER BY 1 DESC;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;6-conclusion-amp-turnkey-template&quot;&gt;6. Conclusion &amp;amp; Turnkey Template&lt;/h3&gt;
&lt;p&gt;With under 200 lines of modern Python, you can replace a legacy multi-thousand-dollar monitoring subscription with a real-time system that catches sarcasm, tags entities, writes to low-footprint local storage, and pings your on-call channel in real time.&lt;/p&gt;
&lt;p&gt;You can manually implement this architecture using the snippets above, wire your own OAuth credentials, and maintain the worker pipelines yourself.&lt;/p&gt;
&lt;p&gt;If you prefer to deploy a battle-tested, production-ready codebase immediately—complete with pre-configured connectors for Reddit, Bluesky, Hacker News, RSS feeds, an automated CLI dashboard, and native Docker Compose files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://whop.com/mr-studio-7faa/real-time-brand-sentiment-social-listening-engine-python-gemini&quot;&gt;Instant Access on Whop&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://mannyverse767.gumroad.com/l/cpmgnd&quot;&gt;Direct Download on Gumroad&lt;/a&gt;&lt;/strong&gt; (Use promo code &lt;strong&gt;&lt;code&gt;EARLYBIRD&lt;/code&gt;&lt;/strong&gt; for 20% off)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Have questions about tuning the schema for specific B2B niche contexts? Drop a comment below!&lt;/p&gt;
</description>
<category>Tutorials</category>
<guid isPermaLink="true">https://coderlegion.com/29747/building-real-time-social-listening-brand-sentiment-engine-with-python-gemini-and-duckdb</guid>
<pubDate>Sun, 04 Oct 2026 16:57:35 +0000</pubDate>
</item>
<item>
<title>ChatGPT, Claude, Gemini, or Cursor? Which AI Tool Is Your Go-To and Why?</title>
<link>https://coderlegion.com/29013/chatgpt-claude-gemini-or-cursor-which-ai-tool-is-your-go-to-and-why</link>
<description>&lt;h2 id=&quot;chatgpt-claude-gemini-or-cursor-which-ai-tool-is-your-go-to-and-why-&quot;&gt;ChatGPT, Claude, Gemini, or Cursor? Which AI Tool Is Your Go-To and Why?&lt;/h2&gt;
&lt;p&gt;Hey CodeLegion community! 💻&lt;/p&gt;
&lt;p&gt;Whether you are debugging complex codebases, writing technical documentation, exploring new frameworks, or just trying to automate daily workflows, AI tools have become an essential part of the modern developer's toolkit.&lt;/p&gt;
&lt;p&gt;With models and assistants constantly updating, everyone in tech seems to have their own preferred setup. We want to know: &lt;strong&gt;Which AI tool gets the most mileage in your stack, and why?&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;the-developer-s-usual-suspects&quot;&gt;The Developer's Usual Suspects&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Claude:&lt;/strong&gt; Loved by engineers for its natural prose, ability to digest massive code repositories or specs in a single prompt, and clean code generation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ChatGPT:&lt;/strong&gt; The reliable all-rounder for architecture advice, algorithm troubleshooting, general problem-solving, and quick scripts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cursor / GitHub Copilot:&lt;/strong&gt; Integrated directly into the IDE for real-time code completion, inline refactoring, and multi-file contextual edits.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gemini:&lt;/strong&gt; Great for real-time web search, large context windows, and tight integration across Google Workspace apps and cloud workflows.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Perplexity:&lt;/strong&gt; The go-to search companion for looking up API documentation, library updates, and technical research with cited sources.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h4 id=&quot;join-the-discussion-&quot;&gt;Join the Discussion!&lt;/h4&gt;
&lt;p&gt;We’d love to hear from the legion. Drop your thoughts in the comments below:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;What is your primary AI tool for work or personal projects?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What technical task do you use it for most (coding, debugging, architecture, documentation)?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What is the one killer feature or model capability that keeps you using it?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/29013/chatgpt-claude-gemini-or-cursor-which-ai-tool-is-your-go-to-and-why</guid>
<pubDate>Tue, 29 Sep 2026 08:04:49 +0000</pubDate>
</item>
<item>
<title>Google confirmed Gemini accessed 3 live corporate systems during a red-teaming test</title>
<link>https://coderlegion.com/28204/google-confirmed-gemini-accessed-3-live-corporate-systems-during-a-red-teaming-test</link>
<description>&lt;p&gt;While headlines blamed &quot;rogue AI,&quot; the actual culprit was a classic infrastructure failure: un-enforced network egress controls and domain collisions.   &lt;/p&gt;
&lt;p&gt;Here’s the TL;DR on what broke and why it’s happening across Anthropic, OpenAI, and Meta:&lt;/p&gt;
&lt;p&gt;⚡ Key Takeaways:&lt;/p&gt;
&lt;p&gt;The Root Cause: A test environment domain matched a live commercial entity, and egress traffic wasn't air-gapped.   &lt;/p&gt;
&lt;p&gt;Model Misalignment vs. Env Failure: Gemini stopped execution the moment it realized it crossed test boundaries. The model didn't fail—the sandbox did.   &lt;/p&gt;
&lt;p&gt;The Industry Pattern: Anthropic, OpenAI, and Meta have all suffered similar containment breaches during automated agent testing.&lt;/p&gt;
&lt;p&gt;The Fix: Strict DEFAULT-DENY outbound network rules, synthetic credential scrubbing, and real-time egress anomaly monitoring.&lt;/p&gt;
&lt;p&gt;👇 Read the full engineering deep-dive on The Flux Read:🔗 &lt;br&gt;
[https://www.thefluxread.com/2026/09/google-just-admitted-gemini-hacked.html]&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/28204/google-confirmed-gemini-accessed-3-live-corporate-systems-during-a-red-teaming-test</guid>
<pubDate>Tue, 22 Sep 2026 17:11:35 +0000</pubDate>
</item>
<item>
<title>The Stateless Inference Pipeline: Ephemeral Payloads and Quota Metadata</title>
<link>https://coderlegion.com/18607/the-stateless-inference-pipeline-ephemeral-payloads-and-quota-metadata</link>
<description>&lt;h2 id=&quot;the-stateless-inference-pipeline-ephemeral-payloads-and-quota-metadata&quot;&gt;The Stateless Inference Pipeline: Ephemeral Payloads and Quota Metadata&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;POST /api/ai/chat&lt;/code&gt; is Pocket Analyst’s inference hop. The route header in &lt;code&gt;app/api/ai/chat/route.ts&lt;/code&gt; states the contract plainly:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;/**
 * Stateless: request payload (message, context, attachedContent) is used only
 * to build the LLM prompt and stream the response. No database write or cache
 * of the payload; only analytics/quota metadata are persisted.
 */
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Stateless&lt;/strong&gt; here means &lt;strong&gt;stateless with respect to the portfolio context string&lt;/strong&gt; — not “the server never touches cloud.”&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;end-to-end-flow-accurate-&quot;&gt;End-to-end flow (accurate)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;Raw client corpus (trades / positions in memory)
  → buildPortfolioContext()     [client, Part 2]
  → bounded string in POST body
  → /api/ai/chat                [build prompt, stream out]
  → optional Firestore/KV quota + analytics metadata only
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Full engineering record: &lt;code&gt;docs/IP-TECHNICAL-MECHANISMS.md&lt;/code&gt; (patent-aligned mechanisms, CSV truncation rules, quote injection).&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-may-persist-server-side&quot;&gt;What may persist server-side&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th scope=&quot;col&quot;&gt;Data class&lt;/th&gt;
&lt;th scope=&quot;col&quot;&gt;Typical store&lt;/th&gt;
&lt;th scope=&quot;col&quot;&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Portfolio &lt;code&gt;context&lt;/code&gt; string&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Not&lt;/strong&gt; written to portfolio DB by this route&lt;/td&gt;
&lt;td&gt;Ephemeral prompt input&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Free-tier usage counters&lt;/td&gt;
&lt;td&gt;Firestore and/or Vercel KV&lt;/td&gt;
&lt;td&gt;Quota enforcement (&lt;code&gt;FREE_TIER_MONTHLY_LIMIT&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auth / tier resolution&lt;/td&gt;
&lt;td&gt;Firebase Admin&lt;/td&gt;
&lt;td&gt;Paid vs free model routing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Paid tiers skip monthly caps; free tier enforces limits — still &lt;strong&gt;not&lt;/strong&gt; a ledger warehouse.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;model-routing-and-attachments&quot;&gt;Model routing and attachments&lt;/h3&gt;
&lt;p&gt;The route tries &lt;strong&gt;Gemini&lt;/strong&gt; when &lt;code&gt;GOOGLE_GENERATIVE_AI_API_KEY&lt;/code&gt; is set, with &lt;strong&gt;OpenAI&lt;/strong&gt; fallback. &lt;code&gt;MAX_ATTACHED_CONTENT_LENGTH&lt;/code&gt; caps server-side attachment size (frontend also caps).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Attachments are a deliberate second boundary:&lt;/strong&gt; if the user uploads file text, that is explicit — distinct from the default sanitized snapshot path.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;streaming&quot;&gt;Streaming&lt;/h3&gt;
&lt;p&gt;We use the &lt;strong&gt;Vercel AI SDK&lt;/strong&gt; (&lt;code&gt;streamText&lt;/code&gt;) for token streaming — UX requirement and operational standard in this codebase (&lt;code&gt;CLAUDE.md&lt;/code&gt;). The response is generated once per request; there is no server-side conversation memory of portfolio rows in this handler.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;procurement-questions-this-answers&quot;&gt;Procurement questions this answers&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Can you prove non-retention of portfolio payload?&lt;/strong&gt; → Route comment + IP doc + absence of write calls on &lt;code&gt;context&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Do you still have cloud?&lt;/strong&gt; → Yes: Firebase, KV, LLM APIs, Vercel — calibrated honesty (Part 4).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What does the model see?&lt;/strong&gt; → Bounded aggregate + user message + optional attachment + server quotes — not “nothing.”&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Part 3 of &lt;strong&gt;Sovereign Ingestion &amp;amp; Stateless Inference&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read the full &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.pocketportfolio.app/book/sovereign-intelligence&quot;&gt;Sovereign Intelligence&lt;/a&gt; book, explore &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.openportfolio.co.uk&quot;&gt;Open Portfolio&lt;/a&gt;, or &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.pocketportfolio.app&quot;&gt;try Pocket Portfolio&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/18607/the-stateless-inference-pipeline-ephemeral-payloads-and-quota-metadata</guid>
<pubDate>Wed, 27 May 2026 08:00:00 +0000</pubDate>
</item>
<item>
<title>Antigravity CLI First Impressions: Fast, Rough, and Not Ready</title>
<link>https://coderlegion.com/18556/antigravity-cli-first-impressions-fast-rough-and-not-ready</link>
<description>&lt;p&gt;Google has officially &lt;a rel=&quot;nofollow&quot; href=&quot;https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/&quot;&gt;replaced Gemini CLI with the new Antigravity CLI&lt;/a&gt; and launched it alongside Gemini 3.5 Flash, which became the default model for the new CLI experience. That made the launch more than a simple rebrand: it was also the first real chance to see whether Google’s new default coding-agent stack actually felt better in practice&lt;/p&gt;
&lt;p&gt;To test that, I ran &lt;a rel=&quot;nofollow&quot; href=&quot;https://jason.agostoni.net/an-ai-benchmark-that-tests-real-coding-workflows&quot;&gt;Ship Bench&lt;/a&gt;, the real-coding-workflow benchmark I built to evaluate how models and coding agents behave in practical development tasks, rather than toy prompts or isolated code snippets. This was not a full benchmark write-up; it was a quick first-pass meant to capture what it felt like to use Antigravity CLI as a working developer tool while exercising a realistic repo workflow through Ship Bench.&lt;/p&gt;
&lt;h3 id=&quot;what-i-tested&quot;&gt;What I tested&lt;/h3&gt;
&lt;p&gt;I used Antigravity CLI on Windows in the context of a &lt;a rel=&quot;nofollow&quot; href=&quot;https://jason.agostoni.net/an-ai-benchmark-that-tests-real-coding-workflows&quot;&gt;Ship Bench&lt;/a&gt; run, which meant the CLI was being pushed through a practical coding loop rather than a curated demo. The goal was not just to test whether the agent could answer prompts, but whether it could survive the kind of environment, permissions, command execution, and iteration flow that real coding work demands.&lt;/p&gt;
&lt;p&gt;I could have switched to Gemini Pro, but I intentionally stayed on Gemini 3.5 Flash, as the default model I wanted to see whether its promised speed and quota efficiency would make it the better everyday option. In other words, the test was really: Can it extend my usage quote over using a larger/pro model with the same quality?&lt;/p&gt;
&lt;h3 id=&quot;first-run-impressions&quot;&gt;First-run impressions&lt;/h3&gt;
&lt;p&gt;The first impression was mixed. Gemini 3.5 Flash is genuinely fast, and the agent feels quick and responsive, but the surrounding CLI experience was rough enough that it overshadowed most of the upside.&lt;/p&gt;
&lt;p&gt;On the first development iteration, the model decided it wanted a different (older) Node version and used &lt;code&gt;nvm&lt;/code&gt; to install an older one. After that, it seemed to lose track of Node on PATH entirely. It tried to recover, failed to reload the environment cleanly, then started searching the file system for &lt;code&gt;node.exe&lt;/code&gt; and dynamically re-adding that location to PATH on each command run. That behavior appears to be what triggered repeated permission prompts on every command. A pretty miserable experience. Once the terminal and CLI were restarted, that specific problem cleared up and normal command execution returned.&lt;/p&gt;
&lt;p&gt;That first issue felt like a bad transient state rather than the main product problem. The more important issue showed up in a more normal run: Antigravity CLI would not remember conversation-scoped permission grants, even after they had already been approved. That made the workflow feel fragmented and repetitive, because the tool kept asking for approval where the session context suggested it should already know the answer. Frustrating.&lt;/p&gt;
&lt;p&gt;The handling of background commands also felt awkward. When running &lt;code&gt;npm&lt;/code&gt; work in the background, the CLI shifted into a wait-timer style interaction instead of just naturally waiting on the task, which made the orchestration feel more mechanical than smooth. I suppose it could end up beneficial when it decides to run parallel tool calls.&lt;/p&gt;
&lt;p&gt;I also hit the same class of Windows terminal issues other users have been discussing, including hanging or inconsistent command execution behavior in terminal sessions in addition to terminal resize issues. Basic expectations, really. On Windows especially, the CLI still feels unstable enough that the shell layer becomes part of the story rather than disappearing into the background.&lt;/p&gt;
&lt;h3 id=&quot;flash-versus-the-cli&quot;&gt;Flash versus the CLI&lt;/h3&gt;
&lt;p&gt;One important distinction is that not every failure belonged to the CLI itself. For example, failing to add a &lt;code&gt;.gitignore&lt;/code&gt; file on the first run feels more like a Gemini 3.5 Flash planning/execution miss than a shell-wrapper problem.&lt;/p&gt;
&lt;p&gt;In that sense, the experience split into two separate judgments. Gemini 3.5 Flash felt fast and promising as a coding model, but Antigravity CLI felt rough as the environment wrapped around it. The difficult part is that, from a user perspective, those layers blur together fast when the default workflow is what you are actually evaluating.&lt;/p&gt;
&lt;h3 id=&quot;quota-and-value&quot;&gt;Quota and value&lt;/h3&gt;
&lt;p&gt;The quota behavior ended up being the biggest practical negative. I chose to test Gemini 3.5 Flash specifically because it was the new default and because one of the appealing ideas behind Flash was that it could extend usable quota while still feeling fast enough for real work. Instead, I burned through quota shockingly quickly.&lt;/p&gt;
&lt;p&gt;In practice, I could not get through even two meaningful iterations before hitting quota limits, and at one point the interface reported about 20% quota remaining while still refusing to continue. That mismatch made the product feel unreliable in exactly the area where a coding agent has to be predictable. In contrast, I was able to complete a seven iteration run with Claude Code Sonnet within its 5-hour quota, which made Antigravity’s current usage story feel much worse by comparison.&lt;/p&gt;
&lt;p&gt;That is probably the biggest reason this left such a negative impression. Google AI Pro had started to look like one of the better-value options in the coding-agent space, but if the default Antigravity CLI plus Gemini 3.5 Flash path burns quota this fast while also failing to carry work forward smoothly, the value proposition drops hard.&lt;/p&gt;
&lt;h3 id=&quot;recommendation&quot;&gt;Recommendation&lt;/h3&gt;
&lt;p&gt;Right now, the fairest read is that Antigravity CLI ships with a promising engine but an unstable developer experience. Gemini 3.5 Flash is fast enough to make the launch interesting, but the combination of permission persistence problems, Windows terminal roughness, odd environment recovery behavior, and unexpectedly harsh quota limits makes the overall package hard to recommend.&lt;/p&gt;
&lt;p&gt;For a quick Ship Bench-driven first impression, this lands as a strong “not recommended” for me. The model may be improving, but the CLI needs to stabilize before it feels like a real replacement for the more mature Gemini CLI experience.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/18556/antigravity-cli-first-impressions-fast-rough-and-not-ready</guid>
<pubDate>Thu, 21 May 2026 11:07:17 +0000</pubDate>
</item>
<item>
<title>From Chatbots to Coworkers: What Google Cloud Next '26 Means for Developers</title>
<link>https://coderlegion.com/15971/from-chatbots-to-coworkers-what-google-cloud-next-26-means-for-developers</link>
<description>&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;Originally published on &lt;a rel=&quot;nofollow&quot; href=&quot;https://dev.to/chinyereee/from-chatbots-to-coworkers-what-google-cloud-next-26-means-for-developers-2lnf&quot;&gt;dev.to&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;em&gt;A developer's breakdown of everything that matters from the Google Cloud Next '26 keynote and what to build with it next.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;For the last two years, every AI keynote has felt like a magic show &quot;look at this thing that can write a poem.&quot; &lt;/p&gt;
&lt;p&gt;Google Cloud Next '26 was different. &lt;/p&gt;
&lt;p&gt;The magic show is over. &lt;/p&gt;
&lt;p&gt;The actual machinery is here.&lt;/p&gt;
&lt;p&gt;Thomas Kurian and Sundar Pichai opened the keynote with a single, quietly disruptive idea: we're done with chatbots that talk. The new era is about agents that do: systems with persistent reasoning and autonomous execution that can hold context for days, plan multi-step workflows, and verify their own work. &lt;/p&gt;
&lt;p&gt;2024 and 2025 asked, &quot;Can we build an agent?&quot;, 2026 asks, &quot;How do we manage thousands of them?&quot;&lt;br&gt;
For developers especially those of us building at the intersection of frontend, data, and distributed systems this is the most consequential Next in years. Here's what actually shipped, what it means, and where to start.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-agentic-enterprise-blueprint&quot;&gt;The Agentic Enterprise Blueprint&lt;/h3&gt;
&lt;p&gt;Kurian framed the entire conference around one concept: &lt;strong&gt;The Agentic Enterprise&lt;/strong&gt;. The pitch is that the org chart of the future doesn't just have humans it has digital teammates working alongside them, and every employee becomes a builder who orchestrates a swarm of agents instead of executing tasks manually.&lt;/p&gt;
&lt;p&gt;The strategy rests on two ideas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Persistent reasoning&lt;/strong&gt;: Unlike a chatbot that forgets you the moment you close the tab, agents maintain state across days. They can pause, wait for an external trigger, resume, and finish the job like a human colleague would.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Owning the full stack:&lt;/strong&gt; Custom silicon (TPUs), the data layer (BigQuery), and the UX (Workspace) all built to work together. Kurian's not-so-subtle jab at competitors: they &quot;hand you the pieces, not the platform.&quot;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whether you buy that framing or not, the takeaway is clear Google is betting that vertically integrated infrastructure wins the agent era. And the rest of the keynote was them showing receipts.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;gemini-enterprise-agent-platform-the-vertex-ai-rebrand-&quot;&gt;Gemini Enterprise Agent Platform (The Vertex AI Rebrand)&lt;/h3&gt;
&lt;p&gt;The biggest rebrand of the event: &lt;strong&gt;Vertex AI&lt;/strong&gt; is now the &lt;strong&gt;Gemini Enterprise Agent Platform.&lt;/strong&gt; It's no longer a model garden it's a unified environment for the entire agent lifecycle, from prototype to production to post-deployment monitoring.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ygoiwx6ox5h0tgeg269.png&quot; alt=&quot;Architecture diagram of the Gemini Enterprise Agent Platform&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The core features that make up the platform:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent Studio:&lt;/strong&gt; A low-code, visual builder inside Workspace. Defines agent goals in natural language, wire up tools, and ship.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent Development Kit (ADK) v1.0&lt;/strong&gt;: The pro-code framework for the rest of us. Supports Python, JavaScript, Java, and Go, and lets you build graph-based agent networks (think LangGraph, but native).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent Identity:&lt;/strong&gt; Every agent gets a unique cryptographic ID. Every action it takes is auditable. This is huge for compliance finally, a real answer to &quot;Which agent did that, and why?&quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent Gateway:&lt;/strong&gt; Air traffic control for your agent fleet. Enforces policy, manages traffic, and uses Model Armor to block prompt injection attacks at the edge.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A2A (Agent-to-Agent) Protocol&lt;/strong&gt;: A standardized handshake that lets a Google-based agent securely delegate tasks to a Salesforce or SAP agent. Cross-vendor interoperability, finally.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent Runtime:&lt;/strong&gt; A re-engineered execution environment built for long-running agents. Your agent can fire off a task, wait three days for an external API to respond, and pick up exactly where it left off.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent Simulation &amp;amp; Evaluation:&lt;/strong&gt; Stress-test your agent against thousands of simulated user interactions before it ever sees production. Catches logic drift before your users do.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-s-actually-shipping&quot;&gt;What's Actually Shipping&lt;/h3&gt;
&lt;p&gt;If Day 1 sold the strategy, Day 2 showed the developer loop underneath it. The framing: build an agent system that plans a marathon for 10,000 runners through the Las Vegas Strip, using three agents — a planner (generates routes), an evaluator (scores them against constraints), and a simulator (runs the route end-to-end). The entire codebase and every demo were open-sourced as a GitHub repo plus Codelabs. The platform was anchored around four pillars and each pillar got its own demo segment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;️️ Build&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ADK (Agent Development Kit)&lt;/strong&gt;: the code-first framework, supporting Python, JavaScript, Java, and Go, with a new graph-based runtime for defining how agents collaborate.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent Studio&lt;/strong&gt;: the low-code counterpart. Define agent goals in natural language, wire up tools, publish.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Managed MCP&lt;/strong&gt;: Google now hosts the Model Context Protocol layer, eliminating a week of self-hosting plumbing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent Registry&lt;/strong&gt;: described as &quot;the DNS of your internet of agents.&quot; Auto-indexes every agent deployed to Agent Runtime, making them discoverable and governable.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent Marketplace&lt;/strong&gt;: third-party agents from Atlassian, Box, Lovable, Oracle, ServiceNow, Workday, and more, deployable directly from Gemini Enterprise.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Model Garden&lt;/strong&gt;: explicitly supports Claude, Gemini 3.1 Pro, Gemini 3.1 Flash, and others. Pick your model, swap when needed.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;  Scale&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Serverless Agent Runtime&lt;/strong&gt;: handles long-running state across days. Agents pause, wait for an external trigger, and resume without losing context.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A2A (Agent-to-Agent) Protocol&lt;/strong&gt;: the cross-vendor handshake. Created by Google, donated to the Linux Foundation. A Google agent can hand work to a Salesforce or SAP agent without brittle API code.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A2UI (Agent-to-User Interface)&lt;/strong&gt;: an open standard letting agents generate dynamic UI components instead of returning plain text. The marathon simulator's UI (Angular + 3D rendering of the Las Vegas Strip) was assembled live by the agent itself, not hardcoded.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The evaluation layer is now first-class. A separate model as a judge scores outputs across deterministic criteria (a marathon is exactly 26 miles 385 yards / 42.195 km) and non-deterministic ones (community impact, route quality). Agents auto-generate their evaluation UIs from the schema of their own outputs the path from &quot;fragile, unpredictable agentic loops&quot; to &quot;a rigorously evaluated network of experts.&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;  Govern&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The framing here was sharp: stop telling developers to &quot;shift left&quot; (own everything earlier) and start letting them &quot;shift down&quot; push the responsibility into the platform layer.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent Identity&lt;/strong&gt;: every agent gets a unique, immutable cryptographic credential. Every action is auditable back to a specific agent instance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent Gateway&lt;/strong&gt;: air traffic control for the agent fleet. Understands MCP and A2A protocols. Uses IAM policies to scope which sources can invoke agent actions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent Policies&lt;/strong&gt;: configurable guardrails. An agent permitted to read from BigQuery but blocked from triggering spend over a threshold.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Model Armor&lt;/strong&gt;: inline protection against prompt injection, tool poisoning, and sensitive data leakage at the gateway layer.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt; Optimize&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The end-to-end debugging story for when an agent breaks in production:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent Runtime trace view&lt;/strong&gt;: surfaces exactly where the reasoning chain or tool call failed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Gemini Cloud Assist Investigation&lt;/strong&gt;: takes a natural-language query and explores logs and events to surface the failing component down to a specific line.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Antigravity IDE&lt;/strong&gt;: powered by Gemini 3, connected via MCP. Proposes parameter-level remediations. In the demo: a missing token_threshold on the event-compaction config that was silently truncating the agent's working memory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Wiz Green Agent inside Claude Code with Opus&lt;/strong&gt;: Wiz now scans both agent code and infrastructure, and the same remediation surface runs inside Anthropic's IDE on Anthropic's model. An explicit multi-vendor signal: security tooling travels with the developer, regardless of stack.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What it means for you&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Day 1 sold the agentic enterprise. Day 2 laid out the loop you'll actually live in: build → scale → govern → optimize. Three things to actually act on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The evaluation layer is the part most teams will sleep on and regret. Judge models, deterministic + non-deterministic checks, auto-generated eval UIs: this is where agentic systems silently fail today, and it's now baked in.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A2A and A2UI are open standards, not Google-only. The Linux Foundation handoff matters. Don't dismiss them as vendor lock-in.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Antigravity is the bet to watch. It's Google's claim on what &quot;agentic developer experience&quot; means in 2026 and the multi-vendor Wiz/Claude Code integration shows the surface area is intentionally portable.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-ai-hypercomputer-8th-gen-tpus&quot;&gt;The AI Hypercomputer: 8th-Gen TPUs&lt;/h3&gt;
&lt;p&gt;To run millions of persistent agents in production, you need silicon designed for the workload. Google's answer is the 8th-generation TPU and crucially, it's a dual-chip strategy that splits training and inference into purpose-built hardware. This is Google explicitly attacking the &quot;memory wall&quot; that's been bottlenecking large models.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vi2iipcjlrqau26lrlqq.png&quot; alt=&quot;TPUs comparison with the previous&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What it means for you:&lt;/strong&gt; Cloud developers now have a dedicated inference engine in the TPU 8i. The economics of running a complex, multi-turn agent for every single user in your app just got real. The &quot;one agent per user&quot; pattern was a fantasy in 2024 at these unit costs, it becomes a default architecture.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;agentic-data-cloud-from-passive-storage-to-system-of-action&quot;&gt;Agentic Data Cloud: From Passive Storage to System of Action&lt;/h3&gt;
&lt;p&gt;&quot;Reasoning without context is just a guess&quot; that's how Karthik Narain, Google Cloud's Chief Product and Business Officer, framed the thesis behind the Agentic Data Cloud, which reimagines data as something agents act on, not just query.&lt;/p&gt;
&lt;p&gt;Three pieces matter most:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Knowledge Catalog&lt;/strong&gt;: Replaces traditional metadata catalogs. It auto-maps the business meaning of data across your entire estate (Google Docs, Slack, SQL warehouses, the lot). Your agents now understand that &quot;ARR&quot; in finance means the same thing as &quot;Annual Recurring Revenue&quot; in your CRM.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Memory Bank:&lt;/strong&gt; Long-term memory for agents. Where chat sessions used to forget you in five minutes, Memory Bank persists user preferences and project history across months of interaction.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Managed MCP:&lt;/strong&gt; You no longer host your own Model Context Protocol servers. Google now manages the connective tissue between Gemini and your databases, which kills a whole class of plumbing work.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;agentic-defense-the-wiz-integration-goes-live&quot;&gt;Agentic Defense: The Wiz Integration Goes Live&lt;/h3&gt;
&lt;p&gt;With the $32 billion Wiz acquisition fully closed, Google rolled out a &quot;Cyberforce&quot; of defensive agents. The pitch: stop reacting to alerts, start hunting threats autonomously.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Threat Hunting Agent:&lt;/strong&gt; Proactively scans for novel attack patterns that signature-based firewalls miss.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Detection Engineering Agent&lt;/strong&gt;: Writes and deploys new security rules in real time as threats evolve. The rule that catches tomorrow's attack didn't exist yesterday.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Wiz &quot;Red Agent&quot;&lt;/strong&gt;: An autonomous penetration tester that constantly probes your cloud infrastructure for unlocked doors before real attackers find them.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-agentic-taskforce-companies-already-shipping&quot;&gt;&lt;strong&gt;The Agentic Taskforce: Companies Already Shipping&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0w9hujnn4m5xd4dl3pky.png&quot; alt=&quot;Grid of 10 enterprise companies using Gemini agents in production&quot;&gt;&lt;/p&gt;
&lt;p&gt;The keynote closed with proof points companies actually getting ROI from agents in production right now. The pattern across all of them: agents handling the long-tail repetitive work, humans focusing on judgment calls. A few standouts worth zooming in on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;KPMG's Tax Swarms&lt;/strong&gt; are the clearest A2A protocol use case in the wild; their tax agent talks directly to a client's audit agent.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Virgin Voyages&lt;/strong&gt; going from 6-hour rebookings to 11 minutes is the clearest &quot;Agent Runtime + long-running state&quot; example.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Goldman Sachs&lt;/strong&gt; querying 10,000+ page filings in minutes is what the Knowledge Catalog actually unlocks at enterprise scale.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Walmart and Bosch&lt;/strong&gt; prove agents work at the edge — store floors and factory floors, not just data centers.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;So What Should You Actually Do With This?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you take one thing from Next '26, take this: the agent era isn't a future bet, it's a current one. The infrastructure is shipping, the protocols are standardizing, and Fortune 500s are already in production.&lt;/p&gt;
&lt;p&gt;Concretely, here's where to start depending on your stack:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Frontend devs&lt;/strong&gt;: Play with Agent Studio. The low-code builder is the fastest way to feel what an agentic UX is even supposed to look like.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Backend / data folks&lt;/strong&gt;: The Knowledge Catalog and Memory Bank are the most underrated announcements. Try wiring an agent to your own data with Managed MCP and skip a month of plumbing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Infra / platform engineers&lt;/strong&gt;: Watch the TPU 8i pricing closely. The economics of &quot;an agent per user&quot; change your architecture decisions for the next two years.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security teams&lt;/strong&gt;: Don't wait. Threat Hunting and Red Agent are the kind of tools your blue team will quietly start depending on by Q3.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The chatbot era taught us how to prompt. The agent era is going to teach us how to delegate. The developers who figure that out first are going to look like wizards by the end of 2026.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;If you watched the keynote too, what stood out for you? Drop a comment especially if you've started prototyping with the ADK. I'm curious what's actually working vs. what's still demo-ware.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/15971/from-chatbots-to-coworkers-what-google-cloud-next-26-means-for-developers</guid>
<pubDate>Mon, 27 Apr 2026 10:26:55 +0000</pubDate>
</item>
<item>
<title>Prompt Grounding in a Stateless World</title>
<link>https://coderlegion.com/13903/prompt-grounding-in-a-stateless-world</link>
<description>&lt;hr&gt;
&lt;h2 id=&quot;prompt-grounding-in-a-stateless-world&quot;&gt;Prompt Grounding in a Stateless World&lt;/h2&gt;
&lt;p&gt;When we say &lt;strong&gt;“CFA-grade”&lt;/strong&gt; in product language, we mean &lt;strong&gt;three engineering layers&lt;/strong&gt;: &lt;strong&gt;domain-scoped system text&lt;/strong&gt;, &lt;strong&gt;client portfolio summary&lt;/strong&gt;, and &lt;strong&gt;server-injected live quotes&lt;/strong&gt;—plus an optional &lt;strong&gt;attachment&lt;/strong&gt; lane for paid users.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;layer-1-system-prompt-persona-guardrails-&quot;&gt;Layer 1 — &lt;code&gt;SYSTEM_PROMPT&lt;/code&gt; (persona + guardrails)&lt;/h3&gt;
&lt;p&gt;In &lt;code&gt;app/api/ai/chat/route.ts&lt;/code&gt;, &lt;code&gt;SYSTEM_PROMPT&lt;/code&gt; constrains the assistant to &lt;strong&gt;finance&lt;/strong&gt;, tells it to use &lt;strong&gt;portfolio context&lt;/strong&gt; when present, to use &lt;strong&gt;“Current quote data”&lt;/strong&gt; when injected, and to treat &lt;strong&gt;“File the user included”&lt;/strong&gt; as authoritative for that turn. It also nudges &lt;strong&gt;1–3&lt;/strong&gt; markdown citations to reputable sources when helpful.&lt;/p&gt;
&lt;p&gt;This is how we &lt;strong&gt;steer&lt;/strong&gt; the model without storing conversation state server-side.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;layer-2-portfolio-context-block&quot;&gt;Layer 2 — Portfolio context block&lt;/h3&gt;
&lt;p&gt;The handler builds:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;const contextBlock = context
  ? `\n\nPortfolio context:\n${context}`
  : '\n\n(No portfolio context provided.)';
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;context&lt;/code&gt; is the &lt;strong&gt;entire&lt;/strong&gt; output of &lt;code&gt;buildPortfolioContext&lt;/code&gt; (Part 2–3). So grounding for holdings is &lt;strong&gt;exactly&lt;/strong&gt; what the client compiled — not a server-side join against a &lt;code&gt;portfolios&lt;/code&gt; table.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;layer-3-live-quote-injection-extractsymbolhints-&quot;&gt;Layer 3 — Live quote injection (&lt;code&gt;extractSymbolHints&lt;/code&gt;)&lt;/h3&gt;
&lt;p&gt;The route parses the &lt;strong&gt;user message&lt;/strong&gt; for tickers and known names (&lt;code&gt;NAME_TO_TICKER&lt;/code&gt;), caps symbols, calls internal &lt;code&gt;/api/quote&lt;/code&gt;, and appends a &lt;strong&gt;quote block&lt;/strong&gt; into the system string. That gives &lt;strong&gt;price truth&lt;/strong&gt; without the user pasting screenshots.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;layer-4-attachments-paid-&quot;&gt;Layer 4 — Attachments (paid)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;const attachedBlock = attachedContent
  ? `\n\nFile the user included (use this):\n${attachedContent}`
  : '';
const systemPrompt = SYSTEM_PROMPT + contextBlock + quoteBlock + attachedBlock;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;MAX_ATTACHED_CONTENT_LENGTH = 60_000&lt;/code&gt; on the server caps abuse. &lt;strong&gt;Different privacy contract&lt;/strong&gt; than default top-N context.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;provider-routing&quot;&gt;Provider routing&lt;/h3&gt;
&lt;p&gt;Comments in &lt;code&gt;route.ts&lt;/code&gt;: &lt;strong&gt;Gemini&lt;/strong&gt; preferred when &lt;code&gt;GOOGLE_GENERATIVE_AI_API_KEY&lt;/code&gt; is set (&lt;code&gt;gemini-1.5-flash&lt;/code&gt; free tier, &lt;code&gt;gemini-1.5-pro&lt;/code&gt; paid); &lt;strong&gt;OpenAI&lt;/strong&gt; fallback when configured or when Gemini errors.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;why-10k-csv-rows-never-hit-the-model-default-path-&quot;&gt;Why 10k CSV rows never hit the model (default path)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Compaction happens client-side&lt;/strong&gt; before the request. The model sees &lt;strong&gt;tens of lines&lt;/strong&gt;, not &lt;strong&gt;tens of thousands&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Part 6 of &lt;strong&gt;Sovereign Engineering&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read the full &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.pocketportfolio.app/book/sovereign-intelligence&quot;&gt;Sovereign Intelligence&lt;/a&gt; book or &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.pocketportfolio.app&quot;&gt;try the app&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/13903/prompt-grounding-in-a-stateless-world</guid>
<pubDate>Wed, 22 Apr 2026 11:16:00 +0000</pubDate>
</item>
<item>
<title>The Anthology of a Creative Developer: A 2026 Portfolio</title>
<link>https://coderlegion.com/14708/the-anthology-of-a-creative-developer-a-2026-portfolio</link>
<description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a rel=&quot;nofollow&quot; href=&quot;https://dev.to/challenges/new-year-new-you-google-ai-2025-12-31&quot;&gt;New Year, New You Portfolio Challenge Presented by Google AI&lt;/a&gt;&lt;/em&gt; (just check my github, not for prizes )&lt;/p&gt;
&lt;h3 id=&quot;the-prologue-beyond-the-sectioned-resume-&quot;&gt;The Prologue: Beyond the &quot;Sectioned Resume&quot;&lt;/h3&gt;
&lt;p&gt;Most portfolios feel like a list of ingredients. For 2026, I wanted mine to be the &lt;strong&gt;complete meal.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I’m &lt;strong&gt;Nitish Kumar&lt;/strong&gt;, an undergraduate engineering student and creative developer. I’ve always felt that code is just another way of storytelling—so I ditched the typical &quot;Hero-About-Projects&quot; grid. Instead, I built a &lt;strong&gt;narrative experience&lt;/strong&gt; that reflects how I think, build, and observe the world.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-gallery&quot;&gt;The Gallery&lt;/h3&gt;
&lt;p&gt;I built this to be &quot;authored&quot;—a stroll through a digital gallery rather than a scroll through a resume.&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;Explore the Story:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://nitishkr.fun&quot;&gt;https://nitishkr.fun&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-craft-how-i-built-it-&quot;&gt;The Craft (How I Built It)&lt;/h3&gt;
&lt;p&gt;If this portfolio were a book, here is how I bound the pages:&lt;/p&gt;
&lt;h4 id=&quot;the-technical-spine&quot;&gt;&lt;strong&gt;The Technical Spine&lt;/strong&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Next.js (App Router):&lt;/strong&gt; The foundation that holds the chapters together.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TypeScript:&lt;/strong&gt; My editor, ensuring every &quot;sentence&quot; (and variable) makes sense.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GSAP:&lt;/strong&gt; The cinematography—adding subtle, intentional motion that guides the eye.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tailwind CSS:&lt;/strong&gt; For the editorial aesthetic and spacing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloud Run:&lt;/strong&gt; My printing press, keeping everything fast and accessible.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;the-editorial-vision&quot;&gt;&lt;strong&gt;The Editorial Vision&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;I treated the design like a high-end magazine. Each section is a chapter:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Identity:&lt;/strong&gt; The &quot;Who&quot; and the mindset.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Workshop:&lt;/strong&gt; Skills and tools as a craftsman’s kit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Lab:&lt;/strong&gt; Projects as experiments, not just finished products.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Lens:&lt;/strong&gt; Using photography as a reflection of how I observe UI/UX in the real world.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;google-ai-the-creative-director&quot;&gt;&lt;strong&gt;Google AI: The Creative Director&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Google AI wasn't a &quot;generator&quot; for me; it was a &lt;strong&gt;thinking partner&lt;/strong&gt;. I used it to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Refine the Copy:&lt;/strong&gt; Helping me transition from dry technical descriptions to narrative-driven prose.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accessibility Review:&lt;/strong&gt; Ensuring the &quot;story&quot; remains readable for everyone.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Logic Soundboarding:&lt;/strong&gt; Using AI to brainstorm the best way to structure a chapter-based layout.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-director-s-cut-what-i-m-proud-of-&quot;&gt;The &quot;Director's Cut&quot; (What I'm Proud Of)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Story-Driven Flow:&lt;/strong&gt; The site feels like a single, continuous conversation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Intentional Dark Mode:&lt;/strong&gt; Designed from the ground up to feel like a premium &quot;night-time&quot; reading experience.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Power of Restraint:&lt;/strong&gt; Knowing when to stop adding features and start refining the white space.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Photography Integration:&lt;/strong&gt; My photos aren't just &quot;assets&quot;—they are windows into my perspective as a designer.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;closing-thoughts&quot;&gt;Closing Thoughts&lt;/h3&gt;
&lt;p&gt;This portfolio is my way of proving that engineering is an art form. It’s about more than just shipping code; it’s about crafting experiences that linger. &lt;/p&gt;
&lt;p&gt;Thanks for checking it out, and &lt;strong&gt;Happy New Year!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Let's connect!&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/sidkr222003&quot;&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;www.linkedin.com/in/nk2552003&quot;&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/14708/the-anthology-of-a-creative-developer-a-2026-portfolio</guid>
<pubDate>Mon, 13 Apr 2026 18:13:28 +0000</pubDate>
</item>
<item>
<title>Customizing Azure Cloud Shell for Cross Cloud Development</title>
<link>https://coderlegion.com/14159/customizing-azure-cloud-shell-for-cross-cloud-development</link>
<description>&lt;hr&gt;
&lt;p&gt;title: Customizing Azure Cloud Shell for Cross Cloud Development&lt;br&gt;
published: true&lt;br&gt;
series: Azure&lt;br&gt;
date: 2026-03-11 15:33:50 UTC&lt;br&gt;
tags: googlecloudplatform,linux,azurecloudshell,geminicli&lt;/p&gt;
&lt;h3 id=&quot;canonical-url-https-xbill999-medium-com-customizing-azure-cloud-shell-for-cross-cloud-development-5af464de14ab&quot;&gt;canonical_url: &lt;a rel=&quot;nofollow&quot; href=&quot;https://xbill999.medium.com/customizing-azure-cloud-shell-for-cross-cloud-development-5af464de14ab&quot;&gt;https://xbill999.medium.com/customizing-azure-cloud-shell-for-cross-cloud-development-5af464de14ab&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This article covers installing and Running Gemini CLI cross-cloud. The Azure Cloud Shell provides a basic Linux environment that can support running Gemini CLI.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/1024/1*IX3Bj1oC17mjEzXdmok5Fg.jpeg&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h5 id=&quot;what-is-gemini-cli-&quot;&gt;What is Gemini CLI?&lt;/h5&gt;
&lt;p&gt;The Gemini CLI is an open-source, terminal-based AI agent from Google that allows developers to interact directly with Gemini models, such as Gemini 2.5 Pro, for coding, content creation, and workflow automation. It supports file operations, shell commands, and connects to external tools via the Model Context Protocol (MCP).&lt;/p&gt;
&lt;p&gt;The full details on Gemini CLI are available here:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://geminicli.com/&quot;&gt;Build, debug &amp;amp; deploy with AI&lt;/a&gt;&lt;/p&gt;
&lt;h5 id=&quot;azure-cloud-shell&quot;&gt;Azure Cloud Shell&lt;/h5&gt;
&lt;p&gt;Azure Cloud Shell is a browser-based, authenticated terminal for managing Azure resources, accessible directly through the Azure portal, shell.azure.com, or the mobile app. It provides a preconfigured environment with Bash or PowerShell, eliminating local installation of tools. It runs on a temporary, secure, Linux-based host.&lt;/p&gt;
&lt;p&gt;The full background information on the Cloud Shell is here:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://azure.microsoft.com/en-us/get-started/azure-portal/cloud-shell&quot;&gt;https://azure.microsoft.com/en-us/get-started/azure-portal/cloud-shell&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;More information is available here:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://learn.microsoft.com/en-us/azure/cloud-shell/get-started/classic?wt.mc_id=fulltextsearch_inproduct_azure-portal-global-search&amp;amp;tabs=azurecli&quot;&gt;Get started with Azure Cloud Shell&lt;/a&gt;&lt;/p&gt;
&lt;h5 id=&quot;why-would-i-want-gemini-cli-on-azure-isn-t-that-a-google-thing-&quot;&gt;Why would I want Gemini CLI on Azure? Isn’t that a Google Thing?&lt;/h5&gt;
&lt;p&gt;Yes- Gemini CLI leverages the Google Cloud console and Gemini models but it is also open source and platform agnostic. Many applications are already cross-cloud so this enables familiar tools to be run natively on Microsoft Azure.&lt;/p&gt;
&lt;h5 id=&quot;activating-azure-cloudshell&quot;&gt;Activating Azure CloudShell&lt;/h5&gt;
&lt;p&gt;The Azure CloudShell comes preinstalled on all Azure Accounts.&lt;/p&gt;
&lt;p&gt;To access the shell — click the Terminal Icon in the upper right hand corner of the console:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/229/1*aDE04CS54dT9AnbfcRortA.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then activate the full shell:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/1024/1*CWfGFFPTC4TeQ37OyrBapg.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Note- the disk space in the environment is limited to 5GB- but this is sufficient for Gemini CLI, Google Cloud Tools, and some customization.&lt;/p&gt;
&lt;h5 id=&quot;node-version-management&quot;&gt;Node Version Management&lt;/h5&gt;
&lt;p&gt;Gemini CLI needs a consistent, up to date version of Node. The &lt;strong&gt;nvm&lt;/strong&gt; command can be used to get a standard Node environment:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/nvm-sh/nvm&quot;&gt;GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions&lt;/a&gt;&lt;/p&gt;
&lt;h5 id=&quot;verifying-node-js-in-azure-cloud-shell&quot;&gt;Verifying Node.js in Azure Cloud Shell&lt;/h5&gt;
&lt;p&gt;The version of Node.js is verified that it is recent enough to support Gemini CLI:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-console&quot;&gt;william@Azure:~$ node --version
v25.8.1
william@Azure:~$ npm --version
11.11.0
william@Azure:~$ 
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;gemini-cli-installation&quot;&gt;Gemini CLI Installation&lt;/h5&gt;
&lt;p&gt;You can then download the Gemini CLI :&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;npm install -g @google/gemini-cli
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You will see the log messages:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-console&quot;&gt;william@Azure:~$ npm install -g @google/gemini-cli
npm warn deprecated prebuild-install@7.1.3: No longer maintained. Please contact the author of the relevant native addon; alternatives are available.
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
npm warn deprecated glob@10.5.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me

added 618 packages in 48s

173 packages are looking for funding
  run `npm fund` for details
william@Azure:~$ 
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;testing-the-gemini-cli-environment&quot;&gt;Testing the Gemini CLI Environment&lt;/h5&gt;
&lt;p&gt;Once you have all the tools and the correct Node.js version in place- you can test the startup of Gemini CLI. You will need to authenticate with a Key or your Google Account:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;gemini
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;authentication&quot;&gt;Authentication&lt;/h5&gt;
&lt;p&gt;Several authentication options are available. To use an existing Code Assist licence — authenticate with a Google Account:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;&amp;gt; /auth                                                                                                                                                        
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ ? Get started │
│ │
│ How would you like to authenticate for this project? │
│ │
│ ● 1. Login with Google │
│ 2. Use Gemini API Key │
│ 3. Vertex AI │
│ │
│ (Use Enter to select) │
│ │
│ Terms of Services and Privacy Notice for Gemini CLI │
│ │
│ https://geminicli.com/docs/resources/tos-privacy/ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then set the GOOGLE_CLOUD_PROJECT to a valid project setup on the Google Cloud console:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;~ $ export GOOGLE_CLOUD_PROJECT=comglitn
~ $
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Other options include Google Cloud API Key that can be generated directly from the Google Cloud Console.&lt;/p&gt;
&lt;h5 id=&quot;using-gemini-cli-on-azure-cloud-shell&quot;&gt;Using Gemini CLI on Azure Cloud Shell&lt;/h5&gt;
&lt;p&gt;Once installed- Gemini CLI has direct access to the Cloud Shell environment:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;Logged in with Google: xbill@glitnir.com /auth
Plan: Gemini Code Assist Standard

✦ Your Azure project information is as follows:

   - Subscription Name: Azure subscription 1
   - Subscription ID: 3db3ce66-50b6-4d11-91ef-5950cf4039ed
   - Tenant ID: 40482c55-d00d-4c6d-8903-643d76a74b9c
   - Environment: AzureCloud
   - User: live.com#xbill@glitnir.com

  Active Resource Groups:
   - cloud-shell-storage-eastus (eastus)
   - NetworkWatcherRG (eastus)
   - vm (eastus)

  Project Metadata:
   - Repository: github.com/xbill9/gemini-cli-azure (https://github.com/xbill9/gemini-cli-azure)
   - Google Cloud Project ID: comglitn (from project_id.txt)                                            
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and Azure operations can be performed directly from Gemini CLI:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt; &amp;gt; list azure vms using the az command                                                                                                                          
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
✦ I'll list your Azure Virtual Machines using the az command.

╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓ Shell az vm list -d -o table [current working directory /home/william] (List all Azure Virtual Machines in the current subscription with detailed in… │
│ │
│ Name ResourceGroup PowerState PublicIps Fqdns Location │
│ --------- --------------- -------------- ------------- ------- ---------- │
│ azure-new VM VM deallocated 20.124.121.35 eastus │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ You have one Azure Virtual Machine:

   - Name: azure-new
   - Resource Group: VM
   - Power State: VM deallocated
   - Public IP: 20.124.121.35
   - Location: eastus
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;installing-google-cloud-tools&quot;&gt;Installing Google Cloud Tools&lt;/h5&gt;
&lt;p&gt;To simplify working with Google Cloud — install the Google Cloud Tools:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;https://docs.cloud.google.com/sdk/docs/install-sdk
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once the installation is completed — you can verify the setup:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-console&quot;&gt;william@Azure:~$ gcloud auth list
  Credentialed Accounts
ACTIVE ACCOUNT
* xbill@glitnir.com

To set the active account, run:
    $ gcloud config set account `ACCOUNT`

william@Azure:~$ gcloud config list
[compute]
region = us-west2
zone = us-west2-a
[core]
account = xbill@glitnir.com
disable_usage_reporting = False
project = comglitn

Your active configuration is: [default]
[environment: Development]
william@Azure:~$ 
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;installing-azure-customized-gemini-md&quot;&gt;Installing Azure Customized GEMINI.md&lt;/h5&gt;
&lt;p&gt;A sample GitHub repo contains tools for working with Gemini CLI on Azure. This repo is available here:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-shell&quot;&gt;git clone https://gitHub.com/xbill9/gemini-cli-azure
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A sample &lt;strong&gt;GEMINI.md&lt;/strong&gt; customized for the Azure environment is provided in the repo:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;This is a multi linux git repo hosted at:

github.com/xbill9/gemini-cli-azure

You are a cross platform developer working with 
Microsoft Azure and Google Cloud

You can use the Azure CLI :
https://learn.microsoft.com/en-us/cli/azure/install-azure-cli
https://learn.microsoft.com/en-us/cli/azure/
https://learn.microsoft.com/en-us/cli/azure/reference

https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?view=azure-cli-latest&amp;amp;pivots=apt

## Azure CLI Tools

You can use the Azure CLI to manage resources across Azure Storage, Virtual Machines, and other services.

- **List Resource Groups** : `az group list -o table`
- **List Storage Accounts** : `az storage account list -o table`
- **List Virtual Machines** : `az vm list -d -o table`

### Azure Update Script

- `azure-update`: This script is specifically for Azure Linux environments. It updates all packages and ensures necessary libraries are installed.

## Automation Scripts

This repository contains scripts for updating various Linux environments and tools:

- `linux-update`: Detects OS (Debian/Ubuntu/Azure Linux) and runs the corresponding update scripts.
- `azure-update`: Updates Azure Linux packages and installs necessary dependencies.
- `debian-update`: Updates Debian/Ubuntu packages and installs `git`.
- `gemini-update`: Updates the `@google/gemini-cli` via npm and checks versions of Node.js and Gemini.
- `nvm-update`: Installs NVM (Node Version Manager) and Node.js version 25.
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;perform-cross-cloud-operations&quot;&gt;Perform Cross Cloud Operations&lt;/h5&gt;
&lt;p&gt;Now that all the building blocks are in place- the Azure Cloud Shell has all the tools to have visibility into both clouds. Gemini CLI can be used directly with the &lt;strong&gt;gcloud&lt;/strong&gt; utility running on Azure:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-plaintext&quot;&gt;william@Azure:~/gemini-cli-azure$ gemini

  ▝▜▄ Gemini CLI v0.33.0
    ▝▜▄
   ▗▟▀ Logged in with Google /auth
  ▝▀ Gemini Code Assist Standard /upgrade

Tips for getting started:
1. /help for more information
2. Ask coding questions, edit code or run commands
3. Be specific for the best results
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
 &amp;gt; summarize my google cloud project with the gcloud tools                                                                                                      
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

✦ Based on the gcloud tools, here is a summary of your active Google Cloud project:

  Project Overview
   - Project Name: glitnir
   - Project ID: comglitn
   - Project Number: 1056842563084
   - Status: ACTIVE (Created: Aug 31, 2014)
   - Key Labels: firebase: enabled, generative-language: enabled.

&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;summary&quot;&gt;Summary&lt;/h5&gt;
&lt;p&gt;Gemini CLI was downloaded and tested from the Azure Cloud Shell. This is a complete fully working version of Gemini CLI with all the standard features like extensions, agent skills, and a familiar interface. Then, Gemini CLI was used to perform Azure native operations using the built-in tooling. Finally the Google Cloud Tools were downoaded and installed. This is a first step to enabling cross platform projects with both Google Cloud and Azure.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/14159/customizing-azure-cloud-shell-for-cross-cloud-development</guid>
<pubDate>Tue, 07 Apr 2026 13:46:11 +0000</pubDate>
</item>
<item>
<title>Meeting you where you are at: Gemini CLI on AWS CloudShell</title>
<link>https://coderlegion.com/14158/meeting-you-where-you-are-at-gemini-cli-on-aws-cloudshell</link>
<description>&lt;hr&gt;
&lt;p&gt;title: Meeting you where you are at: Gemini CLI on AWS CloudShell&lt;br&gt;
published: true&lt;br&gt;
series: AWS&lt;br&gt;
date: 2026-03-04 16:43:22 UTC&lt;br&gt;
tags: googlecloudplatform,aws,awscloudshell,geminicli&lt;/p&gt;
&lt;h3 id=&quot;canonical-url-https-aws-plainenglish-io-meeting-you-where-you-are-at-gemini-cli-on-aws-cloudshell-4b95bf379a26&quot;&gt;canonical_url: &lt;a rel=&quot;nofollow&quot; href=&quot;https://aws.plainenglish.io/meeting-you-where-you-are-at-gemini-cli-on-aws-cloudshell-4b95bf379a26&quot;&gt;https://aws.plainenglish.io/meeting-you-where-you-are-at-gemini-cli-on-aws-cloudshell-4b95bf379a26&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This article covers installing and Running Gemini CLI cross-cloud. The Amazon Cloud Shell provides a basic Linux environment that can support running Gemini CLI.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/1024/1*xynpyR9-Ov75w9W3DLwXlw.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h5 id=&quot;what-is-gemini-cli--1&quot;&gt;What is Gemini CLI?&lt;/h5&gt;
&lt;p&gt;The Gemini CLI is an open-source, terminal-based AI agent from Google that allows developers to interact directly with Gemini models, such as Gemini 2.5 Pro, for coding, content creation, and workflow automation. It supports file operations, shell commands, and connects to external tools via the Model Context Protocol (MCP).&lt;/p&gt;
&lt;p&gt;The full details on Gemini CLI are available here:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://geminicli.com/&quot;&gt;Build, debug &amp;amp; deploy with AI&lt;/a&gt;&lt;/p&gt;
&lt;h5 id=&quot;amazon-cloud-shell&quot;&gt;Amazon Cloud Shell&lt;/h5&gt;
&lt;p&gt;AWS CloudShell is a browser-based, pre-authenticated terminal that allows users to securely manage, explore, and interact with AWS resources directly from the &lt;a rel=&quot;nofollow&quot; href=&quot;https://aws.amazon.com/cloudshell/faqs/&quot;&gt;AWS Management Console&lt;/a&gt;. It comes pre-installed with the AWS CLI, popular programming languages (Python, Node.js), and developer tools, removing the need for local configuration.&lt;/p&gt;
&lt;p&gt;The full background information on the Cloud Shell is here:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://aws.amazon.com/cloudshell/&quot;&gt;Browser-based Shell - AWS CloudShell - AWS&lt;/a&gt;&lt;/p&gt;
&lt;h5 id=&quot;why-would-i-want-gemini-cli-on-aws-isn-t-that-a-google-thing-&quot;&gt;Why would I want Gemini CLI on AWS? Isn’t that a Google Thing?&lt;/h5&gt;
&lt;p&gt;Yes- Gemini CLI leverages the Google Cloud console and Gemini models but it is also open source and platform agnostic. Many applications are already cross-cloud so this enables familiar tools to be run natively on Amazon AWS.&lt;/p&gt;
&lt;h5 id=&quot;activating-amazon-cloudshell&quot;&gt;Activating Amazon CloudShell&lt;/h5&gt;
&lt;p&gt;The AWS CloudShell comes preinstalled on all AWS Accounts.&lt;/p&gt;
&lt;p&gt;To access the shell— click the Terminal Icon in the upper right hand corner of the console:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/499/1*yDdKnhbJV-WxirpqgKvAiw.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then activate the full shell:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/1024/1*0EU61bz4VrbMUqS9F5Rw9g.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Note- the disk space in the environment is limited to 1GB.&lt;/p&gt;
&lt;h5 id=&quot;verifying-node-js-in-aws-cloud-shell&quot;&gt;Verifying Node.js in AWS Cloud Shell&lt;/h5&gt;
&lt;p&gt;The version of Node.js is verified that it is recent enough to support Gemini CLI:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;~ $ npm --version
10.8.2
~ $ node --version
v20.20.0
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;gemini-cli-installation-1&quot;&gt;Gemini CLI Installation&lt;/h5&gt;
&lt;p&gt;You can then download the Gemini CLI :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo npm install -g @google/gemini-cli
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You will see the log messages:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;npm warn deprecated prebuild-install@7.1.3: No longer maintained. Please contact the author of the relevant native addon; alternatives are available.
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
npm warn deprecated glob@10.5.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me

added 624 packages in 37s

175 packages are looking for funding
  run `npm fund` for details
npm notice
npm notice New major version of npm available! 10.8.2 -&amp;gt; 11.11.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.11.0
npm notice To update run: npm install -g npm@11.11.0
npm notice
~ $ 
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;testing-the-gemini-cli-environment-1&quot;&gt;Testing the Gemini CLI Environment&lt;/h5&gt;
&lt;p&gt;Once you have all the tools and the correct Node.js version in place- you can test the startup of Gemini CLI. You will need to authenticate with a Key or your Google Account:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;gemini
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then you will get full access to the CLI:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/1024/1*ZVoCCfg__Zzx9KxzlU5rpw.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h5 id=&quot;authentication-1&quot;&gt;Authentication&lt;/h5&gt;
&lt;p&gt;Several authentication options are available. To use an existing Code Assist licence — authenticate with a Google Account:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/1024/1*RFqHAsYqU13tQ0yHg2ikcQ.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then set the GOOGLE_CLOUD_PROJECT to a valid project setup on the Google Cloud console:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;~ $ export GOOGLE_CLOUD_PROJECT=comglitn
~ $ 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Other options include Google Cloud API Key that can be generated directly from the Google Cloud Console.&lt;/p&gt;
&lt;h5 id=&quot;using-gemini-cli-on-aws&quot;&gt;Using Gemini CLI on AWS&lt;/h5&gt;
&lt;p&gt;Once installed- Gemini CLI has direct access to the Cloud Shell environment:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Logged in with Google: xbill@glitnir.com /auth
Plan: Gemini Code Assist Standard
Tips for getting started:
1. Ask questions, edit files, or run commands.
2. Be specific for the best results.
3. Create GEMINI.md files to customize your interactions with Gemini.
4. /help for more information.
 &amp;gt; what does the aws command line tool do?
✦ The AWS Command Line Interface (CLI) is a unified tool that allows you to manage and automate your Amazon Web Services (AWS) resources directly from your terminal.

  Core Functions
   * Service Management: Control almost all AWS services (S3, EC2, Lambda, IAM, etc.) using commands instead of the web-based Management Console.
   * Automation &amp;amp; Scripting: Incorporate AWS operations into shell scripts (Bash, PowerShell, Zsh) to automate repetitive tasks like backups, infrastructure deployment,
     or scaling.
   * Resource Manipulation: Perform actions such as uploading/downloading files from S3 buckets, starting/stopping EC2 instances, and managing security credentials.
   * Direct API Access: It acts as a wrapper around the AWS SDKs, providing a direct way to interact with AWS public APIs.

  Example Commands
   * aws s3 ls: List your S3 buckets.
   * aws ec2 describe-instances: View details about your virtual servers.
   * aws configure: Set up your access keys and default region.

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and AWS operations can be performed directly from Gemini CLI:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
 &amp;gt; aws s3 ls
✦ I will check if the AWS CLI is installed and then attempt to list your S3 buckets.

╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Action Required │
│ │
│ ? Shell aws --version &amp;amp;&amp;amp; aws s3 ls [current working directory /home/cloudshell-user] (Check for AWS CLI installation and list S3 buckets.) │
│ │
│ aws --version &amp;amp;&amp;amp; aws s3 ls │
│ Allow execution of: 'aws, aws'? │
│ │
│ 1. Allow once │
│ ● 2. Allow for this session │
│ 3. No, suggest changes (esc) │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;with the results returned:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;✦ I will check if the AWS CLI is installed and then attempt to list your S3 buckets.

╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓ Shell aws --version &amp;amp;&amp;amp; aws s3 ls [current working directory /home/cloudshell-user] (Check for AWS CLI installation and list S3 buckets.) │
│ │
│ aws-cli/2.33.30 Python/3.13.11 Linux/6.1.161-183.298.amzn2023.x86_64 exec-env/CloudShell exe/x86_64.amzn.2023 │
│ 2020-07-03 04:30:32 gitnir1 │
│ 2026-02-01 10:31:45 glitnir │
│ 2020-07-08 13:25:09 xbill99 │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ The AWS CLI is installed (version 2.33.30) and returned the following S3 buckets:

   - gitnir1 (Created: 2020-07-03)
   - glitnir (Created: 2026-02-01)
   - xbill99 (Created: 2020-07-08)
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;session-results&quot;&gt;Session Results&lt;/h5&gt;
&lt;p&gt;Because the Gemini CLI Installation is the same across environments- all session information is consistent:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Agent powering down. Goodbye! │
│ │
│ Interaction Summary │
│ Session ID: bf164e83-6373-458a-8ca3-91b5bdbf1fe3 │
│ Tool Calls: 3 ( ✓ 2 x 1 ) │
│ Success Rate: 66.7% │
│ User Agreement: 100.0% (3 reviewed) │
│ │
│ Performance │
│ Wall Time: 8m 53s │
│ Agent Active: 42.0s │
│ » API Time: 27.6s (65.6%) │
│ » Tool Time: 14.4s (34.4%) │
│ │
│ Model Usage │
│ Model Reqs Input Tokens Cache Reads Output Tokens │
│ ──────────────────────────────────────────────────────────────────────────── │
│ gemini-2.5-flash-lite 4 5,109 0 196 │
│ gemini-3-flash-preview 6 8,126 31,994 479 │
│ │
│ Savings Highlight: 31,994 (70.7%) of input tokens were served from the cache, reducing costs. │
│ │
│ Tip: Resume a previous session using gemini --resume or /resume │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;summary-1&quot;&gt;Summary&lt;/h5&gt;
&lt;p&gt;Gemini CLI was downloaded and tested from the AWS Cloud Shell. This is a complete fully working version of Gemini CLI with all the standard features like extensions, agent skills, and a familiar interface. Then, Gemini CLI was used to perform AWS native operations using the built-in AWS tooling. This is a first step to enabling cross platform projects with both Google Cloud and AWS.&lt;/p&gt;
&lt;hr&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/14158/meeting-you-where-you-are-at-gemini-cli-on-aws-cloudshell</guid>
<pubDate>Tue, 07 Apr 2026 13:45:26 +0000</pubDate>
</item>
<item>
<title>Building DevTo-MCP: Bridging Forem API and AI Assistants with Google Gemini</title>
<link>https://coderlegion.com/13561/building-devto-mcp-bridging-forem-api-and-ai-assistants-with-google-gemini</link>
<description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a rel=&quot;nofollow&quot; href=&quot;https://dev.to/devteam/join-the-built-with-google-gemini-writing-challenge-presented-by-major-league-hacking-mlh-win-17pk&quot;&gt;Built with Google Gemini: Writing Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;As software developers, DEV Community (dev.to) and the wider Forem ecosystem have increasingly become our digital home. It's the place we go for &quot;React best practices&quot;, solutions to obscure bugs, and career advice. But as our workflows become more tightly integrated with AI assistants, a gap has emerged: why can't our AI tools natively interact with this vibrant community?&lt;/p&gt;
&lt;p&gt;Why couldn't I tell my AI assistant to &quot;list popular Rust articles on DEV,&quot; or &quot;take this markdown draft and publish it directly to my DEV account&quot;?&lt;/p&gt;
&lt;p&gt;To solve this, I built &lt;strong&gt;DevTo-MCP&lt;/strong&gt;. It's an open-source Model Context Protocol (MCP) server that acts as a secure, type-safe bridge between the Forem API and AI assistants. And throughout this journey of architectural design, debugging, and implementation, &lt;strong&gt;Google Gemini&lt;/strong&gt; was my constant pair-programming companion.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-i-built-with-google-gemini&quot;&gt;What I Built with Google Gemini&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;DevTo-MCP&lt;/strong&gt; is essentially a translation layer. The Model Context Protocol (MCP) is an open standard that lets AI models use external tools and resources securely. DevTo-MCP takes the complex world of Forem API endpoints and turns them into simple, standardized functions that AI assistants (like Claude Desktop, Cursor, and custom Gemini agents) can seamlessly trigger.&lt;/p&gt;
&lt;p&gt;During the development process, Google Gemini played several pivotal roles:&lt;/p&gt;
&lt;h4 id=&quot;1-architectural-guidance-and-type-safety&quot;&gt;1. Architectural Guidance and Type Safety&lt;/h4&gt;
&lt;p&gt;Building an MCP server requires strict data validation. AI models can sometimes hallucinate parameters, so your server's defense must be ironclad. I decided to build DevTo-MCP using &lt;strong&gt;TypeScript&lt;/strong&gt;, &lt;strong&gt;Node.js&lt;/strong&gt;, and &lt;strong&gt;Zod&lt;/strong&gt; for runtime validation.&lt;/p&gt;
&lt;p&gt;Gemini helped me quickly map out the Forem API responses to Zod schemas. For example, when defining the &lt;code&gt;create_article&lt;/code&gt; tool, Gemini assisted in generating the complete schema configuration:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;server.tool(
    &quot;create_article&quot;,
    &quot;Create a new article on DEV Community.&quot;,
    {
        title: z.string().describe(&quot;Title of the article&quot;),
        body_markdown: z.string().optional().describe(&quot;Article content in markdown&quot;),
        published: z.boolean().optional().describe(&quot;Whether to publish immediately&quot;),
        tags: z.array(z.string()).max(4).optional().describe(&quot;List of tags (max 4)&quot;),
        canonical_url: z.string().url().optional(),
        organization_id: z.number().int().optional()
    },
    async (params) =&amp;gt; {
        // Implementation logic
    }
);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thanks to Gemini's suggestions, added strict &lt;code&gt;.max(4)&lt;/code&gt; constraints and &lt;code&gt;.url()&lt;/code&gt; validations to ensure we never send malformed data to the Forem API.&lt;/p&gt;
&lt;h4 id=&quot;2-the-self-healing-api-client&quot;&gt;2. The Self-Healing API Client&lt;/h4&gt;
&lt;p&gt;Forem's API deals with millions of requests, meaning rate limits and occasional network blips are part of the game. I wanted my MCP server to be resilient. I tasked Gemini with helping me write a self-healing HTTP client. &lt;/p&gt;
&lt;p&gt;Gemini generated the core logic for a robust &lt;code&gt;fetch&lt;/code&gt; wrapper that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reads &lt;code&gt;x-ratelimit-remaining&lt;/code&gt; headers.&lt;/li&gt;
&lt;li&gt;Implements an exponential backoff strategy for 429 (Too Many Requests) and 500 errors.&lt;/li&gt;
&lt;li&gt;Provides type-safe generic responses.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// A simplified look at the retry logic we implemented
private async request&amp;lt;T&amp;gt;(...): Promise&amp;lt;T&amp;gt; {
    for (let attempt = 0; attempt &amp;lt;= MAX_RETRIES; attempt++) {
        try {
            const response = await fetch(url, options);
            if (response.ok) return await response.json();
            
            if (this.isRetryable(response.status)) {
                const delay = this.getRetryDelay(attempt);
                await this.sleep(delay);
                continue;
            }
        } catch (error) {
             // Handle network level errors
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;3-ci-cd-and-npm-trusted-publishing-&quot;&gt;3. CI/CD and NPM &quot;Trusted Publishing&quot;&lt;/h4&gt;
&lt;p&gt;A crucial goal was to automate the publishing of this package to NPM using GitHub Actions. I wanted to use modern &lt;strong&gt;OpenID Connect (OIDC)&lt;/strong&gt; (NPM's Trusted Publishing) to avoid hardcoding &lt;code&gt;NPM_TOKEN&lt;/code&gt; secrets. &lt;/p&gt;
&lt;p&gt;I was stuck with persistent 404 errors during the pipeline execution. I pasted my YAML into Gemini, and it instantly spotted the missing piece: my workflow was missing the &lt;code&gt;environment: production&lt;/code&gt; declaration required to establish trust.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;jobs:
  publish:
    runs-on: ubuntu-latest
    environment: production  # &amp;lt;-- The magic line Gemini pointed out!
    permissions:
      id-token: write      
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;demo-1&quot;&gt;Demo&lt;/h3&gt;
&lt;p&gt;The project is fully open-source and available here:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/furkankoykiran/DevTo-MCP&quot;&gt;&lt;strong&gt;GitHub: furkankoykiran/DevTo-MCP&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can install and use it in any MCP-compatible client (like Claude Desktop) by simply adding it to your configuration:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;mcpServers&quot;: {
    &quot;devto&quot;: {
      &quot;command&quot;: &quot;npx&quot;,
      &quot;args&quot;: [&quot;-y&quot;, &quot;devto-mcp&quot;],
      &quot;env&quot;: {
        &quot;DEVTO_API_KEY&quot;: &quot;YOUR_API_KEY&quot;
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once installed, your AI assistant can fetch your latest followers, create article drafts, and analyze your reading list tags dynamically!&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-i-learned&quot;&gt;What I Learned&lt;/h3&gt;
&lt;p&gt;Building this project taught me several invaluable lessons:&lt;/p&gt;
&lt;h4 id=&quot;the-art-of-feature-cutting-&quot;&gt;The Art of &quot;Feature Cutting&quot;&lt;/h4&gt;
&lt;p&gt;Initially, I wanted to include a tool that allowed users to add reactions (like, unicorn, fire) to articles via the AI. However, I consistently encountered unreliable 401 errors from the API side. As tempting as it was to keep debugging it, I learned that in building AI tools, reliability is paramount. If an AI thinks it successfully reacted to a post but didn't, it breaks the chain of trust. I had to learn the difficult engineering skill of &quot;Feature Cutting&quot; and disabled the tool for the MVP.&lt;/p&gt;
&lt;h4 id=&quot;fallback-mechanisms-for-ux&quot;&gt;Fallback Mechanisms for UX&lt;/h4&gt;
&lt;p&gt;When the AI tried to fetch a &quot;Draft&quot; article using the standard &lt;code&gt;get_article_by_id&lt;/code&gt; endpoint, Forem would return a 404. Initially, the AI would give up and respond, &quot;This article doesn't exist.&quot; &lt;br&gt;
I learned to build fallback loops. Now, if the server receives a 404, it automatically makes a secondary request to &lt;code&gt;/articles/me/all&lt;/code&gt;, searches for the ID locally, and returns the draft. This completely changed how smoothly the AI interacted with unpublished content.&lt;/p&gt;
&lt;h4 id=&quot;modern-release-pipelines&quot;&gt;Modern Release Pipelines&lt;/h4&gt;
&lt;p&gt;I leveled up my Devops skills by successfully setting up an automated, secret-less NPM release pipeline using OIDC and GitHub Actions, understanding exactly when and why workflows trigger.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;google-gemini-feedback&quot;&gt;Google Gemini Feedback&lt;/h3&gt;
&lt;p&gt;My experience with Google Gemini was incredibly positive, with a few notable learning curves.&lt;/p&gt;
&lt;h4 id=&quot;what-worked-well-&quot;&gt;What Worked Well:&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Boilerplate and Structure:&lt;/strong&gt; Gemini was fantastic at instantly generating the foundational boilerplate for a TypeScript Node project.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Error Decoding:&lt;/strong&gt; When I encountered cryptic TypeScript errors regarding complex generic types for my API wrapper, Gemini was able to decipher them and explain the exact configuration changes needed in my &lt;code&gt;tsconfig.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Regex and Parsing:&lt;/strong&gt; Writing the logic to safely sanitize markdown payloads before sending them to the API was made trivial thanks to Gemini's rapid regex suggestions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;where-i-encountered-friction-the-candid-truth-&quot;&gt;Where I Encountered Friction (The Candid Truth):&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;API Hallucinations:&lt;/strong&gt; Because the Forem API has changed over time, Gemini occasionally hallucinated endpoints or parameter names that didn't exist or were deprecated. For example, it suggested sending data in a structure that the current API rejected. This actually reinforced my decision to use &lt;strong&gt;Zod&lt;/strong&gt;—building strict validation layers meant I caught these AI hallucinations in my test environment immediately.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Context Window Management:&lt;/strong&gt; When working across multiple files (&lt;code&gt;api-client.ts&lt;/code&gt;, &lt;code&gt;server.ts&lt;/code&gt;, and the Zod schema files), I sometimes found Gemini losing the thread of the specific generic types we had agreed upon earlier in the conversation. Reminding it of the interface definitions occasionally disrupted the flow state.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;look-forward&quot;&gt;Look Forward&lt;/h3&gt;
&lt;p&gt;The future of software engineering lies in AI assistants that have secure, predictable access to our development ecosystems. DevTo-MCP is my contribution to ensuring the DEV community isn't left behind in this AI revolution.&lt;/p&gt;
&lt;p&gt;I plan to expand DevTo-MCP to include organization-level analytics, more robust comment threading capabilities, and eventually figuring out a secure way to re-enable that elusive &quot;Reactions&quot; tool!&lt;/p&gt;
&lt;p&gt;Thank you to MLH and Google for hosting this challenge, it was the perfect catalyst to reflect on this build journey. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;(P.S. As a special proof-of-concept, this very article was drafted, formatted, and published autonomously to DEV.to by my AI Assistant (Gemini) using the DevTo-MCP server I built! A little meta-magic to wrap things up! )&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/13561/building-devto-mcp-bridging-forem-api-and-ai-assistants-with-google-gemini</guid>
<pubDate>Fri, 27 Mar 2026 14:18:37 +0000</pubDate>
</item>
<item>
<title>Ethni-CITY: The New Travel App</title>
<link>https://coderlegion.com/13143/ethni-city-the-new-travel-app</link>
<description>&lt;p&gt;If you're chronically online like I am, you're used to seeing tons of reels of people who travel to all these &quot;authentic&quot; destinations: Sao paulo, Marrakech, Cairo, Bangkok, and Bali. On Instagram or TikTok, it's pretty common to accompany your posts with a soundtrack, and it's the norm to post the latest trending songs to garner likes and reposts.&lt;br&gt;
No shame here.&lt;br&gt;
We all want validation, but so do the local economies we're coming from, and they hardly benefit when our money goes to international hotel chains and global brands. However, there are a few ways we can support locals while still making sure your pics eat, and one of them is by supporting local artists.&lt;br&gt;
With Ethni-CITY, we connect your pics to the local artists of the countries you visit to curate a niche storyboard that puts artists' songs on your posts, helping them monetize their craft, gain recognition, and in turn boost their micro-economy as your pics garner likes.&lt;/p&gt;
&lt;p&gt;To build this, I weaved spatial data with cultural analysis.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Using Gemini 3.1 pro preview as the main model, the app performs a deep multimodal analysis of your uploaded photos and then identifies the city and country the picture was taken in by looking for landmarks, cultural motifs, textile patterns and lighting conditions to determine.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I used Cesium JS along with Google Cloud photorealistic tiles, the agent transports you to the location of the photo, helping to tell a centric story.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To ensure the app survives the &quot;Hackathon Hug,&quot; I implemented a hierarchical fallback logic:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tier 1&lt;/strong&gt;: &lt;code&gt;gemini-3.1-pro-preview&lt;/code&gt; for high-fidelity creative direction.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tier 2&lt;/strong&gt;: &lt;code&gt;gemini-2.0-flash&lt;/code&gt; for high-speed fallback.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tier 3&lt;/strong&gt;: &lt;code&gt;gemini-1.5-flash-8b&lt;/code&gt; for emergency quota resilience.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;CHALLENGES FIXED:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;By integrating a heavyweight library like Cesium into NextJS App router environment, posed significant challenges with asset serving and Typescript definitions. I had to automate the movement of Cesium's build assets into the public directory during the pre-build phase to ensure the tiles are rendered correctly in production. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I'm grateful for Gemini for providing the tools to curate this experience and help promote local artists from around the world. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Explore the project on GitHub:&lt;/strong&gt;[ https://github.com/david-ac1/Ethni-CITY]&lt;br&gt;
&lt;strong&gt;Watch the demo:&lt;/strong&gt;[ https://youtu.be/kdrUzPtRw9Y?si=EzWt6DvbdbLjOk4V]&lt;/p&gt;
&lt;p&gt;&lt;em&gt;#GeminiLiveAgentChallenge #GoogleAI #GoogleCloud #Gemini&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/13143/ethni-city-the-new-travel-app</guid>
<pubDate>Wed, 18 Mar 2026 15:04:08 +0000</pubDate>
</item>
<item>
<title>Autopilot - A Technical Post-Mortem: I Fired Myself to Build an AI Army with Gemini</title>
<link>https://coderlegion.com/12551/autopilot-a-technical-post-mortem-i-fired-myself-to-build-an-ai-army-with-gemini</link>
<description>&lt;h3 id=&quot;1-the-genesis-the-builder-s-paradox&quot;&gt;1. The Genesis: The Builder's Paradox&lt;/h3&gt;
&lt;p&gt;In the world of engineering and technical blogging, we often face the &quot;Builder's Paradox&quot;: we can spend 40 hours perfecting a complex architecture, defining an S&amp;amp;OP data pipeline, or debugging microservices, but we cannot seem to find 15 minutes to effectively package and promote that work on social media. &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/_agents_part9/architecture.png&quot; alt=&quot;architecture&quot;&gt;&lt;/p&gt;
&lt;p&gt;I reached that breaking point with Datalaria. The content was there, the technical depth was solid, but distribution suffered due to a massive bottleneck: myself. I hated the marketing overhead.&lt;/p&gt;
&lt;p&gt;So, I made a strategic decision: I fired myself from the Community Manager role. In my place, I built &lt;strong&gt;Project Autopilot&lt;/strong&gt;: an autonomous, event-driven orchestrator running entirely inside GitHub Actions. Every time I push a new Markdown file (Hugo) to the repository, the system wakes up, extracts context using Google Gemini, and employs CrewAI to generate structured Twitter threads and LinkedIn posts. &lt;/p&gt;
&lt;p&gt;The initial conceptual diagram was simple: Text goes in, AI does magic, posts come out. The reality of building a deterministic pipeline with stochastic LLMs proved to be a much deeper engineering challenge.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/ai_agents_part9/architecture.png&quot; alt=&quot;Conceptual image of the project&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;2-under-the-hood-the-gemini-engine&quot;&gt;2. Under the Hood: The Gemini Engine&lt;/h3&gt;
&lt;p&gt;To build a CI/CD pipeline that writes content based on deeply technical articles (spanning Data Science, Operations, and S&amp;amp;OP processes), a simple string-parsing Python script wasn't going to cut it. We needed heavy reasoning and enormous memory capacity. &lt;/p&gt;
&lt;p&gt;This is where Google's Gemini models became the critical engine of the architecture.&lt;/p&gt;
&lt;h4 id=&quot;massive-context-ingestion-with-gemini-pro&quot;&gt;Massive Context Ingestion with Gemini Pro&lt;/h4&gt;
&lt;p&gt;Technical posts, especially those detailing Sales &amp;amp; Operations Planning (S&amp;amp;OP) or data hygiene with Python, are long and dense. They contain business logic, code snippets, and diagrams. I chose &lt;strong&gt;Gemini Pro&lt;/strong&gt; for the initial &lt;em&gt;Analyst Agent&lt;/em&gt; because of its massive context window and high retention. It can ingest a 3,000-word tutorial without &quot;forgetting&quot; the core premise established in the first paragraph. &lt;/p&gt;
&lt;h4 id=&quot;structured-data-extraction-with-gemini-flash&quot;&gt;Structured Data Extraction with Gemini Flash&lt;/h4&gt;
&lt;p&gt;While Gemini Pro handled the heavy comprehension, I needed an incredibly fast model for repetitive formatting and metadata extraction. &lt;strong&gt;Gemini Flash&lt;/strong&gt; became the go-to for these rapid-fire tasks. &lt;/p&gt;
&lt;p&gt;However, CI/CD pipelines require strict determinism. An LLM chatting in natural language breaks automation. I had to force Gemini to act as a strict data processor connecting the LLM output directly to the next GitHub Action step. Here is a real fragment of how we enforced strict JSON outputs using the Gemini API:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;import google.generativeai as genai
import os
import json

genai.configure(api_key=os.environ[&quot;GEMINI_API_KEY&quot;])

def extract_metadata(markdown_content):
    # We rely on Gemini Flash for speed and strict JSON formatting
    model = genai.GenerativeModel(
        model_name=&quot;gemini-1.5-flash&quot;,
        generation_config={
            &quot;temperature&quot;: 0.1,
            &quot;response_mime_type&quot;: &quot;application/json&quot;,
        }
    )
    
    prompt = f&quot;&quot;&quot;
    Analyze the following technical Markdown post.
    Return ONLY a valid JSON object matching this schema:
    {{
        &quot;summary&quot;: &quot;string&quot;,
        &quot;key_takeaways&quot;: [&quot;string&quot;, &quot;string&quot;],
        &quot;target_audience&quot;: &quot;string&quot;,
        &quot;suggested_hashtags&quot;: [&quot;string&quot;]
    }}
    
    CONTENT:
    {markdown_content}
    &quot;&quot;&quot;
    
    response = model.generate_content(prompt)
    return json.loads(response.text)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;By setting &lt;code&gt;response_mime_type=&quot;application/json&quot;&lt;/code&gt;, we eliminated the parsing errors that plague so many agentic workflows, allowing the orchestrator to elegantly pass metadata to the specialized CrewAI &lt;em&gt;Copywriter Agents&lt;/em&gt;.&lt;/p&gt;
&lt;h3 id=&quot;3-the-friction-the-good-the-bad-and-the-ugly&quot;&gt;3. The Friction: The Good, The Bad, and The Ugly&lt;/h3&gt;
&lt;p&gt;Integrating generative AI into a rigid CI/CD workflow is rarely as seamless as the quick-start documentation claims. Here is the raw reality of building with agents in production.&lt;/p&gt;
&lt;h4 id=&quot;the-good-speed-as-a-feature&quot;&gt;The Good: Speed as a Feature&lt;/h4&gt;
&lt;p&gt;In a CI/CD environment, latency translates directly to runner costs. The inference speed of &lt;strong&gt;Gemini 1.5 Flash&lt;/strong&gt; is staggering. By routing simple formatting tasks and metadata extraction to Flash, and reserving &lt;strong&gt;Gemini 1.5 Pro&lt;/strong&gt; strictly for deep reasoning within CrewAI's Analyst role, we optimized both speed and cost. LangChain provided the glue, but Gemini provided the horsepower. Out-of-the-box, its ability to natively parse complex Markdown structures (including embedded Mermaid diagrams and code blocks) saved me days of writing fragile regex parsers.&lt;/p&gt;
&lt;h4 id=&quot;the-bad-stochastic-models-vs-deterministic-pipelines&quot;&gt;The Bad: Stochastic Models vs. Deterministic Pipelines&lt;/h4&gt;
&lt;p&gt;The core engineering friction came from an impedance mismatch. GitHub Actions expects deterministic, step-by-step execution. LLMs are inherently stochastic.&lt;/p&gt;
&lt;p&gt;Even with temperature set to 0.1, a CrewAI agent might occasionally hallucinate a non-existent standard Markdown tag or subtly break a requested paragraph structure for LinkedIn. I quickly learned that Prompt Engineering is not enough; you need &lt;strong&gt;Defensive Programming&lt;/strong&gt;. I had to wrap execution chains in strict &lt;code&gt;Try/Catch&lt;/code&gt; blocks and implement Pydantic schemas to validate every single output segment. The LLM could not be trusted blindly to hit a social media API. It had to be heavily constrained, validated, and sanitized before any POST request was executed. We essentially had to build a deterministic &quot;quality gate&quot; around a non-deterministic brain.&lt;/p&gt;
&lt;h4 id=&quot;the-ugly-infinite-delegation-loops-and-runner-timeouts&quot;&gt;The Ugly: Infinite Delegation Loops and Runner Timeouts&lt;/h4&gt;
&lt;p&gt;The ugliest moments happened inside the GitHub Actions runners. CrewAI features an autonomous delegation mechanism where agents can pass tasks to one another. In theory, this is brilliant. In practice, without strict guardrails, it's a disaster.&lt;/p&gt;
&lt;p&gt;Occasionally, the Analyst Agent and the Writer Agent would get stuck in an infinite, highly-polite &quot;thinking loop,&quot; debating the best approach to summarize a technical paragraph. &lt;/p&gt;
&lt;p&gt;Because GitHub Actions charges by the minute, these silent loops would devour runner time until the system forcefully halted the pipeline with a frustrating &lt;code&gt;Error 143 (SIGTERM)&lt;/code&gt;. Fixing this required deep intervention: disabling unnecessary delegation in CrewAI, enforcing hard timeouts (&lt;code&gt;max_execution_time&lt;/code&gt;) at the agent level, and building strict fail-safes so the pipeline would cleanly abort rather than hang indefinitely.&lt;/p&gt;
&lt;h3 id=&quot;4-the-takeaway-operations-engineering&quot;&gt;4. The Takeaway: Operations Engineering&lt;/h3&gt;
&lt;p&gt;This project fundamentally shifted my mindset. Integrating AI into workflows is not a Prompt Engineering problem; &lt;strong&gt;it is a Systems Engineering and CI/CD problem.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Through this extreme &quot;dogfooding&quot; experiment, I learned to treat content and data pipelines with the exact same rigor I apply to a physical Supply Chain. An AI Agent is basically a highly capable but occasionally unpredictable node in an operations network. You must build fault tolerance, clear contracts (JSON schemas), and quality gating around it.&lt;/p&gt;
&lt;h3 id=&quot;5-looking-forward-the-s-amp-op-pivot&quot;&gt;5. Looking Forward: The S&amp;amp;OP Pivot&lt;/h3&gt;
&lt;p&gt;Project Autopilot solved my distribution problem. But automating social media was merely the sandbox.&lt;/p&gt;
&lt;p&gt;Now that Gemini and CrewAI have proven they can reliably ingest complex unstructured text, extract meaning, and orchestrate actions, the next step on the Datalaria roadmap is much more ambitious. I am taking this exact multi-agent architecture and pivoting it toward enterprise operations. &lt;/p&gt;
&lt;p&gt;Instead of reading Markdown to write tweets, the next iteration of these Gemini-powered agents will ingest fragmented ERP data, emails, and Excel dumps to automate data hygiene and summarize risks for &lt;strong&gt;S&amp;amp;OP (Sales &amp;amp; Operations Planning)&lt;/strong&gt; meetings. We are moving from solving the Builder's Paradox to optimizing real-world supply chains.&lt;/p&gt;
&lt;p&gt;The AI army is built. Now it's time to put it to real work.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/12551/autopilot-a-technical-post-mortem-i-fired-myself-to-build-an-ai-army-with-gemini</guid>
<pubDate>Wed, 11 Mar 2026 06:58:28 +0000</pubDate>
</item>
<item>
<title>Autopilot - The Creatives: How I Programmed an AI to be Cynical on Twitter and Corporate on LinkedIn</title>
<link>https://coderlegion.com/11427/autopilot-the-creatives-how-programmed-an-ai-be-cynical-on-twitter-and-corporate-linkedin</link>
<description>&lt;p&gt;In &lt;a rel=&quot;nofollow&quot; href=&quot;https://datalaria.com/en/posts/ai_agents_part2/&quot;&gt;Post 2: The Brain&lt;/a&gt;, we achieved something technically important: a Python script capable of reading my technical articles and extracting their essence into a structured JSON.&lt;/p&gt;
&lt;p&gt;But I have a problem. &lt;strong&gt;If I publish a JSON on Twitter, no one is going to read it.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Data is cold. Social media is emotional. For this &quot;Autopilot&quot; system to work, I don't need more analysts; I need &lt;strong&gt;creatives&lt;/strong&gt;. I need writers who understand the psychology of each platform.&lt;/p&gt;
&lt;p&gt;Today, we are going to give the machine a &lt;strong&gt;soul&lt;/strong&gt;. We are going to create &lt;strong&gt;&quot;The Creatives.&quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/ai_agents_part3/autopilot_creative.png&quot; alt=&quot;Conceptual image of the project - The Creatives&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;the-role-theory-the-stanislavski-method-for-ai-&quot;&gt;The Role Theory ( The Stanislavski Method for AI)&lt;/h3&gt;
&lt;p&gt;Large Language Models (LLMs) like Gemini are, in essence, method actors. If you ask them to &quot;write a tweet,&quot; they will give you a generic, boring tweet full of hashtags like #Technology #Innovation.&lt;/p&gt;
&lt;p&gt;But if you give them a &lt;strong&gt;role&lt;/strong&gt;, a &lt;em&gt;backstory&lt;/em&gt;, and a motivation, their behavior changes radically. In prompt engineering, this is the difference between a chatbot and an agent.&lt;/p&gt;
&lt;p&gt;For Datalaria, I don't want a generic voice. I want to cover two ends of the spectrum:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The Chaos (Twitter/X):&lt;/strong&gt; Brief, direct, slightly cynical, and allergic to corporate speak.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Order (LinkedIn):&lt;/strong&gt; Professional, inspiring, focused on business value.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;designing-the-personalities-the-code-&quot;&gt;Designing the Personalities (The Code)&lt;/h3&gt;
&lt;p&gt;Using &lt;strong&gt;CrewAI&lt;/strong&gt;, defining these personalities is as simple (and complex) as writing a biography. Here is the actual code from &lt;code&gt;src/agents.py&lt;/code&gt; that defines my two new digital employees.&lt;/p&gt;
&lt;h4 id=&quot;1-the-tech-influencer-twitter-&quot;&gt;1. The Tech Influencer (Twitter)&lt;/h4&gt;
&lt;p&gt;I explicitly asked it to hate corporate jargon and use lowercase for aesthetics.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;def twitter_writer_agent(self):
    return Agent(
        role=&quot;Tech Twitter Influencer&quot;,
        goal=&quot;Convert structured insights into a viral Twitter thread&quot;,
        backstory=&quot;&quot;&quot;You are a tech influencer who hates corporate jargon. 
        You write in a punchy, provocative style. 
        You use lowercase often for aesthetic. 
        You focus on the 'Marketing Hooks' from the input. 
        You NEVER use hashtags like #Technology, only niche ones.&quot;&quot;&quot;,
        llm=self.llm
    )
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;2-the-thought-leader-linkedin-&quot;&gt;2. The Thought Leader (LinkedIn)&lt;/h4&gt;
&lt;p&gt;Here we look for the &quot;Broetry&quot; style (short sentences with lots of whitespace) that works on LinkedIn.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;def linkedin_writer_agent(self):
    return Agent(
        role=&quot;LinkedIn Thought Leader&quot;,
        goal=&quot;Write a high-engagement LinkedIn post&quot;,
        backstory=&quot;&quot;&quot;You are a respected Voice in the Tech industry. 
        You write with empathy and professionalism. 
        You use the 'Broetry' style (short paragraphs, lots of whitespace). 
        You focus on the 'Key Takeaways' and business value. 
        You start with a strong hook.&quot;&quot;&quot;,
        llm=self.llm
    )
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;refactoring-the-multilingual-challenge&quot;&gt;Refactoring: The Multilingual Challenge&lt;/h3&gt;
&lt;p&gt;Datalaria is a global blog, so I faced a challenge: &lt;strong&gt;Do I need to create 4 different agents to write in Spanish and English?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The engineering answer is &lt;strong&gt;NO&lt;/strong&gt;. An agent is an entity with a personality; language is just a tool.&lt;/p&gt;
&lt;p&gt;Instead of duplicating agents, I duplicated the &lt;strong&gt;Tasks (&lt;code&gt;Tasks&lt;/code&gt;)&lt;/strong&gt;. In &lt;code&gt;src/tasks.py&lt;/code&gt;, I now explicitly define the output language:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;def twitter_task_es(self, agent, context):
    return Task(
        description=&quot;Escribe un hilo viral en ESPAÑOL basado en el análisis...&quot;,
        agent=agent,
        expected_output=&quot;Un hilo de Twitter en Español...&quot;
    )

def twitter_task_en(self, agent, context):
    return Task(
        description=&quot;Write a viral Twitter thread in ENGLISH based on the analysis...&quot;,
        agent=agent,
        expected_output=&quot;A Twitter thread in English...&quot;
    )
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This makes my pipeline scalable. If tomorrow I want to publish in French, I just add a task, I don't hire a new agent.&lt;/p&gt;
&lt;h3 id=&quot;the-battle-of-the-agents-real-results&quot;&gt;The Battle of the Agents: Real Results&lt;/h3&gt;
&lt;p&gt;To test this, I used my article on &lt;strong&gt;&quot;S&amp;amp;OP Processes with AI and BPMN.&quot;&lt;/strong&gt; It's a dense and boring topic if not sold well.&lt;/p&gt;
&lt;p&gt;Let's see what the agents did with the same input.&lt;/p&gt;
&lt;h4 id=&quot;the-result-on-twitter-the-cynic-&quot;&gt;The Result on Twitter (The Cynic)&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Author's note: This result hurt a little; it's more direct than I am.&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;stop drowning in walls of text.&lt;br&gt;
manually turning industrial narratives into diagrams is a grind. it’s a waste of brainpower.&lt;br&gt;
we’re using genai to turn messy s&amp;amp;op docs into precise bpmn diagrams in seconds.&lt;/p&gt;
&lt;h3 id=&quot;here-is-how-you-stop-being-a-human-translator-&quot;&gt;here is how you stop being a human translator. &lt;/h3&gt;
&lt;p&gt;most &quot;business analysis&quot; is just expensive friction.&lt;br&gt;
genai identifies hidden dependencies and feedback loops that human bas miss.&lt;br&gt;
it’s not just drawing; it’s uncovering the logic buried under corporate fluff.&lt;/p&gt;
&lt;h2 id=&quot;processengineering-industry40&quot;&gt;ProcessEngineering #Industry40&lt;/h2&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;the-result-on-linkedin-the-corporate-&quot;&gt;The Result on LinkedIn (The Corporate)&lt;/h4&gt;
&lt;blockquote&gt;&lt;p&gt;Stop drowning in 'walls of text' and PDF graveyards. &lt;/p&gt;
&lt;p&gt;Industrial processes are the heartbeat of your company.&lt;/p&gt;
&lt;p&gt;But they are often buried in dense S&amp;amp;OP narratives that no one reads.&lt;/p&gt;
&lt;p&gt;This creates a massive gap between what the business needs and what engineering builds.&lt;/p&gt;
&lt;p&gt;I’ve spent years seeing Technical Leads and Ops Managers struggle with this &quot;translation layer.&quot;&lt;/p&gt;
&lt;p&gt;The good news? Generative AI is changing the game.&lt;/p&gt;
&lt;p&gt;By using AI as a virtual Business Analyst, you can transform complex industrial narratives into precise BPMN diagrams in seconds.&lt;/p&gt;
&lt;p&gt;It’s not just about speed. It’s about clarity.&lt;/p&gt;
&lt;p&gt; How is your team currently bridging the gap between business narratives and technical execution? Let’s discuss in the comments.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;The difference is abysmal. The same model (Gemini 1.5 Flash), reading the same article, has generated two pieces of content completely distinct, adapted to the channel and the language.&lt;/p&gt;
&lt;p&gt;I already have:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The &lt;strong&gt;Brain&lt;/strong&gt; that understands the code.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Creatives&lt;/strong&gt; that write the copy.&lt;/li&gt;
&lt;li&gt;The files generated on my hard drive.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;But there is still a &quot;human&quot; in the loop. I still have to run &lt;code&gt;python main.py&lt;/code&gt; manually and copy-paste these texts onto social media.&lt;/p&gt;
&lt;p&gt;In the next post, we enter hostile territory. We are going to try to connect these agents with the outside world.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Coming soon Post 4: The API Nightmare.&lt;/strong&gt; I will try to connect my agents to Twitter and LinkedIn and (probably) almost lose my mind in the process.&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;Source Code:&lt;/strong&gt; The updated code with the new agents and multilingual support is available in the &lt;code&gt;/autopilot&lt;/code&gt; folder of the &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/Dalaez/datalaria-website&quot;&gt;GitHub repo&lt;/a&gt;.&lt;/p&gt;
</description>
<category>Tutorials</category>
<guid isPermaLink="true">https://coderlegion.com/11427/autopilot-the-creatives-how-programmed-an-ai-be-cynical-on-twitter-and-corporate-linkedin</guid>
<pubDate>Wed, 11 Feb 2026 07:10:42 +0000</pubDate>
</item>
<item>
<title>Autopilot - The Brain: Configuring Gemini and CrewAI to Read My Blog</title>
<link>https://coderlegion.com/11246/autopilot-the-brain-configuring-gemini-and-crewai-to-read-my-blog</link>
<description>&lt;p&gt;In &lt;a rel=&quot;nofollow&quot; href=&quot;https://datalaria.com/en/posts/ai_agents_part1/&quot;&gt;Post 1: The Strategy&lt;/a&gt;, I promised I wouldn't use third-party tools to manage my social media. I promised to build an &quot;army of agents.&quot;&lt;/p&gt;
&lt;p&gt;Today, we leave PowerPoint behind and open the IDE. We are going to build the system's &lt;strong&gt;Brain&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Today's goal is technical and concrete: create a Python script capable of reading a &lt;code&gt;.md&lt;/code&gt; file from my local repository, &quot;reading&quot; it as a senior engineer would, and returning a structured analysis in JSON.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/ai_agents_part2/autopilot_brain.png&quot; alt=&quot;Conceptual image of the project - The brain&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;the-tech-stack-speed-over-brute-force&quot;&gt;The Tech Stack: Speed Over Brute Force&lt;/h3&gt;
&lt;p&gt;For this task, I made two architectural decisions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The Orchestrator: CrewAI.&lt;/strong&gt; I need something that handles &quot;Agents&quot; and &quot;Tasks,&quot; not just text strings. CrewAI allows me to define &lt;em&gt;roles&lt;/em&gt; (who you are) and &lt;em&gt;goals&lt;/em&gt; (what you want), which is vital for the next steps.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Model: Google Gemini Flash.&lt;/strong&gt; At first, I tried using the most powerful model (Pro), but I realized a beginner's mistake: for massive reading and data extraction tasks, you don't need the philosopher, you need the fast librarian. Flash is much faster, cheaper (free in the current tier), and has a gigantic context window.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;step-1-repository-hygiene-clean-monorepo-&quot;&gt;Step 1: Repository Hygiene (Clean Monorepo)&lt;/h3&gt;
&lt;p&gt;Before writing code, we must organize the house. My blog is built on Hugo, and I don't want to clutter the website folder with Python scripts.&lt;/p&gt;
&lt;p&gt;I opted for a &quot;Clean Monorepo&quot; structure. I created an &lt;code&gt;autopilot&lt;/code&gt; folder at the root of the project that acts as an independent module.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;datalaria/
├── content/           &amp;lt;-- My Markdown posts (Hugo)
├── themes/
├── autopilot/         &amp;lt;-- THE NEW BRAIN 
│   ├── .env           &amp;lt;-- WATCH OUT! Keys go here (Ignored by Git)
│   ├── main.py        &amp;lt;-- Entry point
│   └── src/           &amp;lt;-- Agent and Task Logic
└── .gitignore         &amp;lt;-- Configured to protect my secrets
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Lesson learned:&lt;/strong&gt; Configure your &lt;code&gt;.gitignore&lt;/code&gt; before making the first commit. If you upload your API Key to GitHub by mistake, bots will take seconds to find it, or worse, you might encounter unwanted costs from other users finding your API Key.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;step-2-the-code-hands-on-&quot;&gt;Step 2: The Code (Hands-on)&lt;/h3&gt;
&lt;p&gt;The heart of this system isn't &lt;code&gt;main.py&lt;/code&gt;, but how we define the agent. Using the &lt;code&gt;crewai&lt;/code&gt; and &lt;code&gt;langchain_google_genai&lt;/code&gt; libraries, I defined my first digital employee: &lt;strong&gt;&quot;The Analyst.&quot;&lt;/strong&gt;&lt;/p&gt;
&lt;h4 id=&quot;the-obsession-with-openai-problem&quot;&gt;The &quot;Obsession with OpenAI&quot; Problem&lt;/h4&gt;
&lt;p&gt;Here I hit the first wall. CrewAI is designed by default to look for an OpenAI API Key (GPT-4). Although I configured Gemini, the script failed with the error:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ValueError: OPENAI_API_KEY is required&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The solution was to explicitly force the LLM (Large Language Model) inside the agent definition. This is what the code looks like in &lt;code&gt;src/agents.py&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;from crewai import Agent
from langchain_google_genai import ChatGoogleGenerativeAI
import os

class BlogAgents:
    def __init__(self):
        # We configure Gemini Flash explicitly
        self.llm = ChatGoogleGenerativeAI(
            model=&quot;gemini-1.5-flash&quot;,
            verbose=True,
            temperature=0.2, # Low temperature = More analytical, less creative
            google_api_key=os.getenv(&quot;GOOGLE_API_KEY&quot;)
        )

    def analyst_agent(self):
        return Agent(
            role='Senior Tech Editor &amp;amp; Data Analyst',
            goal='Analyze raw content to extract structured insights',
            backstory='You are a veteran tech editor...',
            allow_delegation=False,
            llm=self.llm  # &amp;lt;--- THIS LINE IS CRITICAL. If you remove it, it will look for OpenAI.
        )
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;step-3-prompt-engineering-json-mode-&quot;&gt;Step 3: Prompt Engineering (JSON Mode)&lt;/h3&gt;
&lt;p&gt;For this to be useful, the agent can't simply &quot;chat&quot; about the article. I need data that I can process computationally later.&lt;/p&gt;
&lt;p&gt;In &lt;code&gt;src/tasks.py&lt;/code&gt;, I defined the task with strict output instructions. I didn't use the API's native &quot;JSON Mode&quot; (which is sometimes complex to configure), but instead relied on the model's instruction-following capability:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;OUTPUT FORMAT: Return ONLY a valid JSON object with keys: summary, target_audience, tech_stack, key_takeaways, marketing_hooks.&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;the-result-it-works-&quot;&gt;The Result: It Works!&lt;/h3&gt;
&lt;p&gt;I ran the script against one of my densest technical articles (about S&amp;amp;OP processes). I was afraid the model might hallucinate or get lost in the text.&lt;/p&gt;
&lt;p&gt;The result in the terminal was this clean JSON:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;summary&quot;: &quot;This post demonstrates how Generative AI bridges the gap between complex business narratives and technical execution...&quot;,
  &quot;target_audience&quot;: &quot;Business Analysts, Industrial Engineers, Operations Managers...&quot;,
  &quot;tech_stack&quot;: [
    &quot;Generative AI (LLMs)&quot;,
    &quot;BPMN 2.0&quot;,
    &quot;Mermaid.js&quot;,
    &quot;Gemini API&quot;
  ],
  &quot;marketing_hooks&quot;: [
    &quot;Stop drowning in dense business requirements!  Learn how to use AI to turn messy narratives into professional BPMN diagrams...&quot;,
    &quot;Documentation as Code is here.  See how LLMs can generate Mermaid.js diagrams...&quot;
  ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It's impressive. The model not only summarized the text but understood the &lt;strong&gt;deep context&lt;/strong&gt;: it identified that the article talked about &quot;Mermaid.js&quot; and &quot;BPMN&quot; and generated marketing hooks (&quot;marketing_hooks&quot;) that actually sound like something I would write on Twitter.&lt;/p&gt;
&lt;h3 id=&quot;what-s-next-&quot;&gt;What's Next?&lt;/h3&gt;
&lt;p&gt;We already have the &lt;strong&gt;Brain&lt;/strong&gt; (&lt;code&gt;autopilot&lt;/code&gt;) capable of reading and understanding what I write in &lt;code&gt;content&lt;/code&gt;. The data is structured and ready.&lt;/p&gt;
&lt;p&gt;But a JSON doesn't get likes.&lt;/p&gt;
&lt;p&gt;In the next post, we are going to build &lt;strong&gt;The Creatives&lt;/strong&gt;. We will use this data to feed two new agents with opposing personalities: a viral expert for Twitter and a corporate strategist for LinkedIn. And we will see how &lt;em&gt;Prompt Engineering&lt;/em&gt; can drastically change the tone of an AI.&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;Source Code:&lt;/strong&gt; You can see the code for this module in the &lt;code&gt;/autopilot&lt;/code&gt; folder of the &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/Dalaez/datalaria-website&quot;&gt;Datalaria GitHub repository&lt;/a&gt;.&lt;/p&gt;
</description>
<category>Tutorials</category>
<guid isPermaLink="true">https://coderlegion.com/11246/autopilot-the-brain-configuring-gemini-and-crewai-to-read-my-blog</guid>
<pubDate>Sun, 08 Feb 2026 09:02:37 +0000</pubDate>
</item>
<item>
<title>Gemini Cost Management: Building Powerful AI Without Losing Control of Costs</title>
<link>https://coderlegion.com/11047/gemini-cost-management-building-powerful-ai-without-losing-control-of-costs</link>
<description>&lt;p&gt;AI adoption is accelerating fast—but so are AI bills.&lt;/p&gt;
&lt;p&gt;As teams integrate large language models into products, workflows, and platforms, a new challenge has emerged:&lt;br&gt;
&lt;strong&gt;How do you manage AI costs without limiting innovation?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is where &lt;strong&gt;Gemini Cost Management&lt;/strong&gt; becomes critical—ensuring that AI usage is &lt;strong&gt;efficient, predictable, and scalable&lt;/strong&gt;, not a financial surprise.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-is-gemini-cost-management-&quot;&gt;What Is Gemini Cost Management?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Gemini Cost Management&lt;/strong&gt; refers to the strategies, controls, and architectural patterns used to &lt;strong&gt;monitor, optimize, and govern usage of Gemini models&lt;/strong&gt;, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Token consumption&lt;/li&gt;
&lt;li&gt;Model selection (Flash vs higher-capability models)&lt;/li&gt;
&lt;li&gt;Request frequency&lt;/li&gt;
&lt;li&gt;Multimodal usage (text, image, video)&lt;/li&gt;
&lt;li&gt;Real-time vs batch workloads&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It’s not just about saving money—it’s about &lt;strong&gt;using AI responsibly and sustainably&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;why-ai-costs-grow-so-fast&quot;&gt;Why AI Costs Grow So Fast&lt;/h3&gt;
&lt;p&gt;AI costs are different from traditional cloud costs.&lt;/p&gt;
&lt;p&gt;They grow because of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Large prompts&lt;/li&gt;
&lt;li&gt;High-frequency requests&lt;/li&gt;
&lt;li&gt;Long conversations&lt;/li&gt;
&lt;li&gt;Multimodal inputs (images, documents)&lt;/li&gt;
&lt;li&gt;Unbounded agent loops&lt;/li&gt;
&lt;li&gt;Overuse of powerful models where smaller ones would work&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Without guardrails, even a small feature can quietly become expensive.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-role-of-gemini-models-in-cost-strategy&quot;&gt;The Role of Gemini Models in Cost Strategy&lt;/h3&gt;
&lt;p&gt;Google Gemini offers multiple model tiers, each designed for different cost–performance needs.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://framerusercontent.com/images/eND8w5a5591ONBklW4zZNkMmxk.png&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;gemini-flash-models&quot;&gt;Gemini Flash Models&lt;/h4&gt;
&lt;p&gt;Best for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Real-time APIs&lt;/li&gt;
&lt;li&gt;High-volume requests&lt;/li&gt;
&lt;li&gt;Chatbots&lt;/li&gt;
&lt;li&gt;Classification and extraction&lt;/li&gt;
&lt;li&gt;Streaming responses&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;strong&gt;Lowest latency + lower cost per request&lt;/strong&gt;&lt;/p&gt;
&lt;h4 id=&quot;higher-capability-gemini-models&quot;&gt;Higher-Capability Gemini Models&lt;/h4&gt;
&lt;p&gt;Best for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Deep reasoning&lt;/li&gt;
&lt;li&gt;Complex planning&lt;/li&gt;
&lt;li&gt;Long-context analysis&lt;/li&gt;
&lt;li&gt;Advanced multimodal understanding&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;strong&gt;Higher cost, higher intelligence&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; Cost management starts with &lt;strong&gt;choosing the right model for the job&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;key-pillars-of-gemini-cost-management&quot;&gt;Key Pillars of Gemini Cost Management&lt;/h3&gt;
&lt;h4 id=&quot;1-model-right-sizing&quot;&gt;1. Model Right-Sizing&lt;/h4&gt;
&lt;p&gt;Not every task needs the most powerful model.&lt;/p&gt;
&lt;p&gt;Examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use Gemini Flash for summarization, tagging, routing&lt;/li&gt;
&lt;li&gt;Escalate to advanced models only when confidence is low&lt;/li&gt;
&lt;li&gt;Mix models in a single workflow&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This alone can reduce costs dramatically.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;2-prompt-efficiency&quot;&gt;2. Prompt Efficiency&lt;/h4&gt;
&lt;p&gt;Poor prompts waste tokens.&lt;/p&gt;
&lt;p&gt;Cost-aware prompt design includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Short system instructions&lt;/li&gt;
&lt;li&gt;Avoiding repeated context&lt;/li&gt;
&lt;li&gt;Using references instead of raw text&lt;/li&gt;
&lt;li&gt;Structuring inputs clearly&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; Smaller prompts = lower cost + faster responses.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;3-token-amp-usage-monitoring&quot;&gt;3. Token &amp;amp; Usage Monitoring&lt;/h4&gt;
&lt;p&gt;You can’t control what you don’t measure.&lt;/p&gt;
&lt;p&gt;Track:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tokens per request&lt;/li&gt;
&lt;li&gt;Tokens per user&lt;/li&gt;
&lt;li&gt;Tokens per feature&lt;/li&gt;
&lt;li&gt;Peak usage windows&lt;/li&gt;
&lt;li&gt;Outlier requests&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Usage visibility turns cost from a surprise into a decision.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;4-caching-amp-reuse&quot;&gt;4. Caching &amp;amp; Reuse&lt;/h4&gt;
&lt;p&gt;Many AI responses don’t need to be regenerated.&lt;/p&gt;
&lt;p&gt;Cache:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Common prompts&lt;/li&gt;
&lt;li&gt;Repeated queries&lt;/li&gt;
&lt;li&gt;Static summaries&lt;/li&gt;
&lt;li&gt;Frequently accessed insights&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This avoids unnecessary calls and stabilizes spend.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;5-rate-limiting-amp-quotas&quot;&gt;5. Rate Limiting &amp;amp; Quotas&lt;/h4&gt;
&lt;p&gt;Protect yourself from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Abuse&lt;/li&gt;
&lt;li&gt;Infinite loops&lt;/li&gt;
&lt;li&gt;Unexpected spikes&lt;/li&gt;
&lt;li&gt;Misconfigured agents&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cost-safe systems enforce:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Per-user limits&lt;/li&gt;
&lt;li&gt;Per-feature quotas&lt;/li&gt;
&lt;li&gt;Daily or monthly caps&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;cost-management-for-gemini-agents&quot;&gt;Cost Management for Gemini Agents&lt;/h3&gt;
&lt;p&gt;Agent-based systems can be powerful—and dangerous for costs.&lt;/p&gt;
&lt;p&gt;Best practices:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hard stop conditions&lt;/li&gt;
&lt;li&gt;Max steps per agent run&lt;/li&gt;
&lt;li&gt;Cost budgets per task&lt;/li&gt;
&lt;li&gt;Confidence thresholds before escalation&lt;/li&gt;
&lt;li&gt;Human-in-the-loop checkpoints&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Agents should be &lt;strong&gt;goal-driven, not open-ended&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;multimodal-cost-considerations&quot;&gt;Multimodal Cost Considerations&lt;/h3&gt;
&lt;p&gt;Gemini supports text, images, documents, and more.&lt;/p&gt;
&lt;p&gt;Cost-aware multimodal usage:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Resize images before sending&lt;/li&gt;
&lt;li&gt;Extract text locally when possible&lt;/li&gt;
&lt;li&gt;Send references instead of raw files&lt;/li&gt;
&lt;li&gt;Avoid repeated multimodal inputs in loops&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Multimodal intelligence is powerful—but should be &lt;strong&gt;intentional&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;business-benefits-of-strong-gemini-cost-management&quot;&gt;Business Benefits of Strong Gemini Cost Management&lt;/h3&gt;
&lt;h4 id=&quot;predictable-spend&quot;&gt;Predictable Spend&lt;/h4&gt;
&lt;p&gt;No surprise bills at the end of the month.&lt;/p&gt;
&lt;h4 id=&quot;scalable-ai-adoption&quot;&gt;Scalable AI Adoption&lt;/h4&gt;
&lt;p&gt;Teams can ship AI features with confidence.&lt;/p&gt;
&lt;h4 id=&quot;-better-performance&quot;&gt;⚡ Better Performance&lt;/h4&gt;
&lt;p&gt;Optimized prompts and models reduce latency.&lt;/p&gt;
&lt;h4 id=&quot;smarter-architecture&quot;&gt;Smarter Architecture&lt;/h4&gt;
&lt;p&gt;Cost awareness leads to better system design.&lt;/p&gt;
&lt;h4 id=&quot;governance-amp-compliance&quot;&gt;Governance &amp;amp; Compliance&lt;/h4&gt;
&lt;p&gt;Clear usage boundaries across teams and products.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;common-mistakes-to-avoid&quot;&gt;Common Mistakes to Avoid&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Using one model for everything&lt;/li&gt;
&lt;li&gt;Ignoring token usage metrics&lt;/li&gt;
&lt;li&gt;Letting agents run without limits&lt;/li&gt;
&lt;li&gt;Re-sending full context every time&lt;/li&gt;
&lt;li&gt;Treating AI costs like static cloud costs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;AI spend is &lt;strong&gt;dynamic&lt;/strong&gt;—your controls must be too.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-future-of-ai-cost-management&quot;&gt;The Future of AI Cost Management&lt;/h3&gt;
&lt;p&gt;AI platforms are moving toward:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Budget-aware agents&lt;/li&gt;
&lt;li&gt;Cost-optimized routing&lt;/li&gt;
&lt;li&gt;Adaptive model selection&lt;/li&gt;
&lt;li&gt;Built-in usage intelligence&lt;/li&gt;
&lt;li&gt;Real-time spend feedback&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cost management won’t slow AI innovation—it will &lt;strong&gt;enable it&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;final-thoughts&quot;&gt;Final Thoughts&lt;/h3&gt;
&lt;p&gt;Gemini makes it easy to build intelligent, multimodal systems—but &lt;strong&gt;smart teams build them with cost in mind from day one&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Gemini Cost Management is about balance:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Power without waste&lt;/li&gt;
&lt;li&gt;Speed without excess&lt;/li&gt;
&lt;li&gt;Innovation without financial risk&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When AI becomes a core part of your product, &lt;strong&gt;cost awareness becomes a core engineering skill&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.linkedin.com/posts/edong186_if-scaling-ai-is-about-engineering-managing-activity-7424085443115327488-FvRK&quot;&gt;https://www.linkedin.com/posts/edong186_if-scaling-ai-is-about-engineering-managing-activity-7424085443115327488-FvRK&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Let’s stay connected:&lt;/p&gt;
&lt;p&gt;Instagram: &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.instagram.com/angular_development/&quot;&gt;https://www.instagram.com/angular_development/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Facebook: &lt;a rel=&quot;nofollow&quot; href=&quot;https://m.facebook.com/learnangular2plus/&quot;&gt;https://m.facebook.com/learnangular2plus/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Threads: &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.threads.net/@angular_development&quot;&gt;https://www.threads.net/@angular_development&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Medium: &lt;a rel=&quot;nofollow&quot; href=&quot;https://medium.com/@eraoftech&quot;&gt;https://medium.com/@eraoftech&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;coderlegion: &lt;a rel=&quot;nofollow&quot; href=&quot;https://coderlegion.com/user/Sunny&quot;&gt;https://coderlegion.com/user/Sunny&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Quora: &lt;a rel=&quot;nofollow&quot; href=&quot;https://neweraofcoding.quora.com/&quot;&gt;https://neweraofcoding.quora.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;YouTube: &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.youtube.com/@neweraofcoding&quot;&gt;https://www.youtube.com/@neweraofcoding&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;LinkedIn: &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.linkedin.com/company/infowebtech/&quot;&gt;https://www.linkedin.com/company/infowebtech/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hashnode: &lt;a rel=&quot;nofollow&quot; href=&quot;https://neweraofcoding.hashnode.dev/&quot;&gt;https://neweraofcoding.hashnode.dev/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;GitHub: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/angulardevelopment/&quot;&gt;https://github.com/angulardevelopment/&lt;/a&gt; | &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/sunny7899/&quot;&gt;sunny7899&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;BlueSky: &lt;a rel=&quot;nofollow&quot; href=&quot;https://bsky.app/profile/neweraofcoding.bsky.social&quot;&gt;https://bsky.app/profile/neweraofcoding.bsky.social&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Substack Newsletter: &lt;a rel=&quot;nofollow&quot; href=&quot;https://codeforweb.substack.com/&quot;&gt;https://codeforweb.substack.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Pinterest: &lt;a rel=&quot;nofollow&quot; href=&quot;https://in.pinterest.com/tech_nerd_life/&quot;&gt;https://in.pinterest.com/tech_nerd_life/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://dev.to/&quot;&gt;dev.to&lt;/a&gt;: &lt;a rel=&quot;nofollow&quot; href=&quot;https://dev.to/sunny7899&quot;&gt;https://dev.to/sunny7899&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Looking for web dev trainings: &lt;a rel=&quot;nofollow&quot; href=&quot;https://beginner-to-pro-training.vercel.app/&quot;&gt;https://beginner-to-pro-training.vercel.app/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Software development services: &lt;a rel=&quot;nofollow&quot; href=&quot;https://infowebtechnologies.vercel.app/&quot;&gt;https://infowebtechnologies.vercel.app/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Contribution to the web development community: &lt;a rel=&quot;nofollow&quot; href=&quot;https://code-for-next-generation.vercel.app/&quot;&gt;https://code-for-next-generation.vercel.app/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Book a session: &lt;a rel=&quot;nofollow&quot; href=&quot;https://topmate.io/softwaredev&quot;&gt;https://topmate.io/softwaredev&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Telegram Channel: &lt;a rel=&quot;nofollow&quot; href=&quot;https://t.me/neweraofcoding&quot;&gt;https://t.me/neweraofcoding&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Slack Community: &lt;a rel=&quot;nofollow&quot; href=&quot;https://join.slack.com/t/neweraofcoding/shared_invite/zt-x8vm1in4-9_VmsFrkKkG2ZFlGHRFI5Q&quot;&gt;Invite&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Discord Community: &lt;a rel=&quot;nofollow&quot; href=&quot;http://discord.gg/Nuc9YRngHz&quot;&gt;http://discord.gg/Nuc9YRngHz&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Buy me a coffee on Ko-fi: &lt;a rel=&quot;nofollow&quot; href=&quot;https://ko-fi.com/softwaredev&quot;&gt;https://ko-fi.com/softwaredev&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Ebooks: &lt;a rel=&quot;nofollow&quot; href=&quot;https://apexsunshine.gumroad.com/&quot;&gt;https://apexsunshine.gumroad.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For business inquiries: [*Emails are not allowed*](mailto:&lt;em&gt;Emails are not allowed&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;Thank you for being a part of the community. Happy coding!&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/11047/gemini-cost-management-building-powerful-ai-without-losing-control-of-costs</guid>
<pubDate>Wed, 04 Feb 2026 07:40:51 +0000</pubDate>
</item>
<item>
<title>Customised Universal Converter App</title>
<link>https://coderlegion.com/10818/customised-universal-converter-app</link>
<description>&lt;h4 id=&quot;universal-converter-pro&quot;&gt;Universal Converter Pro&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Tired of relying on generic online converters or dusting off old formulas?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I built &lt;a rel=&quot;nofollow&quot; href=&quot;https://datalaria.com/apps/conversor/&quot;&gt;&lt;strong&gt;Universal Converter Pro&lt;/strong&gt;&lt;/a&gt; a fast and clean web application designed to be a digital &quot;Swiss Army Knife&quot; for engineering and technical needs. Created with the help of AI, it solves the daily challenge of complex unit conversions. Some features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;6 Core Categories:&lt;/strong&gt; Comprehensive tools for Dimension, Energy, Time, Mechanics, Computing, and Radio Frequency.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Specialized Units:&lt;/strong&gt; Handles engineering tasks like converting Frequency to Wavelength ($\lambda = c / f$) or Pascals to PSI.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Utility Tools:&lt;/strong&gt; Includes a specific number format converter (swapping dots and commas for thousands/decimals).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Educational Context:&lt;/strong&gt; Not just a calculator; it explains the science behind the units (e.g., Binary vs. Decimal bytes).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AI-Powered Development:&lt;/strong&gt; Architecture and code generated using &lt;strong&gt;Gemini Canvas&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scalable Design:&lt;/strong&gt; A living project designed to expand with new professional needs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Built with HTML5, CSS3, and Vanilla JavaScript with Gemini AI assistance. Lightweight, responsive, and 100% serverless.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you want to know the details about how I built this &quot;Digital Swiss Army Knife&quot; with AI, please read the following article: &lt;a rel=&quot;nofollow&quot; href=&quot;https://datalaria.com/en/posts/app_unit_converter/&quot;&gt;&lt;strong&gt;Building My Digital 'Swiss Army Knife': A Custom Unit Converter with AI&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/10818/customised-universal-converter-app</guid>
<pubDate>Sat, 31 Jan 2026 08:52:02 +0000</pubDate>
</item>
<item>
<title>Building My Digital 'Swiss Army Knife': A Custom Unit Converter with AI</title>
<link>https://coderlegion.com/10677/building-my-digital-swiss-army-knife-a-custom-unit-converter-with-ai</link>
<description>&lt;p&gt;In any technical or engineering discipline, our daily work is filled with small but constant unit conversion tasks. We switch from Pascals to PSI, Kilowatts to Horsepower, Gigabytes to Terabytes, or from frequency to wavelength. In my university days, we had so-called &lt;em&gt;cheatsheets&lt;/em&gt;, which we used to keep handy on our calculators, folders, or notebooks for daily use (not for exams, of course ). Now, in the professional world, with the proliferation of all kinds of apps and websites, it's no longer necessary to rely on these resources, as we have a multitude of options available that allow us to quickly look up any conversion or unit, no matter how obscure.&lt;/p&gt;
&lt;p&gt;However, given the overwhelming number of options and this being such a recurrent and necessary task, I set myself a challenge: could I create my own unit converter? One that was fast, clean, visually appealing, and, above all, &lt;strong&gt;a living project&lt;/strong&gt;—a kind of &quot;digital Swiss army knife&quot; that I could expand over time according to my personal and professional needs. The answer, as in other blog projects, I found in AI. This post describes my own unit converter, covering its development from scratch with the support of &lt;strong&gt;Gemini's Canvas&lt;/strong&gt; feature to create a web application with multiple pages and categories.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/app_unit_converter/knife_conversor.png&quot; alt=&quot;Conceptual image of the Universal Converter Pro application&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;the-process-from-idea-to-conception&quot;&gt;The Process: From Idea to Conception&lt;/h4&gt;
&lt;p&gt;The goal was to create a modern, intuitive web application with clear navigation by categories, and that was smooth and easy to use. Instead of starting to write code from scratch, I began a conversation with Gemini, describing my vision:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;Create the structure for a multi-page HTML web application. The application will be a format and unit converter. The main page should display cards for the categories: Dimension, Energy, Time, Mechanics, Computing, and Radio Frequency with basic conversions. Each card should link to a dedicated conversion page for the corresponding category from a homepage where, in addition to the navigation cards for each category, there should be a format converter for the '.' and ',' symbols for thousands and decimals in numbers.&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Gemini's Canvas feature allowed me to see in real-time how the AI generated not just the code, but the complete project structure. After the initial draft and a couple of additional iterations focused on refining the design and fine-tuning the units, a first operational version of the application came to life: &lt;a rel=&quot;nofollow&quot; href=&quot;http://datalaria.com/apps/conversor&quot;&gt;My unit conversion application&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;a-look-at-the-categories-and-their-units&quot;&gt;A Look at the Categories and Their Units&lt;/h4&gt;
&lt;p&gt;What makes a tool like this useful is understanding &lt;strong&gt;what we are converting&lt;/strong&gt;. That's why the &quot;Universal Converter Pro&quot; not only calculates but also aims to be educational. These are the initial categories and the science behind their units:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/app_unit_converter/conversor-app.png&quot; alt=&quot;Universal Converter Pro Homepage Image&quot;&gt;&lt;/p&gt;
&lt;h5 id=&quot;1-dimension-measuring-the-space-around-us&quot;&gt;1. Dimension: Measuring the Space Around Us&lt;/h5&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/app_unit_converter/dimension.png&quot; alt=&quot;Conceptual image of the Dimension Converter Page&quot;&gt;&lt;/p&gt;
&lt;p&gt;This category groups the fundamental measures of physical space.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Length:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; It is the measure of one dimension, the distance between two points.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; All conversions are calculated using the &lt;strong&gt;meter (m)&lt;/strong&gt; as the reference unit. The formula converts the initial value to meters and then to the final unit.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Area:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; It is the measure of a two-dimensional surface.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; Similarly, the calculation is standardized using the &lt;strong&gt;square meter (m²)&lt;/strong&gt; as the base unit.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Volume:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; It is the measure of the space an object occupies in three dimensions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; The base unit for volume in the application is the &lt;strong&gt;liter (l)&lt;/strong&gt;, making it easy to convert between metric units and others like gallons or cups.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;2-energy-the-capacity-to-do-work&quot;&gt;2. Energy: The Capacity to Do Work&lt;/h5&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/app_unit_converter/energy.png&quot; alt=&quot;Conceptual image of the Energy Converter Page&quot;&gt;&lt;/p&gt;
&lt;p&gt;Here we group the units that describe how energy is transferred and used.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Energy:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; It is the capacity of a system to perform work.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; The &lt;strong&gt;Joule (J)&lt;/strong&gt; is the base unit of the International System. From it, conversions to calories, watt-hours, etc., are performed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Power:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; It is the rate at which energy is transferred or work is done. It's not the same to have energy as to be able to use it quickly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; The base unit is the &lt;strong&gt;Watt (W)&lt;/strong&gt;, which is equivalent to one Joule per second.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Temperature:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; It is a measure of the thermal energy or heat of a body.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; Unlike others, temperature does not use a simple conversion factor. The application uses specific formulas, always converting the input to &lt;strong&gt;degrees Celsius (°C)&lt;/strong&gt; as an intermediate step to then calculate the output unit (Fahrenheit or Kelvin).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;3-computing-the-world-of-bits-and-bytes&quot;&gt;3. Computing: The World of Bits and Bytes&lt;/h5&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/app_unit_converter/data.png&quot; alt=&quot;Conceptual image of the Data Converter Page&quot;&gt;&lt;/p&gt;
&lt;p&gt;The units that define our digital world.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Storage:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; It measures the capacity to store digital information.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; The fundamental unit is the &lt;strong&gt;Byte (B)&lt;/strong&gt;. It is important to note that in computing, multiples are not decimal (x1000), but binary (x1024). Thus, 1 Kilobyte is 1024 Bytes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bandwidth:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; It measures the data transfer rate in a network.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; Its base unit is &lt;strong&gt;bits per second (bps)&lt;/strong&gt;. In this case, the multiples are decimal (kbps, mbps, gbps), as they refer to transmission speed, not storage.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;4-time-our-most-precious-dimension&quot;&gt;4. Time: Our Most Precious Dimension&lt;/h5&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/app_unit_converter/time.png&quot; alt=&quot;Conceptual image of the Time Converter Page&quot;&gt;&lt;/p&gt;
&lt;p&gt;Although it seems simple, time conversion is fundamental in many calculations.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Time:&lt;/strong&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; It is the magnitude that measures the duration or separation of events.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; All units are converted to the base unit, the &lt;strong&gt;second (s)&lt;/strong&gt;, to then calculate the final value in minutes, hours, days, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;5-mechanics-the-forces-that-move-the-world&quot;&gt;5. Mechanics: The Forces that Move the World&lt;/h5&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/app_unit_converter/mechanics.png&quot; alt=&quot;Conceptual image of the Mechanics Converter Page&quot;&gt;&lt;/p&gt;
&lt;p&gt;This category is key in engineering and physics.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mass:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; It is the measure of the amount of matter in a body. It should not be confused with weight, which is the force exerted by gravity on that mass.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; The base unit is the &lt;strong&gt;Kilogram (kg)&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Force:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; It is any interaction that, unopposed, changes the motion of an object.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; The &lt;strong&gt;Newton (N)&lt;/strong&gt; is used as the base unit, defined as the force required to provide an acceleration of 1 m/s² to an object of 1 kg of mass.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pressure:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; It is the force applied perpendicularly to a surface.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; The base unit is the &lt;strong&gt;Pascal (Pa)&lt;/strong&gt;, which is equal to one Newton per square meter (N/m²).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;6-radio-frequency-the-invisible-spectrum&quot;&gt;6. Radio Frequency: The Invisible Spectrum&lt;/h5&gt;
&lt;p&gt;&lt;img src=&quot;https://datalaria.com/en/posts/app_unit_converter/radiofrequency.png&quot; alt=&quot;Conceptual image of the Radiofrequency Converter Page&quot;&gt;&lt;/p&gt;
&lt;p&gt;Fundamental for telecommunications.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Frequency:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; It is the number of repetitions of a periodic phenomenon per unit of time. In waves, it is the number of cycles per second.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; Its base unit is the &lt;strong&gt;Hertz (Hz)&lt;/strong&gt;, which is equivalent to one cycle per second.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Frequency to Wavelength:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What is it?&lt;/strong&gt; This is a special conversion that relates the frequency of an electromagnetic wave to its wavelength (the distance between two crests of the wave).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How is it calculated?&lt;/strong&gt; It is not a direct conversion but uses a physical formula: &lt;strong&gt;lambda = c / f&lt;/strong&gt;, where &lt;strong&gt;lambda&lt;/strong&gt; is the wavelength, &lt;strong&gt;f&lt;/strong&gt; is the frequency, and &lt;strong&gt;c&lt;/strong&gt; is the constant of the speed of light (299,792,458 m/s). The application converts the frequency to Hz, calculates the wavelength in meters, and then converts it to the desired length unit.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;conclusion-more-than-a-tool-a-living-project&quot;&gt;Conclusion: More Than a Tool, a Living Project&lt;/h4&gt;
&lt;p&gt;The &quot;Universal Converter Pro&quot; is the perfect example of how, thanks to AI, ideas and resources of great utility for our personal or professional daily life can be materialized. The process, in this case guided by Gemini Canvas, was incredibly agile, and the result is an application that not only solves my daily needs but also serves as a learning platform.&lt;/p&gt;
&lt;p&gt;My goal is to continue expanding it with new categories and units as the needs arise. This is the new era of personal software development: we no longer depend on generic tools but have the power to build our own custom solutions, with an AI copilot that translates our ideas into functional code.&lt;/p&gt;
&lt;hr&gt;
&lt;h5 id=&quot;sources-and-resources-&quot;&gt;Sources and Resources:&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Gemini&lt;/strong&gt;: &lt;a rel=&quot;nofollow&quot; href=&quot;https://gemini.google.com/app&quot;&gt;Official Gemini page to try its Canvas functionality&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;App's web&lt;/strong&gt;: &lt;a rel=&quot;nofollow&quot; href=&quot;http://datalaria.com/apps/conversor&quot;&gt;My unit conversion application&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/10677/building-my-digital-swiss-army-knife-a-custom-unit-converter-with-ai</guid>
<pubDate>Thu, 29 Jan 2026 06:49:42 +0000</pubDate>
</item>
<item>
<title>AI-Powered Flashcards</title>
<link>https://coderlegion.com/10485/ai-powered-flashcards</link>
<description>&lt;p&gt;&lt;strong&gt;Boost Your Learning with AI-Powered Flashcards&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Struggling to memorize complex terms or master a new language? I built a Custom Flashcard App designed to transform tedious study sessions into an efficient, AI-assisted experience. Whether for bilingual schooling or professional exams, it’s built for speed and focus. Key features:&lt;/p&gt;
&lt;p&gt;Three Input Modes: Manual entry, bulk upload (.csv/.txt), or 100% AI-generated content.&lt;/p&gt;
&lt;p&gt;Gemini AI Integration: Just enter a concept, and the AI automatically generates definitions, translations, and phonetics in seconds.&lt;/p&gt;
&lt;p&gt;Bilingual Optimization: Seamlessly switch between languages—perfect for science, history, or vocabulary drills.&lt;/p&gt;
&lt;p&gt;Smart Review Loop: The app tracks your mistakes and uses a &quot;re-run&quot; logic to ensure you master every card before finishing.&lt;/p&gt;
&lt;p&gt;Lightweight Gamification: Real-time scoring, progress tracking, and celebratory animations to keep motivation high.&lt;/p&gt;
&lt;p&gt;Privacy-Focused &amp;amp; Portable: No heavy databases—use your own Google AI Studio key for a completely custom and private experience.&lt;/p&gt;
&lt;p&gt;Clean UI: Minimalist design to eliminate distractions and maximize cognitive retention.&lt;/p&gt;
&lt;p&gt;Built with Python, JavaScript, and the Gemini API, this project proves how AI can act as a personal tutor to solve real-world learning hurdles.&lt;/p&gt;
&lt;p&gt;If you want to dive into the story behind this project and see the step-by-step creation process, check out the full article here: [https://datalaria.com/en/posts/app_flashcards/]&lt;/p&gt;
&lt;p&gt;Why this works:&lt;br&gt;
Consistency: It uses the same emoji-bullet-link structure as your Weather post.&lt;/p&gt;
&lt;p&gt;The &quot;Hook&quot;: It starts with the pain point (memorization) and offers the solution immediately.&lt;/p&gt;
&lt;p&gt;Technical Tease: It mentions the Gemini API and the &quot;re-run&quot; logic, which appeals to other developers.&lt;/p&gt;
&lt;p&gt;Call to Action: It directs traffic back to your detailed &quot;How-to&quot; post.&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/10485/ai-powered-flashcards</guid>
<pubDate>Mon, 26 Jan 2026 06:43:25 +0000</pubDate>
</item>
<item>
<title>Unlock Gemini’s True Potential: The One Setting You Need to Change Right Now</title>
<link>https://coderlegion.com/8374/unlock-geminis-true-potential-the-one-setting-you-need-to-change-right-now</link>
<description>&lt;p&gt;If you have used Google’s Gemini and found it impressive but ultimately disconnected from your actual work, you aren't alone. Many users describe the initial experience as talking to a very smart stranger—it knows the capital of France and can write a haiku, but it knows absolutely nothing about &lt;em&gt;you&lt;/em&gt;, your projects, or your schedule.&lt;/p&gt;
&lt;p&gt;However, the difference between Gemini being a novelty and a productivity powerhouse often comes down to a single, often overlooked toggle in the settings: &lt;strong&gt;The Google Workspace Extension.&lt;/strong&gt;&lt;/p&gt;
&lt;h4 id=&quot;the-problem-the-generic-ai-trap&quot;&gt;The Problem: The &quot;Generic&quot; AI Trap&lt;/h4&gt;
&lt;p&gt;Out of the box, most AI chatbots operate in a silo. If you want Gemini to summarize a meeting note you wrote last week, you usually have to find the document, copy the text, paste it into the chat, and then ask your question. This friction defeats the purpose of having an intelligent assistant; you end up doing the heavy lifting of data retrieval yourself.&lt;/p&gt;
&lt;h4 id=&quot;the-fix-connecting-the-dots&quot;&gt;The Fix: Connecting the Dots&lt;/h4&gt;
&lt;p&gt;The &quot;tiny adjustment&quot; that transforms the experience is granting Gemini access to your personal Google ecosystem. By enabling the Google Workspace extension, you allow the AI to securely &quot;read&quot; your Drive, Gmail, and Docs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How to enable it:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open Gemini (on the web or mobile app).&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Settings&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Extensions&lt;/strong&gt; (or &quot;Connected Apps&quot;).&lt;/li&gt;
&lt;li&gt;Toggle on &lt;strong&gt;Google Workspace&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;how-it-changes-your-workflow&quot;&gt;How It Changes Your Workflow&lt;/h4&gt;
&lt;p&gt;Once this connection is made, Gemini stops being a generic chatbot and starts acting like a personalized executive assistant. Here is what becomes possible:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Instant Document Retrieval:&lt;/strong&gt; Instead of digging through folders, you can ask, &lt;em&gt;&quot;Summarize the marketing plan I wrote last month,&quot;&lt;/em&gt; or &lt;em&gt;&quot;What were the key takeaways from the Project Alpha doc?&quot;&lt;/em&gt; Gemini finds the specific file and generates the answer instantly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Email Intelligence:&lt;/strong&gt; You can stop searching for keywords in your inbox. Commands like &lt;em&gt;&quot;Check my emails for the electric bill due date&quot;&lt;/em&gt; or &lt;em&gt;&quot;Summarize the email thread with the design team&quot;&lt;/em&gt; yield immediate, specific results.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cross-App Functionality:&lt;/strong&gt; If you use Google Keep for lists, you can ask specific questions like, &lt;em&gt;&quot;What is on my shopping list?&quot;&lt;/em&gt; or &lt;em&gt;&quot;Retrieve my inventory list from Keep,&quot;&lt;/em&gt; without ever opening the app.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;the-privacy-question&quot;&gt;The Privacy Question&lt;/h4&gt;
&lt;p&gt;Naturally, giving an AI access to your private emails and documents raises security concerns. Google has stated that when you use the Workspace extension:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Your content is used &lt;strong&gt;only&lt;/strong&gt; to answer your specific prompt.&lt;/li&gt;
&lt;li&gt;Your personal data is &lt;strong&gt;not&lt;/strong&gt; used to train the public Gemini model.&lt;/li&gt;
&lt;li&gt;The data remains within your secure enterprise or personal environment.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;verdict&quot;&gt;Verdict&lt;/h4&gt;
&lt;p&gt;If you have felt frustrated that AI tools feel &quot;disconnected&quot; from your reality, the Google Workspace extension is the missing link. It unifies your digital life—Drive, Docs, Gmail, and Keep—under one conversational interface.&lt;/p&gt;
&lt;p&gt;By making this one small adjustment, you stop shouting questions into a void and start interacting with an assistant that actually knows who you are and what you are working on.&lt;/p&gt;
</description>
<category>Automation Tools</category>
<guid isPermaLink="true">https://coderlegion.com/8374/unlock-geminis-true-potential-the-one-setting-you-need-to-change-right-now</guid>
<pubDate>Thu, 11 Dec 2025 03:09:49 +0000</pubDate>
</item>
<item>
<title>Model Context Protocol (MCP): A New Way to Connect Angular Apps with AI Servers</title>
<link>https://coderlegion.com/4858/model-context-protocol-mcp-a-new-way-to-connect-angular-apps-with-ai-servers</link>
<description>&lt;p&gt;The rise of &lt;strong&gt;AI-powered applications&lt;/strong&gt; has changed how we think about frontend–backend communication. Traditionally, Angular apps connect to REST APIs or GraphQL endpoints. But when we bring &lt;strong&gt;AI models&lt;/strong&gt; into the mix, things become trickier:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How does the frontend pass &lt;strong&gt;context&lt;/strong&gt; (user data, preferences, documents) safely to an AI model?&lt;/li&gt;
&lt;li&gt;How does the backend ensure the model has the &lt;strong&gt;right context&lt;/strong&gt; without overloading it with unnecessary data?&lt;/li&gt;
&lt;li&gt;How can we &lt;strong&gt;standardize communication&lt;/strong&gt; between tools, data sources, and AI systems?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is where the &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; comes in.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-is-mcp-&quot;&gt;What is MCP?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; is an emerging open standard designed to connect &lt;strong&gt;AI models&lt;/strong&gt; with &lt;strong&gt;tools, servers, and data sources&lt;/strong&gt; in a structured, secure, and reliable way.&lt;/p&gt;
&lt;p&gt;Instead of just “sending prompts” to an AI model, MCP defines a &lt;strong&gt;protocol&lt;/strong&gt; where:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;frontend (Angular)&lt;/strong&gt; can request capabilities from the server.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;server&lt;/strong&gt; exposes structured resources (databases, APIs, files, business logic).&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;model&lt;/strong&gt; gets only the context it needs — nothing more, nothing less.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Think of it as &lt;strong&gt;GraphQL for AI context&lt;/strong&gt;, but protocol-based.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;why-mcp-matters-for-angular-developers&quot;&gt;Why MCP Matters for Angular Developers&lt;/h3&gt;
&lt;p&gt;Most Angular apps today consume APIs. With AI in the mix, apps need to do more:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Context-Aware Queries&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Example: An Angular app for a CRM could ask the model:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;“Summarize the last 5 interactions with this customer.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;MCP ensures the model only gets those 5 interactions, not the entire CRM database.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Standardized Tooling&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Instead of writing custom APIs for each AI use case, MCP defines a common language between Angular frontend, your server, and the AI model.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security and Data Governance&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MCP prevents the model from having unrestricted access to sensitive production data.&lt;/li&gt;
&lt;li&gt;Access is explicitly granted via the MCP server, keeping &lt;strong&gt;data security front and center&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Future-Proofing&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;As AI capabilities evolve, MCP ensures your Angular app can plug into new tools and models without constantly rewriting integrations.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h3 id=&quot;how-it-works-simplified-flow-&quot;&gt;How It Works (Simplified Flow)&lt;/h3&gt;
&lt;p&gt;Here’s what a simple Angular + MCP setup might look like:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Angular Frontend&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;User interacts with UI (e.g., clicks “Summarize Customer History”).&lt;/li&gt;
&lt;li&gt;Angular calls your backend (MCP server) instead of talking to the AI directly.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;MCP Server&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MCP server receives request and checks what context is allowed.&lt;/li&gt;
&lt;li&gt;It fetches &lt;strong&gt;only the relevant data&lt;/strong&gt; from your database or APIs.&lt;/li&gt;
&lt;li&gt;It passes that structured context to the AI model.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AI Model&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Model receives a curated, secure context.&lt;/li&gt;
&lt;li&gt;It generates a response (e.g., a customer summary).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Angular UI&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Presenter/Service layer in Angular displays the AI’s response in the component.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h3 id=&quot;example-use-case-angular-helpdesk-app&quot;&gt;Example Use Case: Angular Helpdesk App&lt;/h3&gt;
&lt;p&gt;Imagine you’re building a &lt;strong&gt;Helpdesk dashboard&lt;/strong&gt; in Angular:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Without MCP: You’d have to manually build API routes to feed AI with customer tickets, chat logs, and metadata. Risk of oversharing or leaking sensitive info.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;With MCP:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Your Angular app requests: “context: last 3 unresolved tickets for customer X.”&lt;/li&gt;
&lt;li&gt;The MCP server ensures only those 3 tickets are passed to the AI.&lt;/li&gt;
&lt;li&gt;The AI generates a reply draft for the agent.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This separation ensures &lt;strong&gt;cleaner architecture, better security, and less boilerplate.&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;benefits-of-mcp-for-angular-ai-systems&quot;&gt;Benefits of MCP for Angular + AI Systems&lt;/h3&gt;
&lt;p&gt;✅ &lt;strong&gt;Thin frontend&lt;/strong&gt; → Angular focuses on UI, not AI plumbing.&lt;br&gt;
✅ &lt;strong&gt;Safer data access&lt;/strong&gt; → MCP acts as a guardrail for context.&lt;br&gt;
✅ &lt;strong&gt;Reusable server logic&lt;/strong&gt; → One MCP server can power multiple frontends (Angular, mobile, CLI).&lt;br&gt;
✅ &lt;strong&gt;Future-ready&lt;/strong&gt; → Works across different AI models and tools.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;final-thoughts-1&quot;&gt;Final Thoughts&lt;/h3&gt;
&lt;p&gt;AI will increasingly be part of modern Angular apps — whether for analytics dashboards, chatbots, or customer support assistants.&lt;/p&gt;
&lt;p&gt;By adopting the &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt;, you:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Keep your Angular frontend clean and UI-driven.&lt;/li&gt;
&lt;li&gt;Centralize context and security in the backend.&lt;/li&gt;
&lt;li&gt;Empower AI models with the right data, without oversharing.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In short: &lt;strong&gt;MCP is the missing bridge between Angular frontends, backend systems, and AI-powered intelligence.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;MCP use case is more of architectural decision - like the business wants to use different language and code packages. In the similar architectural category as to why people may choose to use microservices vs. monoliths—they don’t have to use MCP unless there’s a use case for it.&lt;/p&gt;
&lt;p&gt;Getting Started with Google MCP Servers&lt;/p&gt;
&lt;p&gt;look at &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/google/mcp&quot;&gt;https://github.com/google/mcp&lt;/a&gt;. This contains both remote (Google Managed) and local (open-source) MCP Servers that you can setup. All of them can be configured in Gemini CLI or other AI clients. One of the local MCP Servers is &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/google/mcp-security&quot;&gt;https://github.com/google/mcp-security&lt;/a&gt;. &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You should expect more of the Security suite being available as a remote MCP Servers as we go along. We recently announced Google Maps, BigQuery, GCE and GKE being available with more to come. Tools could be limited at the moment but this option solves a big problem when it comes to Security since it is tightly integrated with IAM and more. &lt;/li&gt;
&lt;li&gt;The bigger question is what are the features that you absolutely need but are not yet available as tools in the available MCP Servers?&lt;/li&gt;
&lt;li&gt;The MCP Servers being released are not just MCP Wrappers over existing APIs for these services. They are a set of action-oriented tools or in some cases can interpret schemas and more. This plays a key role in avoiding the context issues that plague agents and instead shifts a lot of the work to the MCP tooling layer.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;At the current moment MCPs have very little use cases. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;they are rarely used by itself&lt;/li&gt;
&lt;li&gt;normally u use it with LLMs or RAG&lt;/li&gt;
&lt;li&gt;MCPs are basically like travel adapter, they help to make an api more usable&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We are talking about extreme &quot;productivity gains&quot;. Instead of hiring a 1000 devs, only 10 is hired. Instead of hiring a team doing many roles, a single person with Agents and MCP servers will do.&lt;/p&gt;
&lt;p&gt;special path&lt;br&gt;
.ai\mcp\mcp.json&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-mcp-serve-means-quick-clarity-&quot;&gt;What “MCP serve” means (quick clarity)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;MCP server&lt;/strong&gt; runs locally and exposes your project (files, commands, context) to AI tools inside &lt;strong&gt;Visual Studio Code&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;It &lt;strong&gt;does NOT replace &lt;code&gt;ng serve&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
 MCP = AI context bridge&lt;br&gt;
 &lt;code&gt;ng serve&lt;/code&gt; = Angular dev server&lt;/p&gt;
&lt;p&gt;They work &lt;strong&gt;together&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;architecture-simple-mental-model-&quot;&gt;Architecture (simple mental model)&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;VS Code
 ├── Angular Project
 ├── ng serve (runs app)
 └── MCP Server (exposes project context to AI)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-prerequisites&quot;&gt;✅ Prerequisites&lt;/h3&gt;
&lt;p&gt;Make sure you have:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;node -v
npm -v
ng version
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If &lt;code&gt;ng&lt;/code&gt; is missing:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm install -g @angular/cli
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;1-open-angular-project-in-vs-code&quot;&gt;1️⃣ Open Angular project in VS Code&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;code my-angular-app
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Project structure should look like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;src/
 ├── app/
 │   ├── app.component.ts
 │   ├── app.routes.ts
 │   └── services/
 └── main.ts
angular.json
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;2-install-amp-setup-mcp-server&quot;&gt;2️⃣ Install &amp;amp; setup MCP server&lt;/h3&gt;
&lt;p&gt;Inside your Angular project:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm install -D @modelcontextprotocol/server-filesystem
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create a folder:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mkdir mcp
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create &lt;strong&gt;&lt;code&gt;mcp/server.js&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;import { FileSystemServer } from &quot;@modelcontextprotocol/server-filesystem&quot;;

const server = new FileSystemServer({
  rootDir: process.cwd(), // Angular project root
});

server.start();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add script to &lt;code&gt;package.json&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;scripts&quot;: {
    &quot;mcp:serve&quot;: &quot;node mcp/server.js&quot;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;3-start-mcp-server&quot;&gt;3️⃣ Start MCP server&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm run mcp:serve
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You now have an MCP server exposing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Components&lt;/li&gt;
&lt;li&gt;Services&lt;/li&gt;
&lt;li&gt;Routes&lt;/li&gt;
&lt;li&gt;Angular config&lt;/li&gt;
&lt;li&gt;RxJS logic&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;4-run-angular-dev-server-normal-way-&quot;&gt;4️⃣ Run Angular dev server (normal way)&lt;/h3&gt;
&lt;p&gt;In &lt;strong&gt;another terminal&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ng serve
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Your app runs at:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;http://localhost:4200
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;5-connect-mcp-to-vs-code&quot;&gt;5️⃣ Connect MCP to VS Code&lt;/h3&gt;
&lt;p&gt;Install &lt;strong&gt;MCP-compatible extension&lt;/strong&gt; (example):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Continue&lt;/li&gt;
&lt;li&gt;Cursor&lt;/li&gt;
&lt;li&gt;GitHub Copilot Chat (when MCP enabled)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then configure MCP:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;.vscode/settings.json&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;mcp.servers&quot;: {
    &quot;angular-project&quot;: {
      &quot;command&quot;: &quot;npm&quot;,
      &quot;args&quot;: [&quot;run&quot;, &quot;mcp:serve&quot;]
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Restart VS Code &lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;6-what-you-can-do-now-angular-specific-&quot;&gt;6️⃣ What you can do now (Angular-specific )&lt;/h3&gt;
&lt;p&gt;Inside AI chat in VS Code, you can ask:&lt;/p&gt;
&lt;p&gt;✅ “Explain data flow in this Angular app”&lt;br&gt;
✅ “Refactor this service using signals”&lt;br&gt;
✅ “Convert this component to standalone”&lt;br&gt;
✅ “Find unused RxJS subscriptions”&lt;br&gt;
✅ “Explain routing guards in this project”&lt;/p&gt;
&lt;p&gt;MCP gives &lt;strong&gt;real project awareness&lt;/strong&gt;, not guesses.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-common-mistakes&quot;&gt;⚠️ Common mistakes&lt;/h3&gt;
&lt;p&gt;❌ Thinking MCP replaces &lt;code&gt;ng serve&lt;/code&gt;&lt;br&gt;
❌ Running MCP outside project root&lt;br&gt;
❌ Not restarting VS Code&lt;br&gt;
❌ Missing Node 18+&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;best-practice-angular-devs-&quot;&gt;Best practice (Angular devs)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Run &lt;strong&gt;MCP + ng serve together&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use MCP for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Refactoring&lt;/li&gt;
&lt;li&gt;Architecture questions&lt;/li&gt;
&lt;li&gt;Debugging flows&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Keep &lt;code&gt;angular.json&lt;/code&gt; and &lt;code&gt;tsconfig&lt;/code&gt; included in MCP root&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-mcp-is-doing-1-liner-&quot;&gt;What MCP is doing (1-liner)&lt;/h3&gt;
&lt;p&gt;MCP lets the AI &lt;strong&gt;read and reason about your real Angular codebase&lt;/strong&gt;, not just generic Angular knowledge.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-basic-workflow-every-time-&quot;&gt;✅ Basic workflow (every time)&lt;/h3&gt;
&lt;h4 id=&quot;1-start-mcp-server&quot;&gt;1️⃣ Start MCP server&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm run mcp:serve
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Keep this terminal running.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;2-start-angular-app-normal-&quot;&gt;2️⃣ Start Angular app (normal)&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ng serve
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;MCP ≠ Angular server. Both run together.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;3-open-ai-chat-in-visual-studio-code&quot;&gt;3️⃣ Open AI Chat in Visual Studio Code&lt;/h4&gt;
&lt;p&gt;Use:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Continue / Cursor&lt;/li&gt;
&lt;li&gt;Copilot Chat (MCP enabled)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the AI &lt;strong&gt;knows your project files&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;core-mcp-usage-start-here-&quot;&gt;Core MCP Usage (START HERE)&lt;/h3&gt;
&lt;h4 id=&quot;ask-about-your-project-read-only-&quot;&gt;Ask about your project (read-only)&lt;/h4&gt;
&lt;p&gt;Best first prompts:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Explain this Angular project structure
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;How does data flow from components to services here?
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;What are the main routes in this app?
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Find unused services or dead code
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h4 id=&quot;ask-about-a-specific-file&quot;&gt;Ask about a specific file&lt;/h4&gt;
&lt;p&gt;Open a file, then ask:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Explain this component in simple terms
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Is this service following Angular best practices?
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Any RxJS issues or memory leaks here?
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h4 id=&quot;refactor-with-confidence-safe-&quot;&gt;Refactor with confidence (SAFE)&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;Refactor this component to standalone
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Convert this service to use signals
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Improve performance of this component
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Split this component into smart + dumb components
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;MCP ensures changes match &lt;strong&gt;your project&lt;/strong&gt;, not examples.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;angular-specific-power-prompts&quot;&gt;Angular-specific power prompts&lt;/h3&gt;
&lt;h4 id=&quot;signals&quot;&gt;Signals&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;Can this component use Angular signals instead of RxJS?
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;routing&quot;&gt;Routing&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;Explain route guards used in this project
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;cleanup&quot;&gt;Cleanup&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;Find unused imports and modules
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;testing&quot;&gt;Testing&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;Generate unit tests for this service using current setup
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;-common-beginner-mistakes&quot;&gt;⚠️ Common beginner mistakes&lt;/h3&gt;
&lt;p&gt;❌ Asking generic questions like &lt;em&gt;“Explain Angular services”&lt;/em&gt;&lt;br&gt;
✅ Ask &lt;em&gt;project-aware&lt;/em&gt; questions instead&lt;/p&gt;
&lt;p&gt;❌ Stopping MCP server&lt;br&gt;
✅ MCP must stay running&lt;/p&gt;
&lt;p&gt;❌ Expecting MCP to run the app&lt;br&gt;
✅ That’s still &lt;code&gt;ng serve&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;try-this-5-minute-starter-checklist&quot;&gt;Try this 5-minute starter checklist&lt;/h3&gt;
&lt;p&gt;Do these in order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ask → &lt;code&gt;Summarize this Angular project&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Ask → &lt;code&gt;What can be improved here?&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Ask → &lt;code&gt;Refactor one component safely&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Review diff&lt;/li&gt;
&lt;li&gt;Run app → &lt;code&gt;ng serve&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You’ll instantly feel the value.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://medium.com/@ahfaz.rahman/integrating-angular-mcp-server-with-modern-ides-like-vs-code-and-cursor-84444b0abfad&quot;&gt;https://medium.com/@ahfaz.rahman/integrating-angular-mcp-server-with-modern-ides-like-vs-code-and-cursor-84444b0abfad&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://angular.dev/ai/mcp&quot;&gt;https://angular.dev/ai/mcp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Google announced fully-managed MCP Servers for 4 services : BigQuery, GCE, GKE and Google Maps, with more to come in the future. If you'd like to get started with these, check out the tutorial: &lt;a rel=&quot;nofollow&quot; href=&quot;https://bit.ly/44Ux8jX&quot;&gt;https://bit.ly/44Ux8jX&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;✅ How we got here&lt;br&gt;
✅ Overview of the 4 MCP Servers announced&lt;br&gt;
✅ Getting Started with BigQuery and Google Maps MCP Servers&lt;br&gt;
✅ Detailed Google Cloud Project, Services and IAM setup&lt;br&gt;
✅ Integrating with Gemini CLI&lt;/p&gt;
&lt;p&gt;Let’s stay connected:&lt;/p&gt;
&lt;p&gt;Instagram: &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.instagram.com/angular_development/&quot;&gt;https://www.instagram.com/angular_development/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Facebook: &lt;a rel=&quot;nofollow&quot; href=&quot;https://m.facebook.com/learnangular2plus/&quot;&gt;https://m.facebook.com/learnangular2plus/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Threads: &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.threads.net/@angular_development&quot;&gt;https://www.threads.net/@angular_development&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Medium: &lt;a rel=&quot;nofollow&quot; href=&quot;https://medium.com/@eraoftech&quot;&gt;https://medium.com/@eraoftech&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;coderlegion: &lt;a rel=&quot;nofollow&quot; href=&quot;https://coderlegion.com/user/Sunny&quot;&gt;https://coderlegion.com/user/Sunny&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Quora: &lt;a rel=&quot;nofollow&quot; href=&quot;https://neweraofcoding.quora.com/&quot;&gt;https://neweraofcoding.quora.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;YouTube: &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.youtube.com/@neweraofcoding&quot;&gt;https://www.youtube.com/@neweraofcoding&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;LinkedIn: &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.linkedin.com/company/infowebtech/&quot;&gt;https://www.linkedin.com/company/infowebtech/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hashnode: &lt;a rel=&quot;nofollow&quot; href=&quot;https://neweraofcoding.hashnode.dev/&quot;&gt;https://neweraofcoding.hashnode.dev/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;GitHub: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/angulardevelopment/&quot;&gt;https://github.com/angulardevelopment/&lt;/a&gt; | &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/sunny7899/&quot;&gt;sunny7899&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;BlueSky: &lt;a rel=&quot;nofollow&quot; href=&quot;https://bsky.app/profile/neweraofcoding.bsky.social&quot;&gt;https://bsky.app/profile/neweraofcoding.bsky.social&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Substack Newsletter: &lt;a rel=&quot;nofollow&quot; href=&quot;https://codeforweb.substack.com/&quot;&gt;https://codeforweb.substack.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Pinterest: &lt;a rel=&quot;nofollow&quot; href=&quot;https://in.pinterest.com/tech_nerd_life/&quot;&gt;https://in.pinterest.com/tech_nerd_life/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://dev.to/&quot;&gt;dev.to&lt;/a&gt;: &lt;a rel=&quot;nofollow&quot; href=&quot;https://dev.to/sunny7899&quot;&gt;https://dev.to/sunny7899&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Looking for web dev trainings: &lt;a rel=&quot;nofollow&quot; href=&quot;https://beginner-to-pro-training.vercel.app/&quot;&gt;https://beginner-to-pro-training.vercel.app/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Software development services: &lt;a rel=&quot;nofollow&quot; href=&quot;https://infowebtechnologies.vercel.app/&quot;&gt;https://infowebtechnologies.vercel.app/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Contribution to the web development community: &lt;a rel=&quot;nofollow&quot; href=&quot;https://code-for-next-generation.vercel.app/&quot;&gt;https://code-for-next-generation.vercel.app/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Book a session: &lt;a rel=&quot;nofollow&quot; href=&quot;https://topmate.io/softwaredev&quot;&gt;https://topmate.io/softwaredev&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Telegram Channel: &lt;a rel=&quot;nofollow&quot; href=&quot;https://t.me/neweraofcoding&quot;&gt;https://t.me/neweraofcoding&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thank you for being a part of the community. Happy coding!&lt;/p&gt;
</description>
<category>Web Dev</category>
<guid isPermaLink="true">https://coderlegion.com/4858/model-context-protocol-mcp-a-new-way-to-connect-angular-apps-with-ai-servers</guid>
<pubDate>Wed, 20 Aug 2025 09:57:04 +0000</pubDate>
</item>
<item>
<title>Integrating Model Context Protocol with Gemini: The Definitive Guide to Modern Tool Calling</title>
<link>https://coderlegion.com/4718/integrating-model-context-protocol-with-gemini-the-definitive-guide-modern-tool-calling</link>
<description>&lt;p&gt;When it comes to tool-calling and agentic AI, the internet seems awash with tutorials for Anthropic’s Claude or the latest from OpenAI’s GPTs. But what if you want to ride the (less-documented) Gemini wave? If you’ve searched far and wide for a comprehensive guide on integrating the &lt;a rel=&quot;nofollow&quot; href=&quot;https://modelcontextprotocol.io/introduction&quot;&gt;Model Context Protocol (MCP)&lt;/a&gt;, Gemini, and modern tool schemas, only to find sparse blog posts tailored for other ecosystems, you’re not alone.&lt;/p&gt;
&lt;p&gt;This tutorial fills that void, focusing on practical integration of Gemini and Model Context Protocol, from both server and client perspectives. We’ll draw on &lt;strong&gt;Node.js with TypeScript&lt;/strong&gt;, &lt;strong&gt;@google/genai&lt;/strong&gt; for Gemini and schema definition, and &lt;strong&gt;@modelcontextprotocol/sdk&lt;/strong&gt; as our primary toolkit. By the end, you should be able registering tools server-side, and activate them client-side, all via MCP.&lt;/p&gt;
&lt;p&gt;But before diving into code, let’s clarify a crucial foundation: &lt;strong&gt;what is Model Context Protocol?&lt;/strong&gt; &lt;br&gt;
MCP is an emerging open protocol standard for AI tool-calling, defining how AI models (clients) can discover and call arbitrary server-side tools, in a language and vendor-agnostic way (basically not dependent on the language used to develop server-side tools, or the AI model vendor). Think of it as the universal handshake between advanced AI clients and your server’s unique APIs or business logic. By using MCP, you unlock true interoperability: write a tool once, and access it from any AI that speaks the protocol.&lt;/p&gt;
&lt;p&gt;Ready? Let’s dive in!&lt;/p&gt;
&lt;h4 id=&quot;setting-up-your-ai-tooling-playground&quot;&gt;Setting Up Your AI Tooling Playground&lt;/h4&gt;
&lt;p&gt;Before we start, we need the 'ol 'getting started boilerplate'. This phase is all about laying down some groundwork, and covers initializing a project and installing the bare-metal essentials.&lt;/p&gt;
&lt;h5 id=&quot;step-1-initialize-your-node-js-project&quot;&gt;Step 1: Initialize Your Node.js Project&lt;/h5&gt;
&lt;p&gt;Crack open a terminal and create a fresh directory:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mkdir gemini-mcp-tutorial &amp;amp;&amp;amp; cd gemini-mcp-tutorial
npm init -y
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;step-2-install-required-dependencies&quot;&gt;Step 2: Install Required Dependencies&lt;/h5&gt;
&lt;p&gt;You’ll need just four core libraries:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.npmjs.com/package/@google/genai&quot;&gt;&lt;code&gt;@google/genai&lt;/code&gt;&lt;/a&gt;: Official Google AI SDK (includes gemini, and other handy features like schema definitions for tool-calling).&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.npmjs.com/package/@modelcontextprotocol/sdk&quot;&gt;&lt;code&gt;@modelcontextprotocol/sdk&lt;/code&gt;&lt;/a&gt;: The heart of MCP communication (both server and client).&lt;/li&gt;
&lt;li&gt;(Optionally) &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/google/libphonenumber&quot;&gt;&lt;code&gt;google-libphonenumber&lt;/code&gt;&lt;/a&gt;, if you want to parse phone numbers as we will in our example tool.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Install them in a single swing:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm install @google/genai @modelcontextprotocol/sdk google-libphonenumber
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you’re using TypeScript (recommended), also install typing essentials:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm install -D typescript ts-node @types/node
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And, as with any journey, don’t forget to wire up your favorite Node.js (&lt;code&gt;tsconfig.json&lt;/code&gt; and so forth).&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;defining-mcp-servers-and-tools&quot;&gt;Defining MCP Servers and Tools&lt;/h4&gt;
&lt;p&gt;With dependencies squared away, let’s architect both the &lt;em&gt;server&lt;/em&gt; (which hosts our tools) and the &lt;em&gt;client&lt;/em&gt; (which acts as a Gemini-empowered AI agent that calls them).&lt;/p&gt;
&lt;h5 id=&quot;-a-creating-an-mcp-server&quot;&gt;(A) Creating an MCP Server&lt;/h5&gt;
&lt;p&gt;Your MCP server will describe its tools and listen for tool-calling requests from clients. Let’s work from the skeleton up.&lt;/p&gt;
&lt;p&gt;Start by defining the MCP server itself:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// src/mcp/server.ts
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';

const mcpServer = new McpServer({
  name: 'music-guys-mcp',
  version: '1.0.0',
  capabilities: {
    resources: {},
    tools: {},
  },
});

export default mcpServer;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, you’ll want to actually &lt;em&gt;run&lt;/em&gt; this server and choose how it listens for requests. Here, we’ll use a simple stdio (Standard Input/Output) transport, which works beautifully for testing and local development:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// src/mcp/serverMain.ts
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import mcpServer from './server';

export const createServer = async () =&amp;gt; {
  const transport = new StdioServerTransport();
  await mcpServer.connect(transport);
  console.info('MCP Server running on stdio');
};

createServer().catch((error) =&amp;gt; {
  console.error('Fatal error in main():', error);
  process.exit(1);
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Just like that, you’ve spun up an MCP-compliant tool server, ready for calls.&lt;/p&gt;
&lt;h5 id=&quot;-b-defining-and-registering-a-tool&quot;&gt;(B) Defining and Registering a Tool&lt;/h5&gt;
&lt;p&gt;Let’s register a real tool. Here’s a genuinely practical example: a tool that fetches user details by phone number. (We’ve stripped out some internal details, but you’re welcome to adapt as needed.)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// src/mcp/tools/getUser.ts
import mcpServer from '../server';
import { PhoneNumberUtil } from 'google-libphonenumber';

mcpServer.tool(
  'get-user-details',
  &quot;Returns user details according to their phone number, or 'undefined' if user doesn't exist.&quot;,
  {
    phoneNumber: {
      type: 'string',
      description: 'User phone number including country code as registered.',
      required: true,
    },
  },
  async (args) =&amp;gt; {
    const phoneNumber = args.phoneNumber;
    try {
      let formattedPhone = phoneNumber.startsWith('+')
        ? phoneNumber
        : `+${phoneNumber}`;
      const phoneUtil = PhoneNumberUtil.getInstance();
      const parsedNum = phoneUtil.parse(formattedPhone);

      // Here you'll implement your user lookup logic (e.g., using your database)
      // const user = ...;

      // For demonstration:
      if (parsedNum.getNationalNumber() === 1234567890) {
        // Mocked user:
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                id: 'user-id',
                name: 'Jane Doe',
                phone: formattedPhone,
              }),
            },
          ],
        };
      }
      return {
        content: [
          {
            type: 'text',
            text: 'User not found',
          },
        ],
      };
    } catch (e) {
      return {
        content: [
          {
            type: 'text',
            text: `Failed to parse phone number: ${phoneNumber}: ${e}`,
          },
        ],
      };
    }
  }
);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And wire up your tool handler so it loads when the server starts (add this to the serverMain.ts file we've just defined above):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// src/mcp/serverMain.ts (add at the top)
import './tools/getUser';
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now, run your server with &lt;code&gt;ts-node src/mcp/serverMain.ts&lt;/code&gt;, and it will listen for tool calls from any MCP-compatible client!&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;implementing-the-mcp-client&quot;&gt;Implementing the MCP Client&lt;/h4&gt;
&lt;p&gt;At this point, we're half-way there. In this section, I'll walk you through on how to connect Gemini (or any MCP-aware model) to your server.&lt;/p&gt;
&lt;h5 id=&quot;-a-mcp-client-bootstrap&quot;&gt;(A) MCP Client Bootstrap&lt;/h5&gt;
&lt;p&gt;First, let’s lay down the scaffolding for establishing the connection to the server (and to Gemini itself):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// src/mcp/client.ts
import { Client, StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
import { GoogleGenAI } from '@google/genai';

export class MCPClient {
  private mcp: Client;
  private googleGenAI: GoogleGenAI;
  private tools: any[] = [];
  private transport: StdioClientTransport | null = null;

  constructor(apiKey: string) {
    this.googleGenAI = new GoogleGenAI({ apiKey });
    this.mcp = new Client({
      name: 'music-guys-mcp-client-cli',
      version: '1.0.0',
    });
  }

  // Connect through stdio to our running mcp server.
  async connectToServer(serverScriptPath: string) {
    const command = process.execPath;
    this.transport = new StdioClientTransport({
      command,
      args: [serverScriptPath],
    });
    await this.mcp.connect(this.transport);

    // Fetch available tools
    const toolsResult = await this.mcp.listTools();
    this.tools = toolsResult.tools.map(tool =&amp;gt; ({
      functionDeclarations: [{
        name: tool.name,
        description: tool.description,
        parameters: tool.inputSchema,
      }],
    }));
    console.log('Available tools:', this.tools.map(t =&amp;gt; t.functionDeclarations[0].name));
  }

  // Called via our chat loop, and is the main function that interfaces between tools and the Gemini model.
  async processQuery(query: string) {
    const response = await this.googleGenAI.models.generateContent({
      model: 'gemini-2.5-pro',
      contents: [
        {role: 'user', parts: [{text: query}]},
      ],
      // We've defined the list of tools that we have available and sent them as part of the request.
      config: {tools: this.tools, maxOutputTokens: 1024},
    });

    // Handle and display response, including any tool calls (see full method below for more)
    response.candidates?.forEach(cand =&amp;gt;
      cand.content?.parts?.forEach( async part =&amp;gt; {
        const toolName = part.functionCall.name;
        const toolArgs = part.functionCall.args as
          | { [x: string]: unknown }
          | undefined;
        console.log('toolName', toolName);
        console.log('toolArgs: ', toolArgs);

        const tool = serverTools[toolName];
        if (tool) {
          const result = await tool.callback(toolArgs || {});

          contents.push({
            role: 'model',
            parts: [{text: (result.content as any)?.[0]?.text}],
          });

          if ((result.content as any)?.[0]?.text) {
            finalText.push((result.content as any)?.[0]?.text);
          }

          // call LLM to also get additional responses.
          const response = await this.googleGenAI.models.generateContent({
            model: this.modelName,
            contents: contents,
            config: {tools: this.tools, maxOutputTokens: 1024},
          });

          for (const candidate of response.candidates || []) {
            const content = candidate.content;
            for (const part of content?.parts || []) {
              if (part.text) {
                finalText.push(part.text);
              }
            }
          }
        }
      }));
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;What is &lt;code&gt;processQuery&lt;/code&gt; Doing?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This function is the heart of the Gemini+MCP client:&lt;br&gt;
&lt;strong&gt;It orchestrates a conversation between the user, the Gemini model, and your set of tools (accessible via the Model Context Protocol).&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The function does several key things:&lt;br&gt;
TLDR;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Submits a user query to Gemini&lt;/strong&gt; (with a list of available tools).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inspects Gemini’s response&lt;/strong&gt; to determine if a tool function needs to be called.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Invokes local/server tools&lt;/strong&gt; when Gemini requests it (via a &lt;code&gt;functionCall&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Feeds the tool results back into Gemini&lt;/strong&gt; for a more complete or grounded answer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Displays the final answer(s) to the user.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Here's a step by step breakdown for a clearer understanding&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Sending the User Query to Gemini&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;const response = await this.googleGenAI.models.generateContent({
  model: 'gemini-2.5-pro',
  contents: [
 {role: 'user', parts: [{text: query}]},
  ],
  config: {tools: this.tools, maxOutputTokens: 1024},
});
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What’s happening here?&lt;/strong&gt;&lt;br&gt;
You’re sending the user's question to Gemini’s &lt;code&gt;generateContent()&lt;/code&gt; API.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Why the &lt;code&gt;tools&lt;/code&gt; in &lt;code&gt;config&lt;/code&gt;?&lt;/strong&gt;&lt;br&gt;
This tells Gemini, “Hey, here are the functions (‘tools’) I can call if you need them.”&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What does this let Gemini do?&lt;/strong&gt;&lt;br&gt;
Gemini can, instead of answering directly, choose to call one of your tools if it thinks that’s appropriate (e.g. “get-user-details”).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Handling the Gemini Response (Including Tool Calls)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;response.candidates?.forEach(cand =&amp;gt;
  cand.content?.parts?.forEach( async part =&amp;gt; {
 ...
  })
);
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What’s happening here?&lt;/strong&gt;&lt;br&gt;
Gemini may return several “candidates” (possible responses). Each candidate has “parts” which are chunks of its response, which could be text, images, or function calls.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Why multiple loops?&lt;/strong&gt;&lt;br&gt;
To handle all possible parts of all possible responses.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Detecting Function Calls (Tool Requests)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;const toolName = part.functionCall.name;
const toolArgs = part.functionCall.args as { [x: string]: unknown } | undefined;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What’s happening here?&lt;/strong&gt;&lt;br&gt;
If Gemini thinks the answer requires calling a tool, it will return a &lt;code&gt;functionCall&lt;/code&gt; instead of just text.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;toolName&lt;/code&gt;/&lt;code&gt;toolArgs&lt;/code&gt;:&lt;/strong&gt;&lt;br&gt;
These are the name and arguments for the requested tool.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Calling the Local/Server Tool with Those Arguments&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;const tool = serverTools[toolName];
if (tool) {
  const result = await tool.callback(toolArgs || {});
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What’s happening here?&lt;/strong&gt;&lt;br&gt;
You look up (from your list of registered server tools) the one Gemini wants to call.&lt;ul&gt;
&lt;li&gt;If it exists, you run it, passing the parsed arguments.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;This is where your server, database, or API logic runs&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Feeding the Tool Result Back to Gemini&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;contents.push({
  role: 'model',
  parts: [{text: (result.content as any)?.[0]?.text}],
});
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What’s happening here?&lt;/strong&gt;&lt;br&gt;
After getting the tool’s output, you add it to the &lt;code&gt;contents&lt;/code&gt;. This simulates Gemini’s internal dialogue and gives it the additional “real” data it just requested.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Asking Gemini for a Final Answer (Now Informed by the Tool Output)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;const response = await this.googleGenAI.models.generateContent({
  model: this.modelName,
  contents: contents,
  config: {tools: this.tools, maxOutputTokens: 1024},
});
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What’s happening here?&lt;/strong&gt;&lt;br&gt;
Now that Gemini has the tool output, you ask for another response. Gemini can now integrate that tool data and produce a final, well-informed answer.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Output the Final Result(s)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;for (const candidate of response.candidates || []) {
  const content = candidate.content;
  for (const part of content?.parts || []) {
 if (part.text) {
   finalText.push(part.text);
 }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What’s happening here?&lt;/strong&gt;&lt;br&gt;
Finally, you extract and print/return all the textual answers Gemini crafts after seeing the real data from your tool.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Why This Structure?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Two calls to Gemini:&lt;/strong&gt;&lt;br&gt;
First, to see if a tool call is requested; second, to let Gemini integrate the tool output into its answer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MCP Tool Calling:&lt;/strong&gt;&lt;br&gt;
The magic of MCP+Gemini is this “AI calls your tools, you execute, and AI incorporates the result into its reasoning.”&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;-b-running-the-client-loop&quot;&gt;(B) Running the Client Loop&lt;/h5&gt;
&lt;p&gt;Welcome to the interactive part. The &lt;code&gt;chatLoop&lt;/code&gt; lets you query our Gemini model, who'll make the administrative decision on whether to call your MCP server’s tool &lt;em&gt;as needed&lt;/em&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// src/mcp/runClient.ts
import { MCPClient } from './client';
// Ensure you have your Google API key ready
const API_KEY = process.env.GEMINI_API_KEY;

async function main() {
  const mcpClient = new MCPClient(API_KEY);
  await mcpClient.connectToServer(__dirname + '/serverMain.js');
  // Minimal chat/question loop
  process.stdin.setEncoding('utf-8');
  process.stdout.write(&quot;Ask your query or type 'quit':\n&quot;);

  process.stdin.on('data', async (input) =&amp;gt; {
    const query = input.trim();
    if (query.toLowerCase() === 'quit') {
      process.exit(0);
    }
    await mcpClient.processQuery(query);
    process.stdout.write(&quot;\nAsk next query or 'quit':\n&quot;);
  });
}
main();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now, simply run your client (&lt;code&gt;ts-node src/mcp/runClient.ts&lt;/code&gt;), type in a phone number, or ask it to give you your details (as the &lt;code&gt;get-user-details&lt;/code&gt; tool expects), and watch as Gemini seamlessly calls your custom tool!&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;wrapping-up-what-we-ve-built-and-where-you-can-go-next&quot;&gt;Wrapping Up: What We’ve Built and Where You Can Go Next&lt;/h4&gt;
&lt;p&gt;Congratulations! You’ve now experienced &lt;strong&gt;end-to-end Model Context Protocol integration tailored to Gemini&lt;/strong&gt;, spanning both a tool-hosting server and a tool-calling client.&lt;br&gt;
Feel free to expand your tool arsenal by adding more business logic and tool endpoints (CRUD ops, APIs, complex workflows).&lt;br&gt;
Have thoughts, questions, or wild new use cases? Drop a comment or issue below!&lt;br&gt;
Happy contextual hacking!&lt;/p&gt;
</description>
<category>Machine Learning</category>
<guid isPermaLink="true">https://coderlegion.com/4718/integrating-model-context-protocol-with-gemini-the-definitive-guide-modern-tool-calling</guid>
<pubDate>Thu, 14 Aug 2025 08:33:42 +0000</pubDate>
</item>
<item>
<title>Learn how to integrate Firebase AI Logic into your iOS app.</title>
<link>https://coderlegion.com/3286/learn-how-to-integrate-firebase-ai-logic-into-your-ios-app</link>
<description>&lt;h2 id=&quot;implementing-firebase-ai-logic-in-your-ios-app-with-swift&quot;&gt;Implementing Firebase AI Logic in Your iOS App with Swift&lt;/h2&gt;
&lt;p&gt;Google Firebase has introduced &lt;strong&gt;AI Logic&lt;/strong&gt;, a new way to build intelligent, dynamic behavior into your mobile apps using natural language prompts and structured logic—without needing to build or fine-tune your own models.&lt;/p&gt;
&lt;p&gt;In this guide, we’ll walk through how to integrate Firebase AI Logic into your &lt;strong&gt;iOS app using Swift&lt;/strong&gt;, from setup to implementation.&lt;/p&gt;
&lt;h3 id=&quot;what-is-firebase-ai-logic-&quot;&gt;What Is Firebase AI Logic?&lt;/h3&gt;
&lt;p&gt;Firebase AI Logic is a managed service that allows you to define, test, and run AI-powered logic blocks using a mix of prompts and structured configuration. Think of it as serverless AI functions that take inputs, apply logic, and return structured outputs.&lt;/p&gt;
&lt;p&gt;With AI Logic, you can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create logic using natural language prompts.&lt;/li&gt;
&lt;li&gt;Call this logic from your iOS app using the &lt;strong&gt;Firebase AI SDK&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Use AI-generated decisions to personalize your UI, make recommendations, and more.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;requirements&quot;&gt;Requirements&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Xcode 16.2+&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;iOS 15+&lt;/strong&gt; or &lt;strong&gt;macOS 12+&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Firebase SDK v11.13.0+&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;A Firebase-connected app&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;firebase-console-setup&quot;&gt;Firebase Console Setup&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Go to your project in the &lt;a rel=&quot;nofollow&quot; href=&quot;https://console.firebase.google.com/&quot;&gt;Firebase Console&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;AI&lt;/strong&gt;, select &lt;strong&gt;AI Logic&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Tap &lt;strong&gt;Start&lt;/strong&gt;, then under &lt;strong&gt;Gemini Developer API&lt;/strong&gt;, tap &lt;strong&gt;Start using this API&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the dialog that appears, tap &lt;strong&gt;Enable&lt;/strong&gt;. Wait until the API is enabled.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Continue&lt;/strong&gt; to complete activation.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;enable-app-check-recommended-&quot;&gt;Enable App Check (Recommended)&lt;/h4&gt;
&lt;p&gt;To restrict API calls to authorized devices:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In the AI Logic panel, click &lt;strong&gt;Register on App Check&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the App Check dashboard, click &lt;strong&gt;Start&lt;/strong&gt;, then &lt;strong&gt;Register&lt;/strong&gt; for the app you want to secure.&lt;/li&gt;
&lt;li&gt;If your app supports only iOS 14+, you can register &lt;strong&gt;App Attest&lt;/strong&gt; only. Otherwise, also register &lt;strong&gt;Device Check&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Complete all required fields and finish registration.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Next:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In the AI Logic dashboard, go to the &lt;strong&gt;APIs&lt;/strong&gt; section.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Firebase AI Logic APIs&lt;/strong&gt;, then click &lt;strong&gt;Apply&lt;/strong&gt; to enforce App Check.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Enabling enforcement can take up to &lt;strong&gt;30 minutes&lt;/strong&gt; to propagate.&lt;/p&gt;
&lt;h3 id=&quot;enable-app-transport-security-exception&quot;&gt;Enable App Transport Security Exception&lt;/h3&gt;
&lt;p&gt;In my case, I also needed to enable &lt;strong&gt;App Transport Security Exception&lt;/strong&gt;.&lt;br&gt;
To do this, go to &lt;strong&gt;Project → Signing &amp;amp; Capabilities → Add Capability → App Transport Security Exception&lt;/strong&gt;.&lt;br&gt;
Inside the capability, tap the &lt;strong&gt;+&lt;/strong&gt; button and add &lt;strong&gt;googleapis.com&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;code-implementation&quot;&gt;Code Implementation&lt;/h3&gt;
&lt;h4 id=&quot;app-check&quot;&gt;App Check&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Add the &lt;strong&gt;Firebase App Check&lt;/strong&gt; library to your project.&lt;/li&gt;
&lt;li&gt;Create a file named &lt;code&gt;AppCheckManager.swift&lt;/code&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-swift&quot;&gt;import Firebase
import FirebaseAppCheck
 
final class AppCheckManager: NSObject, AppCheckProviderFactory {
 
public static let shared = AppCheckManager()
 
func createProvider(with app: FirebaseApp) -&amp;gt; AppCheckProvider? {
return AppAttestProvider(app: app)
}
 
public func setProviderFactory() {
#if DEBUG
 AppCheck.setAppCheckProviderFactory(AppCheckDebugProviderFactory())
#else
AppCheck.setAppCheckProviderFactory(self)
#endif
}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In your &lt;code&gt;AppDelegate&lt;/code&gt; or main app file, before &lt;code&gt;FirebaseApp.configure()&lt;/code&gt;, add:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-swift&quot;&gt;AppCheckManager.shared.setProviderFactory()
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;In your &lt;strong&gt;Signing &amp;amp; Capabilities&lt;/strong&gt;, add the &lt;strong&gt;App Attest&lt;/strong&gt; entitlement.&lt;/li&gt;
&lt;li&gt;In the generated &lt;code&gt;.entitlements&lt;/code&gt; file, change the App Attest mode from &lt;code&gt;development&lt;/code&gt; to &lt;code&gt;production&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;To enable Firebase debug logging:&lt;ul&gt;
&lt;li&gt;Go to &lt;strong&gt;Product &amp;gt; Scheme &amp;gt; Edit Scheme…&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Run &amp;gt; Arguments&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Add a new argument: &lt;code&gt;-FIRDebugEnabled&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Run the app. You should see a log like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-swift&quot;&gt;&amp;lt;Warning&amp;gt; [AppCheckCore][I-GAC004001] App Check debug token: '1E04B27F-15CD-46FA-862B-ED8E67841C9D'.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Copy this token, go to &lt;strong&gt;App Check &amp;gt; Apps&lt;/strong&gt; in the Firebase Console, click the three dots next to your iOS app, choose &lt;strong&gt;Manage debug tokens&lt;/strong&gt;, then add and save the token.&lt;/p&gt;
&lt;p&gt;You're done setting up App Check.&lt;/p&gt;
&lt;h3 id=&quot;using-firebase-ai-logic&quot;&gt;Using Firebase AI Logic&lt;/h3&gt;
&lt;p&gt;Add the &lt;code&gt;FirebaseAI&lt;/code&gt; package:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Go to &lt;strong&gt;General &amp;gt; Frameworks, Libraries, and Embedded Content&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Tap the &lt;strong&gt;+&lt;/strong&gt; button and add &lt;code&gt;FirebaseAI&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;simple-response&quot;&gt;Simple Response&lt;/h4&gt;
&lt;p&gt;To generate a text response from a prompt:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-swift&quot;&gt;import FirebaseAI
 
func callAI() async {
do {
let prompt = &quot;Your prompt here...&quot;
let ai = FirebaseAI.firebaseAI(backend: .googleAI())
let model = ai.generativeModel(modelName: &quot;gemini-2.0-flash&quot;)
let response = try await model.generateContent(prompt)
 
if let answer = response.text {
print(&quot;FirebaseAI response:&quot;, answer)
}
} catch {
print(&quot;FirebaseAI error:&quot;, error)
}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;streamed-response&quot;&gt;Streamed Response&lt;/h4&gt;
&lt;p&gt;For a more responsive UI, stream partial results as they’re generated:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-swift&quot;&gt;func aiStrem() async {
do {
let prompt = &quot;Your prompt here...&quot;
let ai = FirebaseAI.firebaseAI(backend: .googleAI())
let model = ai.generativeModel(modelName: &quot;gemini-2.0-flash&quot;)
let response = try model.generateContentStream(prompt)
 
for try await chunk in response {
if let text = chunk.text {
print(&quot;FirebaseAI text:&quot;, text)
}
}
} catch {
print(&quot;FirebaseAI error:&quot;, error)
}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;troubleshooting&quot;&gt;Troubleshooting&lt;/h3&gt;
&lt;h4 id=&quot;http-403-errors&quot;&gt;HTTP 403 Errors&lt;/h4&gt;
&lt;p&gt;If you see a 403 error:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to the &lt;a rel=&quot;nofollow&quot; href=&quot;https://console.cloud.google.com/&quot;&gt;Google Cloud Console&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Select your Firebase project&lt;/li&gt;
&lt;li&gt;Navigate to &lt;strong&gt;APIs &amp;amp; Services &amp;gt; Credentials&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Find your iOS key, click it&lt;/li&gt;
&lt;li&gt;Ensure &lt;strong&gt;Firebase AI Logic API&lt;/strong&gt; is enabled under &lt;em&gt;API Restrictions&lt;/em&gt;. If not:&lt;ul&gt;
&lt;li&gt;Select it&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Wait up to 30 minutes before retrying&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If the error persists:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Temporarily switch to &lt;strong&gt;“Don’t restrict key”&lt;/strong&gt; mode to test.&lt;/li&gt;
&lt;li&gt;You may also try &lt;strong&gt;disabling and re-enabling App Check&lt;/strong&gt; for Firebase AI Logic.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;conclusion-1&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Firebase AI Logic allows iOS developers to integrate intelligent logic blocks into apps without the need to manage ML models or infrastructure. With App Check, you can keep API access secure, and with just a few lines of Swift, you can call or stream AI responses to build truly dynamic user experiences.&lt;/p&gt;
&lt;p&gt;Thanks for reading! If you have questions or want a complete sample project, feel free to reach out or leave a comment.&lt;/p&gt;
</description>
<category>Getting Started</category>
<guid isPermaLink="true">https://coderlegion.com/3286/learn-how-to-integrate-firebase-ai-logic-into-your-ios-app</guid>
<pubDate>Sun, 08 Jun 2025 20:36:07 +0000</pubDate>
</item>
</channel>
</rss>