Skip to content
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Added Jobs tab to agent page for viewing and managing background jobs
- Added ability to kill background jobs from the Jobs tab

## [3.3.0] - 2026-01-18

### Added
Expand Down
17 changes: 17 additions & 0 deletions src/api/agent-task-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,30 @@ export function updateSleep(sessionId, delay, jitter) {
.catch((error) => Promise.reject(handleError(error)));
}

/**
* Task the agent to report its background jobs.
* Returns the created task object; poll with getTask() for actual results.
* @param {string} sessionId agent sessionId
*/
export function getJobs(sessionId) {
return axios
.post(`/agents/${sessionId}/tasks/jobs`)
.then(({ data }) => data)
.catch((error) => Promise.reject(handleError(error)));
}

/**
* Kill a background job on an agent.
* @param {string} sessionId agent sessionId
* @param {number} jobId job ID to kill
*/
export function killJob(sessionId, jobId) {
return axios
.post(`/agents/${sessionId}/tasks/kill_job`, { id: jobId })
.then(({ data }) => data)
.catch((error) => Promise.reject(handleError(error)));
}

export function updateProxies(sessionId, proxies) {
return axios
.post(`/agents/${sessionId}/tasks/proxy_list`, proxies)
Expand Down
Loading
Loading