<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: MUHAMMAD ZAID</title>
    <description>The latest articles on DEV Community by MUHAMMAD ZAID (@sudozaid).</description>
    <link>https://dev.to/sudozaid</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4087286%2F69254dd5-13be-40f1-a450-9b8e612c9bc5.jpg</url>
      <title>DEV Community: MUHAMMAD ZAID</title>
      <link>https://dev.to/sudozaid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sudozaid"/>
    <language>en</language>
    <item>
      <title>Building an AI Agent When You Don't Have a Credit Card</title>
      <dc:creator>MUHAMMAD ZAID</dc:creator>
      <pubDate>Thu, 20 Aug 2026 23:32:47 +0000</pubDate>
      <link>https://dev.to/sudozaid/building-an-ai-agent-when-you-dont-have-a-credit-card-3a67</link>
      <guid>https://dev.to/sudozaid/building-an-ai-agent-when-you-dont-have-a-credit-card-3a67</guid>
      <description>&lt;p&gt;I am a CS student from Jhelum, Pakistan. Last month I joined the Google Cloud&lt;br&gt;
Gen AI Academy APAC, Cohort 3. Track 1 was to build a customer-facing AI agent&lt;br&gt;
using ADK and RAG, deploy it, and submit the link.&lt;/p&gt;

&lt;p&gt;I opened the Google Cloud console, went to the free trial, and got stuck on&lt;br&gt;
Step 2 of 2: Payment Information Verification.&lt;/p&gt;

&lt;p&gt;I don't have a credit card. Many students here don't.&lt;/p&gt;

&lt;p&gt;I still finished the track. Here is how.&lt;/p&gt;
&lt;h2&gt;
  
  
  The agent
&lt;/h2&gt;

&lt;p&gt;I built &lt;strong&gt;Brew Haven&lt;/strong&gt;, a support agent for a coffee shop with branches in&lt;br&gt;
Rawalpindi and Islamabad. You can ask it about the menu, prices, timings,&lt;br&gt;
delivery, the loyalty card, or allergies.&lt;/p&gt;

&lt;p&gt;Live: &lt;a href="https://brew-haven-barista-by-zaid.streamlit.app" rel="noopener noreferrer"&gt;https://brew-haven-barista-by-zaid.streamlit.app&lt;/a&gt;&lt;br&gt;
Code: &lt;a href="https://github.com/Sudo-Zaid/brew-haven-barista" rel="noopener noreferrer"&gt;https://github.com/Sudo-Zaid/brew-haven-barista&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I asked it "in which cities you can deliver?" and it said:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We deliver within a 6 km radius of our branches in Rawalpindi (Committee&lt;br&gt;
Chowk) and Islamabad (Bahria Town Phase 4). Delivery costs PKR 150, but it&lt;br&gt;
is free on orders above PKR 2500.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foasq01u2zutkus7gq7nc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foasq01u2zutkus7gq7nc.png" alt="Brew Haven chat answering which cities it delivers to" width="800" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every number there came from a markdown file I wrote. The model did not make&lt;br&gt;
up anything. That was the point.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why RAG and not just a big prompt
&lt;/h2&gt;

&lt;p&gt;I could have pasted the whole menu into the system instruction. Two problems&lt;br&gt;
with that. It costs tokens on every single message. And when the menu grows,&lt;br&gt;
it gets worse.&lt;/p&gt;

&lt;p&gt;So instead:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;three markdown files hold the shop data (menu, policies, orders)&lt;/li&gt;
&lt;li&gt;they get split by heading, so one chunk = one topic&lt;/li&gt;
&lt;li&gt;each chunk is embedded once and cached&lt;/li&gt;
&lt;li&gt;when a customer asks something, I embed the question and pick the top 3
chunks by cosine similarity&lt;/li&gt;
&lt;li&gt;the agent gets those chunks through a tool called &lt;code&gt;search_knowledge_base&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The agent code is small:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;root_agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;brew_haven_barista&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemini-3.6-flash&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;instruction&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;INSTRUCTION&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;search_knowledge_base&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The real work is in the instruction. Two rules matter most:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Always call the tool before answering anything factual. Never answer from
memory.&lt;/li&gt;
&lt;li&gt;If the tool finds nothing, say you are not sure. Do not invent prices or
policies.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Rule 2 is easy to skip and I think it is the most important one. If my agent&lt;br&gt;
tells a customer the wrong refund policy, that is a real problem for the shop.&lt;br&gt;
A chatbot that guesses is worse than one that says "I don't know."&lt;/p&gt;

