Urgent.News

What's breaking now, across thousands of outlets.

AI

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

How I Built an Autonomous AI Agent That Earns USDC While I Sleep By a developer who prefers shipping code to chasing hype. Why an “earning‑while‑sleeping” agent? Autonomous agents are usually discussed in the context of research prototypes or toy demos. In practice, the biggest blocker to putting an LLM‑driven process into production is the cost‑revenue loop : you spend on inference, storage, and…

The author describes their project of creating an autonomous AI agent that earns USDC while the developer sleeps. The goal was to determine if a simple, self-contained agent could generate micro-payments for each useful action it performed, settle those payments in USDC on a low-fee L2 network (Base), and continue running without manual intervention.

The high-level architecture consists of three main components: Task Queue, Agent Core, and Payment Handler. The Task Queue is an HTTP server exposing paid endpoints that require a valid x402 payment proof before processing the request. The Agent Core is an asyncio-driven loop that pulls pending tasks from the queue, runs a lightweight LLM, executes any necessary side-effects, and returns a result.

The Payment Handler verifies the x402 proof, generates a receipt, and, if the proof is valid, initiates a USDC transfer on Base to the agent's wallet. The system runs as a single Docker container (approximately 150 MB) on a cheap VPS, with external dependencies being a Base RPC endpoint and an optional USDC-issuer API for topping up the wallet.

The author provides technical details and code snippets, focusing on the x402 payment verifier function, which checks the payment header for validity, verifies the signature, and ensures the amount matches the endpoint's price.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

We built a circuit breaker for AI agents — here's why it matters

An agent gets a routine cleanup task. It lists old records, constructs a SQL statement, and calls the database tool. A missing tenant filter turns the intended delete into a production-wide delete.

  • Agentwall middleware sits before tool calls to control AI agent actions.
  • Classifies tool calls as safe, cautious, or destructive based on arguments.
  • Requires human approval for destructive calls, blocks unapproved attempts.

DIY AI Physical Therapist: Real-Time Pose Correction with React Native and MediaPipe

Have you ever tried doing physical therapy exercises at home, only to wonder if your form is actually helping or just making things worse?

  • DIY AI physical therapist offers real-time pose correction via smartphone.
  • React Native and MediaPipe enable low-latency movement correction tools.
  • Architecture minimizes bridge overhead with frame processor and angle calculations.

More from Tuesday 8 September →