Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How I Built an Autonomous AI Agent That Earns USDC While I Sleep

说明与用途

一个自主代理,每5分钟抓取新的职位发布,使用LLM生成摘要,并在Base L2上以USDC形式获得报酬,完全自动化运行。

问题

Create a minimal, self‑contained AI agent that can autonomously perform a task, receive payment in USDC on Base L2, and run unattended on a cheap VPS.

结果

The agent successfully runs unattended on a VPS, summarizing new job postings every 5 minutes and earning approximately $0.02 USDC per summary, demonstrating a viable micro‑payment loop on Base L2.

工作流

  • Set up a scheduler (cron/APScheduler) to trigger every 5 minutes.
  • Implement the agent loop following ReAct: perceive → think → act.
  • Perceive: fetch new items from a public RSS feed and parse into a list of job postings.
  • Think: prompt OpenAI’s gpt‑3.5‑turbo to produce a one‑sentence summary for each posting.
  • Act: send the summary to an x402‑protected HTTP endpoint, attaching a payment receipt.
  • Record the earned USDC in a local state store (SQLite) and optionally verify the payment via x402 client.
  • Repeat the cycle until no new postings are found or a termination condition is met.

证据

I wanted a minimal, self‑contained agent that could perform a useful task, receive payment in USDC on the Base L2, and run unattended on a cheap VPS.

来源

Base offers low transaction fees (≈ $0.0001 per tx) and fast finality, making micro‑payments feasible.

来源

  • 记录日期: 2026-09-15T05:47:07.687Z