Most AI agent tutorials end at "it can answer questions." This one ends at "it has a wallet balance."
I recently built an AI agent that autonomously earns NEAR tokens by completing jobs on the NEAR AI marketplace. The marketplace connects people who need AI-powered work (research, code generation, content, analysis) with agents that can deliver it — and payment settles on-chain.
I open-sourced the full setup as a tutorial: first-earning-agent-tutorial
What You'll Build
The tutorial walks you through creating a Python-based agent that:
Monitors the NEAR AI marketplace for new job postings
Evaluates each job against its own capability profile
Bids on suitable jobs with competitive pricing
Delivers results when a bid is accepted
Collects NEAR tokens as payment
Architecture Overview
+-------------------------------------------------+
| Agent Runtime |
| |
| +----------+ +----------+ +-----------+ |
| | Bidder |-->| Job |-->| Auto-Bid | |
| | Loop | | Filter | | Engine | |
| +----------+ +----------+ +-----------+ |
| | | |
| | +----------+ | |
| +-------->| Win |<-------+ |
| | Handler | |
| +----+-----+ |
| | |
| +----v-----+ |
| |Deliverer |--> Submit Work |
| +----+-----+ |
| | |
| +----v-----+ |
| | Payment |--> NEAR Wallet |
| +----------+ |
+-------------------------------------------------+
^ |
| Marketplace API |
+-------------------------+
The agent runs on a minimal VPS ($6/month DigitalOcean droplet is plenty). It polls the marketplace on a configurable interval, applies filtering heuristics to find jobs within its capabilities, places competitive bids, and handles the full delivery lifecycle when it wins.
The Interesting Part: Why Agent Marketplaces Matter
If you've been following the AI agent discourse, you've noticed most "agent" projects are demos, benchmarks, or research prototypes. The NEAR AI marketplace is different — it's a production environment where agents do real work for real payment.
For developers, this changes the game in a few ways:
New deployment model. Instead of embedding AI into an app and hoping users find it, you build an autonomous agent that finds its own work on a marketplace. The demand already exists.
Built-in economics. No need to figure out pricing, billing, or payment infrastructure — the marketplace handles escrow and settlement.
Quality pressure. Agents compete on reputation. Bad deliveries tank your score. This creates natural selection pressure toward better agents, which is exactly what the ecosystem needs.
Composability. Your agent can specialize in one narrow skill (say, Rust smart contract audits) and thrive. You don't need to build a general-purpose system.
Getting Started
Prerequisites: Python 3.10+, a NEAR wallet, and about 30 minutes. The tutorial is structured so you can have a working agent by the end of a single sitting.
Repository: https://github.com/mastrophot/first-earning-agent-tutorial
I'd genuinely appreciate feedback on the tutorial — especially if something is confusing or if you get stuck at a particular step. Open an issue on the repo or drop a comment here.
What's Next
I'm working on a follow-up post covering advanced strategies: job specialization, bid pricing optimization, and multi-agent coordination. Follow me here or watch the repo if you're interested.
Top comments (0)