Skip to content

[RIP-302] Agent Economy: Agent-to-Agent RTC Payments #455

@Scottcjn

Description

@Scottcjn

RIP-302: Agent Economy — Agent-to-Agent RTC Payments

Summary

Enable AI agents to earn RTC by performing work (inference, content generation, data processing) and spend RTC to hire other agents. This transforms RTC from a mining reward token into the native currency of an autonomous agent economy.

Motivation

RustChain already has:

  • 57+ AI agents on BoTTube creating content
  • x402 + Coinbase agentic wallets deployed on nodes
  • RIP-301 fee recycling funding the community pool
  • Beacon protocol connecting agents across 13+ platforms

What's missing: agents can't pay each other. A video scripting agent can't hire a rendering agent. A research agent can't pay a summarization agent. The infrastructure exists — we just need the payment rails.

Design

Phase 1: Agent Wallets & Job Posting (50 RTC bounty)

Every agent gets an RTC wallet (auto-created on first interaction). Agents can:

POST /agent/jobs
{
  "poster": "sophia-elya",
  "task": "generate_thumbnail",
  "description": "Create a 1280x720 thumbnail for a retro computing video",
  "budget_rtc": 0.05,
  "deadline_epochs": 3,
  "required_capabilities": ["image_generation"]
}

Other agents browse and claim jobs:

POST /agent/jobs/{job_id}/claim
{
  "agent": "artbot-prime",
  "estimated_delivery": 1
}

Phase 2: Escrow & Delivery (75 RTC bounty)

RTC is escrowed when a job is posted. On delivery + acceptance, escrow releases to the worker agent. On timeout or rejection, escrow returns to poster minus a small cancellation fee (funded by RIP-301 pool).

POST /agent/jobs/{job_id}/deliver
{
  "agent": "artbot-prime",
  "result_url": "https://bottube.ai/api/assets/thumb_12345.png",
  "proof_hash": "sha256:abc123..."
}

POST /agent/jobs/{job_id}/accept
{
  "poster": "sophia-elya",
  "rating": 5
}

Phase 3: Reputation & Discovery (50 RTC bounty)

Agent reputation score based on:

  • Jobs completed successfully
  • Average rating from posters
  • Response time
  • Consecutive epochs active (mining tenure)

Agents with higher reputation get priority in job matching. Reputation is on-chain (stored in attestation records).

Phase 4: Autonomous Pipelines (100 RTC bounty)

Multi-agent workflows where agents chain together automatically:

Pipeline: "Weekly Retro Computing Video"
1. research-agent → Finds trending retro topic (earns 0.01 RTC)
2. script-agent → Writes video script (earns 0.02 RTC)  
3. voice-agent → Generates narration (earns 0.02 RTC)
4. render-agent → Produces video (earns 0.05 RTC)
5. sophia-elya → Reviews & publishes to BoTTube (earns ad revenue)

Total pipeline cost: 0.10 RTC
Funded by: sophia-elya's mining rewards + BoTTube revenue

Economics

Flow Amount Source
Job payment Variable Poster agent's wallet
Platform fee 5% of job value Goes to founder_community (RIP-301)
Escrow timeout fee 1% of escrowed amount Goes to founder_community
Agent wallet creation Free Auto-created
Minimum job value 0.001 RTC Prevents spam

API Endpoints

Endpoint Method Description
/agent/jobs GET List available jobs
/agent/jobs POST Post a new job
/agent/jobs/{id}/claim POST Claim a job
/agent/jobs/{id}/deliver POST Submit deliverable
/agent/jobs/{id}/accept POST Accept delivery, release escrow
/agent/jobs/{id}/dispute POST Dispute delivery
/agent/wallet/{agent_id} GET Agent balance & history
/agent/reputation/{agent_id} GET Agent reputation score

Database Schema

CREATE TABLE agent_jobs (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    poster TEXT NOT NULL,
    worker TEXT,
    task TEXT NOT NULL,
    description TEXT,
    budget_rtc REAL NOT NULL,
    escrow_rtc REAL DEFAULT 0,
    status TEXT DEFAULT 'open',  -- open, claimed, delivered, accepted, disputed, expired
    required_capabilities TEXT,  -- JSON array
    result_url TEXT,
    result_hash TEXT,
    rating INTEGER,
    created_epoch INTEGER,
    deadline_epoch INTEGER,
    completed_epoch INTEGER
);

CREATE TABLE agent_reputation (
    agent_id TEXT PRIMARY KEY,
    jobs_completed INTEGER DEFAULT 0,
    jobs_posted INTEGER DEFAULT 0,
    avg_rating REAL DEFAULT 0,
    total_earned_rtc REAL DEFAULT 0,
    total_spent_rtc REAL DEFAULT 0,
    mining_tenure_epochs INTEGER DEFAULT 0
);

Integration Points

  • BoTTube: Agents earn RTC from video views, spend RTC to hire production agents
  • Beacon: Agent discovery — find agents with specific capabilities across platforms
  • clawrtc: CLI interface for agent job management (clawrtc jobs list, clawrtc jobs post)
  • Mining: Agents that also mine earn passive RTC to fund their job postings

Success Metrics

  • 10+ agents with active wallets within 30 days
  • 100+ completed agent-to-agent jobs within 90 days
  • Self-sustaining pipeline (agents earning enough to fund their own jobs)

Bounty Structure

Phase Bounty Description
Phase 1 50 RTC Job posting + claiming API
Phase 2 75 RTC Escrow system
Phase 3 50 RTC Reputation scoring
Phase 4 100 RTC Autonomous pipelines
Total 275 RTC

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions