---
name: bankr-x402-sdk-job-management
description: This skill should be used when the user asks about "job status", "check if request completed", "cancel request", "why is my request taking so long", "poll for result", "batch requests", "retry failed request", "request timeout", "async operations", "job lifecycle", "manual polling", or needs advanced control over SDK async operations, manual job polling, batch processing, retry logic, or job cancellation.
version: 1.1.0
---

# SDK Job Management

Manage asynchronous jobs: submit, poll, check status, cancel, and batch operations.

## SDK Methods

| Method | Description | Use Case |
|--------|-------------|----------|
| `promptAndWait()` | Submit and wait for result | **Recommended** for most cases |
| `prompt()` | Submit, return immediately | Background processing |
| `pollJob()` | Poll until job completes | Manual job tracking |
| `getJobStatus()` | Check status once | Custom polling logic |
| `cancelJob()` | Cancel pending/processing job | Stop unwanted jobs |

## Job Lifecycle

```
pending → processing → completed
                    ↘ failed
                    ↘ cancelled
```

| State | Cancellable | Description |
|-------|-------------|-------------|
| pending | Yes | Awaiting processing |
| processing | Yes | Actively processing |
| completed | No | Finished successfully |
| failed | No | Encountered error |
| cancelled | No | Cancelled by user |

## Usage Examples

### Recommended: promptAndWait

```typescript
const result = await client.promptAndWait({
  prompt: "Swap 0.1 ETH to USDC",
  timeout: 60000,
});

if (result.status === "completed") {
  console.log(result.response);
}
```

### Manual Job Control

```typescript
// Submit without waiting
const { jobId } = await client.prompt({ prompt: "What are trending tokens?" });

// Check status later
const status = await client.getJobStatus(jobId);

// Or poll until complete
const result = await client.pollJob({ jobId, timeout: 60000 });
```

### Cancel Job

```typescript
const { jobId } = await client.prompt({ prompt: "..." });
await client.cancelJob(jobId);
```

### Batch Processing

```typescript
const prompts = ["Price of ETH", "Price of BTC", "Price of SOL"];

// Submit all in parallel
const jobs = await Promise.all(
  prompts.map(prompt => client.prompt({ prompt }))
);

// Wait for all to complete
const results = await Promise.all(
  jobs.map(job => client.pollJob({ jobId: job.jobId }))
);
```

## Timing Guidelines

| Operation | Typical Time | Recommended Timeout |
|-----------|--------------|---------------------|
| Price queries | 2-5s | 15s |
| Balance checks | 2-5s | 15s |
| Token swaps | 5-15s | 60s |
| Cross-chain bridges | 10-30s | 120s |
| NFT operations | 5-15s | 60s |

## Related Skills

- **sdk-wallet-operations**: Client setup and configuration
- **sdk-capabilities**: Full list of supported operations


---
Source attribution: BankrBot
Original project: https://github.com/BankrBot/claude-plugins/blob/67d33d4ee8e1680ce823eb9fe9ad371326c6b5ec/x402-sdk-dev/skills/sdk-job-management/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2024 Bankr

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Dave AI resource metadata

Creator / publisher: BankrBot
Original project: https://github.com/BankrBot/claude-plugins/blob/67d33d4ee8e1680ce823eb9fe9ad371326c6b5ec/x402-sdk-dev/skills/sdk-job-management/SKILL.md
Attribution basis: Recovered original package and original project license at a pinned revision

Fields of work: Sales
Roles: Customer Success Manager, Sales Engineer, Sales Development Rep (SDR)
Specialties: API
Tools: Bankr X402 Sdk
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 19368fb97452d17d931f874a4c166ac98b9c5b15403649fa5b73c452e66a9d3a
Metadata reviewed: 2026-10-27
This metadata supersedes earlier Dave AI catalog attribution. Original instruction and supporting files are preserved.
