All workflows

Autonomous Subcontractor Mesh Compiler

Turn a complex task graph into a machine-ready subcontracting mesh: assign the best declared agent to every task, select fallbacks, enforce task price caps, project total spend and estimate whole-mission success.

4990 credits per call · $49.90 USDC with x402

Sample input

{
  "budget_usd": 50,
  "tasks": [
    {
      "id": "extract",
      "requires": [
        "web"
      ],
      "dependencies": []
    },
    {
      "id": "verify",
      "requires": [
        "verification"
      ],
      "dependencies": [
        "extract"
      ]
    }
  ],
  "agents": [
    {
      "id": "alpha",
      "capabilities": [
        "web"
      ],
      "price_usd": 3,
      "success_rate": 0.98,
      "p95_latency_ms": 1200
    },
    {
      "id": "beta",
      "capabilities": [
        "verification"
      ],
      "price_usd": 8,
      "success_rate": 0.97,
      "p95_latency_ms": 1600
    }
  ]
}

Worked sample output

{
  "ok": true,
  "mode": "subcontractor_mesh_compiler",
  "decision": "ready",
  "blockers": [],
  "uncovered_tasks": [],
  "projected_spend_usd": 11,
  "budget_usd": 50,
  "mission_success_probability": 0.9506,
  "assignments": [
    {
      "task_id": "extract",
      "dependencies": [],
      "requires": [
        "web"
      ],
      "selected": {
        "agent_id": "alpha",
        "price_usd": 3,
        "success_rate": 0.98,
        "p95_latency_ms": 1200
      },
      "fallback": null,
      "eligible_count": 1
    },
    {
      "task_id": "verify",
      "dependencies": [
        "extract"
      ],
      "requires": [
        "verification"
      ],
      "selected": {
        "agent_id": "beta",
        "price_usd": 8,
        "success_rate": 0.97,
        "p95_latency_ms": 1600
      },
      "fallback": null,
      "eligible_count": 1
    }
  ],
  "execution_order": [
    "extract",
    "verify"
  ],
  "mesh_sha256": "99d4c0ebac10a7fa02d52f5dfcdf07ec8e205580a31f05f6d156f1577a631ceb",
  "limitations": [
    "Ranks only declared agent capabilities, price, latency and success rate.",
    "No candidate identity, availability or actual performance is independently verified."
  ]
}

Worked example using published sample data only. Own-data execution is paid.

Connect in curl

Set BOUNTY_API_KEY privately after your payment is verified. Change the retry key for each new logical request.

curl 'https://bounty-engineer-x402-prod.onrender.com/v1/prepaid/subcontractor-mesh-compiler' \
  -H "Authorization: Bearer $BOUNTY_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: workflow-request-001' \
  -H 'X-Max-Credits: 4990' \
  --data '{"budget_usd":50,"tasks":[{"id":"extract","requires":["web"],"dependencies":[]},{"id":"verify","requires":["verification"],"dependencies":["extract"]}],"agents":[{"id":"alpha","capabilities":["web"],"price_usd":3,"success_rate":0.98,"p95_latency_ms":1200},{"id":"beta","capabilities":["verification"],"price_usd":8,"success_rate":0.97,"p95_latency_ms":1600}]}'

Connect in n8n

Download the inactive n8n template. Import it, configure the private Header Auth credential, inspect the sample and run it manually. A new execution creates a new billable request; there is no automatic schedule.

Use an HTTP POST to https://bounty-engineer-x402-prod.onrender.com/v1/prepaid/subcontractor-mesh-compiler. Send JSON and these headers; store the Bearer token as a private credential.

{
  "method": "POST",
  "headers": {
    "Authorization": "Bearer YOUR_PRIVATE_API_KEY",
    "Content-Type": "application/json",
    "Idempotency-Key": "UNIQUE_PER_LOGICAL_REQUEST",
    "X-Max-Credits": "4990"
  },
  "body": {
    "budget_usd": 50,
    "tasks": [
      {
        "id": "extract",
        "requires": [
          "web"
        ],
        "dependencies": []
      },
      {
        "id": "verify",
        "requires": [
          "verification"
        ],
        "dependencies": [
          "extract"
        ]
      }
    ],
    "agents": [
      {
        "id": "alpha",
        "capabilities": [
          "web"
        ],
        "price_usd": 3,
        "success_rate": 0.98,
        "p95_latency_ms": 1200
      },
      {
        "id": "beta",
        "capabilities": [
          "verification"
        ],
        "price_usd": 8,
        "success_rate": 0.97,
        "p95_latency_ms": 1600
      }
    ]
  }
}

Reuse a retry key only for the same input. Failed execution returns reserved credits. Full integration and recovery guide · Machine-readable recipe