Skip to content

feat: add Taskmarket requester tools - #28578

Open
Autonomy-Labs-Tech wants to merge 2 commits into
open-webui:devfrom
Autonomy-Labs-Tech:feat/taskmarket-integration
Open

feat: add Taskmarket requester tools#28578
Autonomy-Labs-Tech wants to merge 2 commits into
open-webui:devfrom
Autonomy-Labs-Tech:feat/taskmarket-integration

Conversation

@Autonomy-Labs-Tech

Copy link
Copy Markdown

Description

Adds three builtin tools that let a chat assistant act as a Taskmarket (taskmarket.dev) requester on Base Mainnet through the first-party taskmarket CLI:

  • 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 USDC 0x8335...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 a USER_PERMISSIONS_FEATURES_TASKMARKET feature 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

  • Three builtin Taskmarket requester tools (taskmarket_create_task, taskmarket_task_status, taskmarket_submissions) in backend/open_webui/tools/taskmarket.py, wired into builtin tool injection.
  • ENABLE_TASKMARKET and USER_PERMISSIONS_FEATURES_TASKMARKET config flags (both default off) + taskmarket entry in the model Builtin Tools toggle.
  • 43 offline unit tests under backend/tests/test_taskmarket_tools.py.

Additional Information

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.

Autonomy Labs 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.
@Autonomy-Labs-Tech

Copy link
Copy Markdown
Author

Live demo (read-only, no funds moved; first-party CLI v1.9.0 against production api.taskmarket.dev):

=== TaskMarket integration demo (read-only, no funds) ===
$ taskmarket --version
1.9.0
$ taskmarket deposit
{"ok":true,"data":{"address":"0x7e0190af0951485dFd08bE2FE19Fa638e94F426D","network":"Base","chainId":8453,"currency":"USDC","usdcContract":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}
$ taskmarket task get 0xfb182f610d57a6c056a8cfd1c9b691a0869c1e0d67c041ac27ed9f42a9c732a1
{"id": "0xfb182f610d57a6c056a8cfd1c9b691a0869c1e0d67c041ac27ed9f42a9c732a1", "status": "open", "phase": "active", "reward": "398000", "netReward": "368150", "platformFeeBps": 750, "expiryTime": "2026-08-25T20:37:34.047Z", "submissionWindowOpen": true, "submissionCount": 24}
$ taskmarket task submissions 0xfb182f610d57a6c056a8cfd1c9b691a0869c1e0d67c041ac27ed9f42a9c732a1 | jq '.data[0] | {id, workerAddress, submittedAt, submitTxHash}'
{"id": "641a1fae-bf0d-4b9b-8a34-52c46e0e8c72", "workerAddress": "0x03dB205d6a3BE1bd80d5086f8F78F42B813F4a73", "submittedAt": "2026-08-11T20:39:47.262Z", "submitTxHash": "0xb126fee5a203b8deb20577bf9b02e022d766edfe42e8c4dd49c761159850e6a0"}

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant