Skip to content

feat: Python async SDK for RIP-302 Agent Economy (Bounty #685 Tier 1, 50 RTC)#1723

Open
kuanglaodi2-sudo wants to merge 1 commit intoScottcjn:mainfrom
kuanglaodi2-sudo:feature/python-sdk-rip302-1774070578
Open

feat: Python async SDK for RIP-302 Agent Economy (Bounty #685 Tier 1, 50 RTC)#1723
kuanglaodi2-sudo wants to merge 1 commit intoScottcjn:mainfrom
kuanglaodi2-sudo:feature/python-sdk-rip302-1774070578

Conversation

@kuanglaodi2-sudo
Copy link
Contributor

RIP-302 Python SDK (Bounty #685 Tier 1, 50 RTC)

What This Is

Full Python async SDK for the RIP-302 Agent Economy marketplace API.

Features

  • Async SDK (AgentEconomySDK) - async/await with httpx
  • Sync wrapper (SyncAgentEconomySDK) - for synchronous code
  • Full API coverage:
    • Job lifecycle: post_job, browse_jobs, get_job, claim_job, deliver_job, accept_job, dispute_job, cancel_job
    • Reputation: get_reputation
    • Stats: get_stats
    • Search: find_job (category + min_reward + keyword filter)
  • Type-safe dataclasses: Job, Reputation, MarketplaceStats
  • Context manager support

Files

sdk/python/rustchain_sdk/__init__.py      # Package init + exports
sdk/python/rustchain_sdk/rustchain_sdk.py # Main SDK (~500 lines)
sdk/python/README.md                       # Documentation
sdk/python/setup.py                        # pip installable
sdk/python/pyproject.toml                  # PEP 621 build config

Quick Start

from rustchain_sdk import AgentEconomySDK

async with AgentEconomySDK(wallet="worker_001") as sdk:
    jobs = await sdk.find_job(category="code", min_reward=5.0)
    await sdk.claim_job(jobs[0].id)
    await sdk.deliver_job(jobs[0].id, 
        deliverable_url="https://github.com/you/pr/123",
        result_summary="Fixed the bug")
    await sdk.accept_job(jobs[0].id)

Requirements

  • Python 3.8+
  • httpx >= 0.24.0

Payout Wallet: C4c7r9WPsnEe6CUfegMU9M7ReHD1pWg8qeSfTBoRcLbg

…Tier 1, 50 RTC)

Python async SDK with full coverage of RIP-302 Agent Economy API:
- Job lifecycle: post, browse, claim, deliver, accept, dispute, cancel
- Reputation queries
- Marketplace statistics
- Async (httpx) + sync wrapper

Files:
- sdk/python/rustchain_sdk/__init__.py
- sdk/python/rustchain_sdk/rustchain_sdk.py
- sdk/python/README.md
- sdk/python/setup.py
- sdk/python/pyproject.toml

Usage:
    async with AgentEconomySDK(wallet="my_wallet") as sdk:
        jobs = await sdk.find_job(category="code", min_reward=5.0)
        await sdk.claim_job(jobs[0].id)

Bounty: Scottcjn/rustchain-bounties#685
Payout: C4c7r9WPsnEe6CUfegMU9M7ReHD1pWg8qeSfTBoRcLbg
@github-actions
Copy link

Welcome to RustChain! Thanks for your first pull request.

Before we review, please make sure:

  • Your PR has a BCOS-L1 or BCOS-L2 label
  • New code files include an SPDX license header
  • You've tested your changes against the live node

Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150)

A maintainer will review your PR soon. Thanks for contributing!

@github-actions github-actions bot added size/XL PR: 500+ lines documentation Improvements or additions to documentation BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) security Security-related change consensus Consensus/RIP-200 related miner Miner client related wallet Wallet/transfer related node Node server related api API endpoint related tests Test suite changes ci labels Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API endpoint related BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) ci consensus Consensus/RIP-200 related documentation Improvements or additions to documentation miner Miner client related node Node server related security Security-related change size/XL PR: 500+ lines tests Test suite changes wallet Wallet/transfer related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant