feat: add Taskmarket action provider - #1448
Open
MohDev212 wants to merge 1 commit into
Open
Conversation
Adds a TaskmarketActionProvider to the Python AgentKit package with read-only task browsing/detail actions (public REST API) and a create-task action that wraps the first-party taskmarket CLI via subprocess. create_task requires explicit confirmation, enforces a TASKMARKET_MAX_SPEND_USDC spending limit (default 10 USDC), echoes the order before executing, and never retries payments with unknown settlement. No API keys or private keys are handled by the provider. 26 unit tests pass (tests/action_providers/taskmarket/).
🟡 Heimdall Review Status
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem this solves
Agents built on AgentKit currently have no first-party way to find or fund work on Taskmarket (https://taskmarket.dev), an onchain agent task marketplace that pays USDC on Base via the x402 protocol. This provider lets an AgentKit agent browse open tasks and create funded tasks from inside its own toolkit, with explicit user authorization gates.
Change summary
TaskmarketActionProviderto the Python AgentKit package with three actions:taskmarket_browse_tasks(read-only): lists open tasks from the public Taskmarket REST API with optional filters (max/min reward in USDC, mode, limit).taskmarket_get_task(read-only): fetches task detail (status, reward, expiry, submission count, description) by task ID.taskmarket_create_task(write): creates a task through the first-partytaskmarketCLI via subprocess, so the CLI owns the wallet, x402 payment flow, and EIP-191 signatures. No API keys or private keys are stored or handled by this provider.action_providers/__init__.pyand the top-level package__init__.py.Safety gates
create_taskrequires an explicitconfirmationboolean; without it the action refuses.TASKMARKET_MAX_SPEND_USDCenv var (default 10 USDC); rewards above the limit are refused.Test plan
tests/action_providers/taskmarket/:.venv/Scripts/python -m pytest tests/action_providers/taskmarket/ -q->26 passedgit grep -i taskmarket).