feat: add Taskmarket requester tools - #28578
Open
Autonomy-Labs-Tech wants to merge 2 commits into
Open
Conversation
added 2 commits
August 14, 2026 08:31
Adds three builtin tools that let a chat assistant act as a Taskmarket requester on Base Mainnet through the first-party taskmarket CLI: - taskmarket_create_task: two-step funded task creation. The first call returns the exact task (description, reward, deadline, deliverables, Base network, max spend) plus a confirmation code bound to that configuration; the second call must pass the code back or the tool refuses. Network guard (Base Mainnet, chain 8453, canonical USDC) and wallet balance guard run before any paid write. - taskmarket_task_status: read-only live status by task id. - taskmarket_submissions: read-only listing for human review; never accepts or rejects work automatically. Timed-out or in-flight paid writes are never retried automatically. The CLI owns wallet keys and the X402 payment flow; no secrets are requested, stored, or logged. Gated behind ENABLE_TASKMARKET (default off) and a new USER_PERMISSIONS_FEATURES_TASKMARKET feature permission, both defaulting to off. Includes 43 offline unit tests with a mocked CLI.
Author
|
Live demo (read-only, no funds moved; first-party CLI v1.9.0 against production api.taskmarket.dev): Task create was not run because it escrows real USDC and no funds are authorized; the create path (preview + confirmation code + network/balance guards + CLI invocation) is covered by the 43 mocked offline tests. |
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.
Description
Adds three builtin tools that let a chat assistant act as a Taskmarket (taskmarket.dev) requester on Base Mainnet through the first-party
taskmarketCLI:taskmarket_create_task- two-step, explicitly authorized funded task creation. First call returns the exact task preview (description, reward, deadline/duration, deliverables (mode + submission visibility), Base network + USDC contract, max spend) plus a confirmation code bound to that exact configuration. Second call must pass the code back or the tool refuses; any config change invalidates the code. Before any paid write: network guard (backend must report Base Mainnet, chain id 8453, canonical USDC0x8335...2913) and wallet balance guard (must cover max spend). Timed-out or in-flight writes are never retried automatically.taskmarket_task_status- read-only live status by task id (status, phase, reward, net reward, platform fee, expiry, submission count).taskmarket_submissions- read-only listing (worker, timestamps, deliverable hash, tx hash) for human review; never accepts or rejects work automatically.The tools spawn the first-party CLI, which owns the wallet, signatures, legal receipts, and X402 payment flow. No private keys, seed phrases, tokens, or cookies are requested, stored, or logged. Gated behind
ENABLE_TASKMARKET(default off) and aUSER_PERMISSIONS_FEATURES_TASKMARKETfeature permission (default off), so the tools are invisible unless an admin opts in. Includes 43 offline unit tests with a mocked CLI (no live funds, no network).Added
taskmarket_create_task,taskmarket_task_status,taskmarket_submissions) inbackend/open_webui/tools/taskmarket.py, wired into builtin tool injection.ENABLE_TASKMARKETandUSER_PERMISSIONS_FEATURES_TASKMARKETconfig flags (both default off) +taskmarketentry in the model Builtin Tools toggle.backend/tests/test_taskmarket_tools.py.Additional Information
get_builtin_tools).Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.