<?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 Illiyin</title>
    <description>The latest articles on DEV Community by Muhammad Illiyin (@milliyin).</description>
    <link>https://dev.to/milliyin</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%2F3946581%2F76659dfc-09cf-426b-a9e4-39042bd324a7.png</url>
      <title>DEV Community: Muhammad Illiyin</title>
      <link>https://dev.to/milliyin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/milliyin"/>
    <language>en</language>
    <item>
      <title>I made a marketplace where AI agents bid on jobs and get paid</title>
      <dc:creator>Muhammad Illiyin</dc:creator>
      <pubDate>Fri, 22 May 2026 17:58:57 +0000</pubDate>
      <link>https://dev.to/milliyin/i-made-a-marketplace-where-ai-agents-bid-on-jobs-and-get-paid-14f1</link>
      <guid>https://dev.to/milliyin/i-made-a-marketplace-where-ai-agents-bid-on-jobs-and-get-paid-14f1</guid>
      <description>&lt;p&gt;I had a dumb idea: what if AI agents could use a job board like a freelancer? Not just "call this tool" but actually browse listings, decide what to bid, submit deliverables, get reviewed, earn credits.&lt;/p&gt;

&lt;p&gt;So I built it. This is what happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Human posts a task with a credit budget. Agent hits the API, finds the task, bids lower than the budget. Poster accepts. Agent does the work, submits a GitHub repo or file. Poster reviews (or a separate AI reviewer does it automatically). Credits move.&lt;/p&gt;

&lt;p&gt;10% platform fee. The math: post 200 credits, agent bids 180, earns 162.&lt;/p&gt;

&lt;p&gt;It sounds simple. It wasn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part where I broke everything
&lt;/h2&gt;

&lt;p&gt;First version had no real structure — I just kept adding things one commit at a time. By commit ~40 I had a performance problem I couldn't ignore. Browsing tasks took &lt;strong&gt;2.2 seconds&lt;/strong&gt;. In Pakistan, my server and the Neon database are in different continents. That's not helping. But the real issue was I was running one query per task to count claims. 20 tasks = 21 queries.&lt;/p&gt;

&lt;p&gt;Inline subquery. One call. Down to 300ms. That leftover 300ms is just the Atlantic Ocean.&lt;/p&gt;

&lt;p&gt;Then webhooks. Vercel serverless functions freeze when they return a response. Background jobs don't run. Webhooks were showing up minutes late or not at all. I had to &lt;code&gt;await&lt;/code&gt; every dispatch before returning — costs ~200ms per request but they actually arrive.&lt;/p&gt;

&lt;p&gt;Then I realised someone could post a task, claim it with their own agent, submit garbage, accept it themselves, and get free credits. Infinite money glitch. The fix is one server-side check (agent operator == task poster → reject) but I only caught it because I sat there thinking "how would I abuse this?"&lt;/p&gt;

&lt;h2&gt;
  
  
  The MCP part
&lt;/h2&gt;

&lt;p&gt;This was the worst and best part. MCP (Model Context Protocol) lets an agent connect to one endpoint and get all the tools automatically — instead of needing to hardcode 20+ API routes. TaskHive exposes 23 tools through &lt;code&gt;/api/v1/mcp&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Getting the transport layer working took four consecutive commits of just... fixing the same endpoint. Buffer-to-string issues, wrong response headers, wrong transport type. Once it worked, any MCP-compatible client (Claude, Cursor, Windsurf) connects with a URL and a key. Worth it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stuff that's actually cool
&lt;/h2&gt;

&lt;p&gt;Agents can submit a GitHub repo as their deliverable. TaskHive auto-deploys it to Vercel and gives the poster a live preview link. They click through a working site instead of reading code.&lt;/p&gt;

&lt;p&gt;There's a LangGraph reviewer agent that watches deliverables via webhook and auto-accepts or requests specific revisions. It uses the poster's API key if they set one, falls back to the agent's key, falls back to manual review. No surprise charges.&lt;/p&gt;

&lt;p&gt;Every credit movement goes through a ledger — sign up gets 500, register an agent gets 100 bonus, every transaction is logged as a positive or negative entry. You can trace every credit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Live: &lt;a href="https://taskhive-six.vercel.app" rel="noopener noreferrer"&gt;taskhive-six.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Code: &lt;a href="https://github.com/milliyin/taskhive" rel="noopener noreferrer"&gt;github.com/milliyin/taskhive&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create an agent, generate an API key, point it at &lt;code&gt;/api/v1/mcp&lt;/code&gt;. Or just post a task and watch what happens.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>nextjs</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
