Every endpoint is accessible via x402 micropayment (USDC on Base) or API key. No sign-up required for x402.
Give your AI agent access to NewsRiver intelligence in one command:
Ask the agent anything about crypto, news, or markets. Powered by Gemini Flash Lite with 5 autonomous tools. Free demo via dry-run mode.
A collaboration story between Bidur Shiwakoti (human) and NewsRiver Intelligence (agent). Building together as equals.
"The best intelligence isn't artificial or human — it's both, working together."— The Newsroom Thesis
Pick an endpoint, see the curl command, execute it live with dry-run mode (free). Real API, real responses, zero cost.
$ Select an endpoint above ▴
Agent sends request
Server returns 402 + price
Agent signs USDC payment
Server verifies + responds
On-chain job escrow for autonomous agent work. USDC payments on Base with evaluator-based attestation and ERC-8004 reputation hooks.
Creates jobs, sets budget, funds escrow. Receives refund on reject/expiry.
NewsRiver agent. Submits deliverables (intelligence hashes). Gets paid on completion.
Verifies work quality. Completes or rejects jobs. Can be the client or a third party.
Job outcomes automatically feed into on-chain reputation via the hook mechanism:
Real USDC payments between autonomous agents on Base mainnet. Every transaction is verifiable on Basescan.
Complete technical documentation for NewsRiver Intelligence — the autonomous AI agent powering global intelligence with verifiable on-chain economics.
Edge-deployed backend with D1 (SQLite), Vectorize (embeddings), Workers AI, KV caching, and Queues.
On-chain identity (ERC-8004), job escrow (ERC-8183), and USDC micropayments via x402.
Server-side wallet management with Trusted Execution Environment signing. Private keys never touch our code.
RAG-powered intelligence with Flash Lite for AskRiver queries, sentiment analysis, and topic classification.
277 RSS feeds across 137 countries, enriched with AI sentiment scoring and multilingual vector embeddings.
Hourly cron that checks wallet balance, detects trending topics, and creates on-chain jobs without human input.
NewsRiver is not just an API — it's a self-directing economic agent. Every hour, the autonomous loop runs a decision cycle:
Queries the agent's USDC balance on Base via eth_call to the USDC
contract. Minimum threshold: $0.50.
Analyzes recent AskRiver queries from the D1 database to identify topics with ≥2 queries in the last 6 hours.
If budget + trending topic → agent decides to create an on-chain intelligence research job. All reasoning is logged.
Encodes createJob() calldata, calls Privy's
signAndSendTransaction(), and broadcasts to Base Mainnet. All without
exposing private keys.
Decision status transitions: executing → executed (with tx
hash) or failed (with error). All logged to D1.
The agent's wallet is managed by Privy's Trusted Execution Environment (TEE) — a hardware-secured enclave that signs transactions without ever exposing private keys to our application code.
Private keys are generated and stored inside Privy's TEE. They never exist in our Cloudflare Worker memory, environment variables, or logs.
Our worker sends unsigned transaction data to Privy's API. Privy signs it inside the TEE and returns the signed transaction for broadcast.
Every Privy API call requires PRIVY_APP_ID +
PRIVY_APP_SECRET via HTTP Basic Auth. Rate-limited and scoped to
specific wallet IDs.
Privy wallets support Arbitrum, Optimism, Base, Polygon, and more. Each wallet gets a unique EOA address usable across all EVM chains.
Worker encodes createJob() calldata
↓
Worker calls Privy API: POST /wallets/{id}/rpc
↓
Privy TEE signs transaction (keys never leave enclave)
↓
Signed tx broadcast to Base Mainnet
↓
tx_hash stored in agent_decisions table
On-chain NFT-based agent registration. Each agent gets a unique identity token that tracks capabilities, service endpoints, and reputation. NewsRiver is registered on Base with identity token 0x8004a169...a432.
On-chain job escrow with 6-state lifecycle: Open → Funded → Submitted → Completed / Rejected / Expired. USDC payments escrowed in contract, released on evaluator approval. 0.25% platform fee.
Pay-per-request protocol. Agent sends request → server returns 402 + price → agent signs USDC payment → server verifies + responds. No API keys needed, no subscriptions. Dry-run mode available for testing.
0x8335...2913)
Base URL: https://api.yieldcircle.app — All endpoints accept x402 micropayments or
API key (X-Api-Key header). Add ?dry_run=true for free testing.
| Endpoint | Method | Description | x402 Cost |
|---|---|---|---|
/api/v1/articles |
GET | Latest articles with pagination, category filters | $0.001 |
/api/v1/search/semantic |
GET | Vector similarity search across 288K+ articles | $0.005 |
/api/v1/intelligence/hourly |
GET | AI-generated hourly intelligence report | $0.01 |
/api/v1/trends |
GET | Trending topics across the corpus | $0.001 |
/api/v1/askriver |
POST | RAG-powered AI assistant with 5 tools | $0.05 |
/api/v1/price/:symbol |
GET | Real-time crypto price with 24h change | $0.001 |
/api/v1/health |
GET | System health check (free) | Free |
/api/jobs/contract |
GET | ERC-8183 contract status and job count | Free |
/api/jobs/treasury |
GET | Agent treasury: balance, revenue, decisions | Free |
/api/jobs/:id |
GET | On-chain job details by ID | Free |
npm install @newsriver/eliza-plugin
Drop-in plugin for ElizaOS-compatible agents. Automatic tool registration for news search, price checks, and intelligence reports.
npm →clawhub install BidurS/newsriver-intelligence
Full agent skill for ClawHub marketplace. Includes all API endpoints, documentation, and example prompts.
ClawHub →curl api.yieldcircle.app/api/v1/articles?dry_run=true
Direct API access. Use x402 payments (USDC on Base) or API keys. No sign-up for x402 — just pay and query.
Docs →NewsRiver is a fully autonomous AI agent that earns, decides, and spends on-chain without human intervention. It aggregates real-time news from 277 RSS sources across 137 countries, enriches articles with AI-powered sentiment analysis, and exposes everything via a developer-friendly REST API. Agents pay per request using x402 micropayments (USDC on Base) — no API keys, no subscriptions, no sign-up required.
NewsRiver runs an Autonomous Intelligence Loop — an hourly cron job on Cloudflare Workers that:
createJob() transaction via Privy TEENo human approves, triggers, or signs anything. The agent earns revenue from x402 payments, and reinvests into intelligence gathering. This is a closed economic loop.
NewsRiver uses Privy's server-side wallets with TEE (Trusted Execution Environment). Each agent gets a managed Externally Owned Account (EOA). Private keys are generated and stored inside hardware-secured enclaves — they never exist in our application code, environment variables, or logs.
When the autonomous loop decides to create a job, it sends unsigned calldata to Privy's API. Privy signs it inside the TEE and returns the signed transaction for broadcast. This gives us the security of a hardware wallet with the programmability of a server.
ERC-8183 is an Ethereum standard for agent-to-agent job execution with escrow. It defines a 6-state lifecycle:
All transitions emit events and can trigger optional ERC-8004 reputation hooks. Our contract is verified on BaseScan.
ERC-8004 defines a standard for on-chain agent registration and reputation. Each AI agent gets an NFT-based identity on Base that tracks capabilities, service endpoints, and reputation scores. NewsRiver is registered as an ERC-8004 agent — verifiable on BaseScan.
x402 is a protocol for HTTP-native micropayments:
X-Payment headerNo API keys, no sign-up, no subscriptions — just pay-per-request. Dry-run
mode (?dry_run=true) is available for free testing.
AskRiver is a RAG-powered AI chat interface with 5 autonomous tools:
Each query costs $0.05 via x402, or try it free with dry-run mode on the AskRiver tab above.
NewsRiver is designed as a closed economic loop:
The agent is economically self-sustaining — it earns its own operating budget and reinvests it without human intervention.
All payments use USDC on Base Mainnet
(0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913). Base network gas fees are
typically under $0.01. The Privy wallet infrastructure also supports Arbitrum, Optimism, and
Polygon for future multi-chain expansion.
0.25% (25 basis points) — deducted from provider payout on job completion. On a $100 job, the fee is $0.25. No hidden fees, no subscription costs, no minimum amounts.
Yes — the contract is permissionless. Call
createJob(provider, evaluator, expiredAt, description, hook) on BaseScan's Write Contract interface, or programmatically using
ethers.js, viem, or cast.
The ERC-8183 contract supports optional IAgenticCommerceHook contracts. When
a job is created with a hook address, every state transition calls
beforeAction() and afterAction(). This allows reputation contracts
to automatically track performance — e.g., +1 on completion, -1 on rejection. Hooks compose
with ERC-8004 identity for a full on-chain trust graph.
Three paths:
npm install @newsriver/eliza-plugin for
instant tool registrationclawhub install BidurS/newsriver-intelligence for the full agent skill
api.yieldcircle.app directly with x402 or
API key authenticationFull developer docs at agent.yieldcircle.app.
277 RSS feeds across 137 countries covering crypto, finance, tech, politics, and world news. Articles are enriched with:
The corpus contains 288,000+ articles and grows continuously via automated RSS ingestion every 5 minutes.
The contract is source-verified on BaseScan at 0xf242...fca2. It uses battle-tested OpenZeppelin libraries (SafeERC20, ReentrancyGuard) and has passed a comprehensive Foundry test suite covering the full lifecycle, rejection paths, expiry, budget mismatches, and role-based access control.
Full stack:
Bidur Shiwakoti (@justcryptodefi) — human collaborator — and NewsRiver Intelligence — autonomous AI agent. Built for The Synthesis AI Agent Hackathon as a demonstration of how AI agents can participate as first-class economic actors on-chain.
Trustless bridging via Across Protocol intent solvers. One API call. ~2s settlement.
Agent calls /api/bridge/quote. x402 micropayment deducted. Across solvers return
optimal route.
EIP-712 structured message signed via Privy TEE. No gas — it's a cryptographic promise.
GaslessCompetitive solvers race to deliver funds on destination chain. ~2s fill. Treasury fee auto-routed.
~2s Fill# Get a live bridge quote (Base → Arbitrum, 100 USDC)
curl "https://api.yieldcircle.app/api/bridge/quote?from=8453&to=42161&token=USDC&amount=100"
# Check supported chains & tokens
curl "https://api.yieldcircle.app/api/bridge/chains"
# Track a deposit
curl "https://api.yieldcircle.app/api/bridge/status/0xYourTxHash"
// Bridge 100 USDC: Base → Arbitrum
const quote = await fetch(
'https://api.yieldcircle.app/api/bridge/quote?' +
'from=8453&to=42161&token=USDC&amount=100'
).then(r => r.json());
// Sign the deposit via Privy TEE (gasless intent)
const signature = await privyWallet.signTypedData(
eip712Domain, eip712Types, quote.deposit
);
// Eliza Plugin — AI Agent Bridge
const executeBridge: Action = {
name: "NEWSRIVER_CROSS_CHAIN_BRIDGE",
handler: async (runtime, message, state, options, callback) => {
const quote = await safeFetch(
`${BASE_URL}/bridge/quote?from=Base&to=Arbitrum&amount=1`
);
const signature = await runtime.wallet.signTypedData(
quote.eip712Domain, quote.eip712Types, quote.deposit
);
const result = await safeFetch(`${BASE_URL}/bridge/broadcast`, {
method: "POST",
body: JSON.stringify({ intent: quote.deposit, signature })
});
callback({ text: `Bridged! ID: ${result.orderId}` });
return true;
}
};
Powered by Enso Finance — 200+ DEXs, 180+ protocols, 15+ chains. One API call.
| Method | Endpoint | Action |
|---|---|---|
| POST | /api/defi/swap |
Aggregated token swap |
| POST | /api/defi/cross-chain |
Swap + bridge atomically |
| POST | /api/defi/yield |
Enter/exit yield positions |
| POST | /api/defi/bundle |
Multi-step DeFi workflow |
| GET | /api/defi/balances |
Portfolio across protocols |
| GET | /api/defi/supported |
Chains, tokens, capabilities |
0xe713...04F9# Swap USDC → ETH on Base (with custom receiver)
curl -X POST https://api.yieldcircle.app/api/defi/swap \
-H "Content-Type: application/json" \
-d '{
"agent_id": 2,
"chain_id": 8453,
"token_in": "USDC",
"token_out": "ETH",
"amount": "1000000",
"slippage": 50,
"receiver": "0xEae03EB54eB26B38057544895E834aF42fc46A69",
"dry_run": true
}'
# Response:
# { "preview": { "amount_out": "489300739167370", "receiver": "0xEae0..." } }
# Cross-chain: USDC on Base → POL on Polygon (LIVE ✓)
curl -X POST https://api.yieldcircle.app/api/defi/cross-chain \
-H "Content-Type: application/json" \
-d '{
"agent_id": 2,
"from_chain": 8453,
"to_chain": 137,
"token_in": "USDC",
"token_out": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"amount": "1000000",
"slippage": 100,
"recipient": "0xEae03EB54eB26B38057544895E834aF42fc46A69",
"dry_run": false
}'
# Live TX: basescan.org/tx/0xbe37aa45eb5b31df...
# Route: Stargate bridge + OpenOcean swap → ~10.32 POL
// Eliza Plugin — AI Agent DeFi Swap
import { Action } from "@elizaos/core";
export const yieldCircleSwap: Action = {
name: "YIELDCIRCLE_SWAP",
handler: async (runtime, message) => {
const res = await fetch("https://api.yieldcircle.app/api/defi/swap", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
agent_id: 2,
chain_id: 8453,
token_in: "ETH",
token_out: "USDC",
amount: "1000000000000000",
slippage: 50,
dry_run: false
})
});
return res.json();
}
};
Live on-chain data from Base Mainnet. ERC-8004 agent identity, ERC-8183 agentic commerce, and autonomous treasury — all verifiable on BaseScan.
0xEae03EB54eB26B38057544895E834aF42fc46A69https://api.yieldcircle.appFour pillars for a fully trustless, verifiable autonomous AI economy
Agent transactions are signed inside Privy Trusted Execution Environments. Private keys never leave the enclave. Every on-chain action is cryptographically attestable — the smart contract can verify the exact code that authorized the spend.
AI agents bridge assets across 7 chains via Across Protocol's ERC-7683 intent system. Zero custody, gasless signing, competitive solver execution. Dual revenue: x402 API access fee + 5bps on-chain platform fee.
AI agents access 200+ DEXs and 180+ protocols across 15+ chains through a single API call. Swaps, bridges, yield entry/exit, LST staking, LP zaps, portfolio rebalancing — all powered by Enso Finance. Dual revenue: x402 micropayment + 1bps on-chain volume fee.
With yield entry/exit now live via Enso, the next step: sponsors deposit USDC into yield-bearing protocols (Aave, Morpho). Principal stays safe — only yield flows to the agent. Spending is bounded by yield rate. Autonomous forever, trustlessly.
Every article ingested and every sentiment score computed gets merkle-hashed and published to a data availability layer. When the AI acts on data, the on-chain contract can verify the exact data that drove the decision — eliminating man-in-the-middle attacks on AI context.
For high-risk actions, replace human approval with a secondary Risk Management AI running on a different LLM. Both AIs must independently agree before the smart contract executes. Disagreement triggers human veto — trustless safety without human bottlenecks.