&lt;p&gt;I added one more rule after testing. If someone mentions an allergy, always&lt;br&gt;
give the shared kitchen warning even if they did not ask. Now it says this on&lt;br&gt;
its own:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;...all our food is prepared in a shared kitchen that also handles nuts,&lt;br&gt;
eggs, and wheat, so we cannot guarantee any item is completely allergen-free.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;RAG cannot do that part. You have to think of it yourself and write it in.&lt;/p&gt;
&lt;h2&gt;
  
  
  Three problems I hit
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. No credit card = no Google Cloud.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4z6gbsmpbxlkehdaw9vi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4z6gbsmpbxlkehdaw9vi.png" alt="Google Cloud free trial stuck at Step 2 of 2, Payment Information Verification" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Google AI Studio gives you a Gemini API key for free with no card. It is rate&lt;br&gt;
limited (5 requests per minute for me) but that is fine for a demo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Hugging Face wanted PRO.&lt;/strong&gt;&lt;br&gt;
I first tried to deploy on Hugging Face Spaces. Streamlit is not an SDK option&lt;br&gt;
there anymore, so I wrote a Dockerfile. Then I got &lt;code&gt;402 Payment Required&lt;/code&gt; —&lt;br&gt;
Docker and Gradio Spaces need PRO now. Only static Spaces are free.&lt;/p&gt;

&lt;p&gt;I moved to &lt;strong&gt;Streamlit Community Cloud&lt;/strong&gt;. Free, logs in with GitHub, made for&lt;br&gt;
Streamlit apps. Better choice anyway.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqrkcpjspjangcda07u9t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqrkcpjspjangcda07u9t.png" alt="The deployed app listed on the Streamlit Community Cloud dashboard" width="800" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One thing to know: Streamlit secrets go into &lt;code&gt;st.secrets&lt;/code&gt;, but my code reads&lt;br&gt;
&lt;code&gt;os.environ&lt;/code&gt;. So I added this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GOOGLE_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;st&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;secrets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GOOGLE_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;st&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;secrets&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GOOGLE_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;FileNotFoundError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;pass&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. The model was retired.&lt;/strong&gt;&lt;br&gt;
First run gave me a 404: &lt;code&gt;gemini-2.5-flash&lt;/code&gt; is no longer available to new&lt;br&gt;
users, use &lt;code&gt;gemini-3.6-flash&lt;/code&gt;. Many tutorials still use the old name. If you&lt;br&gt;
get this error, your key is fine, just change the model.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Ship somewhere, ship today.&lt;/strong&gt; The track is named after Cloud Run but the&lt;br&gt;
form asked for a "deployed project link". It did not say Cloud Run. A working&lt;br&gt;
link is better than waiting for the perfect setup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keep data in files, not in the prompt.&lt;/strong&gt; I can change a price by editing one&lt;br&gt;
line. No redeploy of any logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test what it refuses, not only what it answers.&lt;/strong&gt; Ask it something that is&lt;br&gt;
not in your documents and see if it admits it. Anyone can make a demo answer&lt;br&gt;
the question it was built for.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The blockers were most of the work.&lt;/strong&gt; I spent more time getting to a&lt;br&gt;
deployable state than writing the agent. Nobody writes that part down, so I&lt;br&gt;
did.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next
&lt;/h2&gt;

&lt;p&gt;Track 2 is a BigQuery data agent. I found out BigQuery has a sandbox that&lt;br&gt;
works without a billing account, so the no-card path still works there.&lt;br&gt;
Then Track 3, then the Ideathon.&lt;/p&gt;

&lt;p&gt;If you are doing this from a country where the payment step blocks you: it is&lt;br&gt;
solvable. Free tier and free hosting can take you all the way to a live URL.&lt;/p&gt;




&lt;p&gt;Muhammad Zaid — &lt;a href="https://linkedin.com/in/sudo-zaid" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; · &lt;a href="https://github.com/Sudo-Zaid" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;br&gt;
Gen AI Academy APAC Cohort 3, Track 1 — Google Cloud x Hack2skill&lt;/p&gt;

</description>
      <category>ai</category>
      <category>googlecloud</category>
      <category>python</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
