SDK jobs
JobManager methods for submission, polling, real-time monitoring, listing, and deletion
The JobManager — reached through ivy.jobs — is how you run computational work: submit a tool, watch its progress, list or cancel jobs, and delete them when done. Reach for it whenever you're driving a compute job from TypeScript, from a fire-and-forget submit() to the all-in-one submitAndWait() that submits and blocks until the job finishes. It sits on the Client you construct first; once a job completes, the Artifacts reference covers downloading its output files.
SDK Jobs Reference
Planned specification. @ivybiosciences/sdk is not released, and there is no package to install. This page describes the SDK's planned interface. To call the platform today, use the REST API, the ivybloom CLI, or the MCP server.
The JobManager handles the full lifecycle of computational jobs: submission, status polling, real-time monitoring, listing, and deletion.
Access via ivy.jobs.
jobs.submit(params)
Submit a new computational job. Returns immediately with the job ID.
Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
params.toolName | string | Yes | Computational tool (e.g., "esmfold", "diffdock") |
params.parameters | Record<string, unknown> | Yes | Tool-specific input parameters |
params.projectId | string | No | Project to associate with |
params.jobTitle | string | No | Human-readable title |
params.orgId | string | No | Organization ID for team-scoped jobs |
params.analysisLevel | "basic" | "standard" | "comprehensive" | No | Analysis depth (default: "standard") |
Returns:
| Field | Type | Description |
|---|---|---|
id | string | Unique job identifier for status queries |
status | string | Initial status (typically "pending") |
taskId | string? | Modal task ID for infrastructure tracking |
Throws: IvyApiError on validation (422), auth (401/403), or server (5xx) errors.
Examples
jobs.getStatus(jobId)
Get the current status of a job. Lightweight endpoint suitable for polling.
Parameters:
| Parameter | Type | Description |
|---|---|---|
jobId | string | The job identifier |
Returns: JobProgress — current status, progress %, phase, and results.
Throws: IvyApiError with isNotFound if the job doesn't exist.
Examples
jobs.getDetails(jobId)
Get full job details including parameters, timestamps, and metadata.
More expensive than getStatus — use for detailed inspection, not polling.
Throws: IvyApiError with isNotFound if the job doesn't exist.
Examples
jobs.list(options?)
List the authenticated user's jobs with pagination.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
options.skip | number | 0 | Number of jobs to skip (offset) |
options.limit | number | 100 | Maximum jobs to return |
Returns: Array of job records, ordered by creation time (newest first).
Examples
jobs.delete(jobId)
Delete a job and its associated S3 artifacts. Irreversible.
Throws:
IvyApiErrorwithisNotFoundif the job doesn't exist.IvyApiErrorwithisForbiddenif the job belongs to another user.
Examples
Cancelling a job
JobManager has no cancel method. In React, the cancel function returned by useIvyJob stops the hook tracking the job on the client; it does not stop the job on the backend. To remove a job, use jobs.delete.
jobs.submitAndWait(params, options?)
Submit a job and wait for it to reach a terminal state. The highest-level convenience method.
Strategy:
- Submits the job via HTTP POST
- Subscribes to WebSocket updates (if
useWebSocketis true) - Falls back to HTTP polling if WebSocket fails
- Resolves when status is
COMPLETED,FAILURE, orCANCELLED
Options:
| Field | Type | Default | Description |
|---|---|---|---|
onProgress | (progress: JobProgress) => void | — | Called on each status change |
pollInterval | number | 3000 | Polling interval in ms (fallback mode) |
timeout | number | 600000 | Max wait time in ms (10 minutes) |
useWebSocket | boolean | true | Use WebSocket for real-time updates |
Returns: Final JobProgress with status, results, and/or errors.
Throws:
IvyTimeoutErrorif the job doesn't finish within the timeout.IvyApiErroron submission or polling errors.
Examples
Job Lifecycle
Standard Phases
| Phase | Progress | Description |
|---|---|---|
initialization | ~5% | Input validation |
data_preprocessing | ~15% | Data loading and prep |
model_loading | ~10% | ML model initialization |
main_computation | ~50% | Core processing |
post_processing | ~15% | Result analysis |
result_generation | ~5% | Format and store |
Analysis Levels
| Level | Description | Data Fields |
|---|---|---|
basic | Fast results, minimal metrics | Standard output only |
standard | Balanced analysis (default) | Key quality metrics |
comprehensive | Full analytical suite | 5-10x more fields |
Was this page helpful?