Finally My AI AGENTS Has Money + the xAI API based_terminal Project
Based on All About AI's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
A donation agent monitors Blue Sky mentions, evaluates requests with OpenAI (GPT-4o), and sends SOL to the provided wallet only when criteria are met.
Briefing
An AI agent can earn and spend cryptocurrency automatically on social platforms—by watching for tagged posts, verifying payments on-chain, and using OpenAI plus blockchain tooling to decide who gets money or who gets a paid service. The practical takeaway: instead of wiring up complex payment rails, the system uses Solana for near-zero transaction fees and routes requests through Blue Sky mentions (with the same pattern transferable to X or other platforms).
The first working demo is a “donation agent.” A user posts a request that includes a wallet address, and the agent monitors Blue Sky for tagged mentions. When a mention appears, the agent runs an OpenAI-based evaluation (using GPT-4o) to judge whether the request is credible and aligned with a human-focused donation mission (helping people in need). If the request passes one of three donation tiers, the agent sends a small Solana amount—example shown: 0.33 SOL—to the provided address, logs the attempt, and tracks outcomes (successful vs. rejected) in a donation history file. After the transaction, the agent posts a response back on Blue Sky and the on-chain transfer is confirmed.
Under the hood, the setup relies on a few core ingredients: an OpenAI API key, at least one Solana wallet address (plus a hidden private key for signing transactions), and Blue Sky credentials. The agent authenticates to Blue Sky via an API (described as “at Proto”), then initializes a Solana client using an HTTP endpoint. The code also defines donation tiers and uses structured outputs from OpenAI to categorize requests. For transparency and reliability, every mention is evaluated, every donation attempt is recorded, and the system can reject messages that don’t meet the criteria.
A second demo flips the flow: the agent gets paid for services. Here, a Blue Sky “service” agent posts a price (example: 0.05 SOL per search) and instructs users to send payment to a wallet address. When a tagged question arrives, the agent asks for payment, verifies the payment by checking the wallet balance change, and only then runs the service using tool-calling—specifically Brave Search—to fetch live information. The demo request asked for a live Bitcoin price from CoinDesk with a link; after payment verification, the agent replies with the result and the transaction is logged as a completed job.
The broader concept is a two-sided marketplace for agents: donations for help requests and paid micro-services for targeted tasks. The creator also notes that Solana’s low fees make it feasible to run these loops without constantly worrying about transaction costs.
Finally, the same weekend work extends beyond Blue Sky into an X-based “based terminal” concept using the xAI API. The terminal logs in, posts tweets and images, checks for payments, and cycles through actions without spamming. It’s framed as a meme-fueled, harshly worded parody inspired by “terminal of truths,” including image generation via the Flux API and optional crypto tipping (example shown: receiving 0.05 SOL). The result is an experiment in giving AI agents a budget and a way to monetize simple actions—without relying on fiat payment systems like cards.
Cornell Notes
The system demonstrates two on-chain payment patterns for AI agents on social platforms using Solana. First, a donation agent monitors Blue Sky mentions, uses OpenAI (GPT-4o) to evaluate whether a request is worthy, and then sends a small SOL amount to the requester’s wallet while logging outcomes. Second, a service agent posts a fixed price, requests up-front payment, verifies the payment by detecting a wallet balance change, and only then performs a task via tool-calling (Brave Search) and replies with results (e.g., a live CoinDesk Bitcoin price link). Solana is chosen for low fees, making frequent transactions practical. The same architecture can be adapted to other platforms like X.
How does the donation agent decide whether to send money after a Blue Sky mention appears?
What makes Solana practical for this kind of always-on agent loop?
How does the service agent verify that a user actually paid before running the task?
What tools and APIs power the paid service example?
How does the “based terminal” preview relate to the donation/service architecture?
Review Questions
- What are the two distinct payment flows implemented (donations vs. paid services), and how does each one use on-chain verification?
- Why does the system rely on OpenAI evaluation for donations, and what happens when a request fails that evaluation?
- Describe the sequence of events from a user tagging the agent to the agent replying with a Brave Search result.
Key Points
- 1
A donation agent monitors Blue Sky mentions, evaluates requests with OpenAI (GPT-4o), and sends SOL to the provided wallet only when criteria are met.
- 2
Donation tiers and outcomes (successful vs. rejected) are tracked in a persistent donation history log.
- 3
Solana is selected for low transaction fees, making small, frequent transfers feasible for an always-running agent loop.
- 4
A service agent posts a fixed SOL price, requests up-front payment, verifies payment by detecting wallet balance changes, then executes the service.
- 5
Paid services use tool-calling (Brave Search) to fetch live data and respond with results plus links.
- 6
The same agent-with-crypto-budget concept is extended to an X-based “based terminal” using the xAI API, with image generation via Flux and optional crypto tipping.