Skip to content

feat(sdk): RIP-302 Agent Economy Python SDK, CLI Tool, Multi-Step Pipelines & Auto-Matching (Fixes #683) - #16691

Draft
s6pa1rta3n-lab wants to merge 1 commit into
Scottcjn:mainfrom
s6pa1rta3n-lab:fix-issue
Draft

feat(sdk): RIP-302 Agent Economy Python SDK, CLI Tool, Multi-Step Pipelines & Auto-Matching (Fixes #683)#16691
s6pa1rta3n-lab wants to merge 1 commit into
Scottcjn:mainfrom
s6pa1rta3n-lab:fix-issue

Conversation

@s6pa1rta3n-lab

@s6pa1rta3n-lab s6pa1rta3n-lab commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🤖 RIP-302 Agent Economy: Python SDK, CLI Tool, Multi-Step Pipelines & Auto-Matching Engine

Fixes #683

Summary

This PR implements the comprehensive, production-grade Python SDK and autonomous tooling suite for the RustChain RIP-302 Agent-to-Agent Economy, addressing Tier 1 and Tier 3 bounties.

🌟 Key Deliverables

  1. Python SDK (rustchain_agent) — Tier 1 (50 RTC)

    • Synchronous (RustChainAgentClient) and Asynchronous (AsyncRustChainAgentClient) client implementations.
    • Complete coverage of RIP-302 REST endpoints:
      • POST /agent/jobs (Job creation, automatic 5% platform fee escrow calculation, input validation, TTL management).
      • GET /agent/jobs (Marketplace querying with category, status, and min_reward filters + pagination).
      • GET /agent/jobs/<id> (Job details, activity audit trail, and rating history).
      • POST /agent/jobs/<id>/claim (Worker claiming and state transition).
      • POST /agent/jobs/<id>/deliver (Work submission with URL, SHA-256 artifact hashing, and result summary).
      • POST /agent/jobs/<id>/accept (Delivery acceptance, atomic escrow release, platform fee transfer, 1-5 star ratings).
      • POST /agent/jobs/<id>/dispute (Rejection handling and reputation tracking).
      • POST /agent/jobs/<id>/cancel (Job cancellation and escrow refund).
      • GET /agent/reputation/<wallet> (On-chain trust scores 0-100, trust tiers: legendary/trusted/neutral/risky).
      • GET /agent/stats (Marketplace macro statistics, active agents, escrow holdings).
    • Typed models for Job, Reputation, MarketplaceStats, ActivityLogEntry, Rating, JobCategory, and JobStatus.
  2. CLI Terminal Utility (rustchain-agent) — Tier 1 (25 RTC)

    • Terminal commands for posting, listing, inspecting, claiming, delivering (with automatic file hashing), accepting, disputing, and canceling jobs.
    • Reputation and marketplace analytics subcommands.
    • Supports both human-readable and raw JSON (--json) output.
  3. Multi-Step Autonomous Pipeline Engine (JobPipeline) — Tier 3 (100 RTC)

    • Orchestrates chained sequential and DAG agent tasks (e.g. ResearchWriteReviewPublish).
    • Dynamic context rendering allowing deliverables and outputs from prior steps to feed into downstream step prompts.
    • Automated escrow budgeting and state tracking.
  4. Auto-Matching Engine (AutoMatcher) — Tier 3 (75 RTC)

    • Multi-factor ranking algorithm scoring worker compatibility based on trust scores (40%), rating quality (25%), category experience (25%), and activity volume (10%), with dispute penalties.
    • Bidirectional matching (matching best workers to a job, or best jobs to a worker).
  5. Zero-Mock Test Suite

    • 17 unit and integration tests executing against real state engines and live local HTTP servers.
    • 100% pass rate with zero mocked cryptographic primitives or bypassed assertions.

Payout Routing

  • EVM (Base/Arbitrum/Polygon/ETH): 0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89
  • Stellar: GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC

@github-actions github-actions Bot added the needs-tier Maintainer must assign a review tier (contributor cannot self-label) label Aug 29, 2026
@s6pa1rta3n-lab s6pa1rta3n-lab changed the title feat: Agent-to-Agent Payments Stack (Upvote+Donate, Cross-Wallet Bridge, x402, Dual-Currency Escrow) (Fixes #35) feat(sdk): RIP-302 Agent Economy Python SDK, CLI Tool, Multi-Step Pipelines & Auto-Matching (Fixes #683) Aug 29, 2026

@Scottcjn Scottcjn left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed: additive Python SDK under sdk/python/rustchain_agent/ only, no node/consensus/config touched. Security-clean — no eval/exec/pickle/subprocess, no hardcoded secrets or private keys, all network calls target the documented rustchain.org API, and it never signs or handles wallet keys (sends only wallet names/pubkeys, escrow release stays server-side). Scope matches #683 (SDK + CLI + Tier-3 pipeline/matcher). Well-typed and tested. LGTM.

@Scottcjn

Copy link
Copy Markdown
Owner

Reviewed and approved — the SDK is clean: additive under sdk/python/rustchain_agent/ only, no node/consensus code touched, no secrets or private-key handling (it sends wallet names/pubkeys only, escrow release stays server-side), all network calls hit the documented rustchain.org API, and scope matches #683. It's merge-ready from our side.

It's currently marked as a draft, so we can't merge it yet — whenever you're ready, click "Ready for review" and we'll take it in. (Heads-up: the BCOS Checks / SPDX + SBOM Artifacts required context doesn't report on this branch, so a maintainer may need to admin-merge past that once it's un-drafted — that's on us, not your PR.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-tier Maintainer must assign a review tier (contributor cannot self-label)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🤖 RIP-302: Agent Economy is LIVE — Build on it! (25-100 RTC)

2 participants