<?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: Syed Kabeer Ali</title>
    <description>The latest articles on DEV Community by Syed Kabeer Ali (@syed_kabeerali_65ed7d04d).</description>
    <link>https://dev.to/syed_kabeerali_65ed7d04d</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3961215%2F2477a176-9f97-4fd0-82aa-05486c26ac62.png</url>
      <title>DEV Community: Syed Kabeer Ali</title>
      <link>https://dev.to/syed_kabeerali_65ed7d04d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/syed_kabeerali_65ed7d04d"/>
    <language>en</language>
    <item>
      <title>How to Build a Custom AI Security Agent with Coral &amp; Gemini (My First Hackathon Build!)</title>
      <dc:creator>Syed Kabeer Ali</dc:creator>
      <pubDate>Sun, 31 May 2026 13:15:17 +0000</pubDate>
      <link>https://dev.to/syed_kabeerali_65ed7d04d/how-to-build-a-custom-ai-security-agent-with-coral-gemini-my-first-hackathon-build-c27</link>
      <guid>https://dev.to/syed_kabeerali_65ed7d04d/how-to-build-a-custom-ai-security-agent-with-coral-gemini-my-first-hackathon-build-c27</guid>
      <description>&lt;p&gt;Hey everyone! I just submitted my Track 2 project for the Pirates of the Coral-bean hackathon. I built The Coral Lookout, an autonomous AI agent that scans developer blogs (like Dev.to) to flag malicious npm packages and crypto scams.&lt;/p&gt;

&lt;p&gt;Tbh, building this solo was a massive learning curve. I couldn't find a lot of tutorials on hooking up custom unmapped APIs to Coral, so I figured I’d write down exactly how I did it in case anyone else gets stuck on the same things I did.&lt;/p&gt;

&lt;p&gt;Here is how to build your own custom AI agent from scratch!&lt;/p&gt;

&lt;p&gt;The Stack&lt;br&gt;
Data Pipeline: Coral CLI&lt;/p&gt;

&lt;p&gt;LLM Engine: Gemini 2.5 Flash&lt;/p&gt;

&lt;p&gt;Frontend UI: Python &amp;amp; Streamlit&lt;/p&gt;

&lt;p&gt;Deployment: Docker + Railway&lt;/p&gt;

&lt;p&gt;Step 1: Mapping the API with Coral (The Hard Part)&lt;br&gt;
So, my initial plan was to just use Coral to query Dev.to articles. But I quickly realized that Dev.to isn't natively supported in Coral out of the box.&lt;/p&gt;

&lt;p&gt;Instead of writing a wierd python scraping script, I learned you can just build a custom YAML source connector. You basically tell Coral how to read the JSON from the API.&lt;/p&gt;

&lt;p&gt;Here is what my devto_guardian_connector.yaml looked like:&lt;/p&gt;

&lt;p&gt;YAML&lt;br&gt;
name: devto_agent&lt;br&gt;
type: rest&lt;br&gt;
base_url: "&lt;a href="https://dev.to"&gt;https://dev.to&lt;/a&gt;"&lt;br&gt;
tables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;name: articles
description: Latest articles pulled from Dev.to API
request:
  method: GET
  path: /api/articles
Pro tip: Make sure your indentation is perfect here. I spent like 45 minutes wondering why my SQL queries were failing only to realize I had an extra space in my YMAL file. 😅&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 2: Querying the Data&lt;br&gt;
Once the connector is linked, you can literally just use standard SQL to fetch internet data. In my app, I just ran a simple query to pull the titles and descriptions of the latest posts.&lt;/p&gt;

&lt;p&gt;Python&lt;/p&gt;

&lt;h1&gt;
  
  
  just standard sql, no scraping required!
&lt;/h1&gt;

&lt;p&gt;query = "SELECT title, description, url FROM devto_agent.articles LIMIT 15"&lt;br&gt;
Step 3: Adding the Brains (Gemini 2.5 Flash)&lt;br&gt;
Now that we have the raw text, we need to figure out if it's safe or if it's a scam. I used the Gemini API for this because its super fast.&lt;/p&gt;

&lt;p&gt;I passed the title and description into Gemini and asked it to act like a cybersecurity expert (or in my case, a Pirate Oracle).&lt;br&gt;
Wait, actually before you do this—make sure you load your API keys using dotenv in python, otherwise your app will crash instantly when you try to run it.&lt;/p&gt;

&lt;p&gt;I wrote a prompt telling Gemini to look for high-risk signals, like links asking you to run suspicious npm install commands or random crypto airdrops. It returns a "confidence score" and a short explanation of why it flagged it.&lt;/p&gt;

&lt;p&gt;Step 4: The Streamlit UI&lt;br&gt;
I didn't want to build a boring corporate dashboard. I wanted this to feel like a real digital first mate!&lt;/p&gt;

&lt;p&gt;I used Streamlit to build the UI. Streamlit is great, but styling it can be a pain. If you want to build a custom dark theme like I did, you have to inject CSS directly into the app using unsafe_allow_html=True.&lt;/p&gt;

&lt;p&gt;Python&lt;br&gt;
st.markdown("""&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.threat-box { border-left: 5px solid red; background-color: #1a1a1a; }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;""", unsafe_allow_html=True)&lt;br&gt;
This let me create a really cool chronological timeline. When the agent finds a safe article, it logs it quietly. When it spots a threat, it flashes a red alert box and quarantines the link.&lt;/p&gt;

&lt;p&gt;Step 5: Shipping it&lt;br&gt;
Finally, I wrote a quick Dockerfile and pushed the whole thing to GitHub. I connected my repo to Railway, and it automatically built and deployed the app. (If your Railway build fails on the first try, just double check that your Streamlit port is set to 0.0.0.0 in your start script).&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
Building this agent definetly pushed me to my limits, but bridging an unstructured API to a SQL database and feeding it into an LLM is a superpower.&lt;/p&gt;

&lt;p&gt;You can check out my full code here: &lt;a href="https://github.com/MaskedMan-code/devto-guardian-agent" rel="noopener noreferrer"&gt;https://github.com/MaskedMan-code/devto-guardian-agent&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>security</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
