---
title: "Redeploy Agent"
method: POST
path: "/agents/{job_id}/redeploy"
tags: ["Agents"]
---

# Redeploy Agent

`POST /agents/{job_id}/redeploy`

Redeploy a cancelled/failed agent.

Re-uploads stored code to the Flink pod and starts the job.
Set with_savepoint=true (default) to resume from last savepoint, or false
to start fresh. Body is optional - omit it to accept defaults.

## Path parameters

- `job_id` string, required

## Request body

- RedeployAgentRequest — Request body for POST /agents/{id}/redeploy.
  - `withSavepoint` boolean — If True and a savepoint exists, resume from it (preserves Kafka offsets and state).

## Response `200`

Successful Response

- AppModelsApiAgentsApiModelsFlinkJobsFlinkJobResponse
  - `_id` string, required
  - `name` string, required
  - `job_type` 'pyflink' | 'jar' | 'agent_config' | 'knowledge_base', required
  - `status` 'CREATED' | 'DEPLOYING' | 'RUNNING' | 'CANCELLING' | 'CANCELLED' | 'FAILED' | 'FINISHED', required
  - `desired_status` 'CREATED' | 'DEPLOYING' | 'RUNNING' | 'CANCELLING' | 'CANCELLED' | 'FAILED' | 'FINISHED'
  - `flink_job_name` string, required
  - `flink_job_id` string, nullable
  - `parallelism` integer
  - `error_message` string, nullable
  - `agent_config` object, nullable
  - `created_by` string, nullable
  - `created_timestamp` string, date-time, nullable
  - `updated_timestamp` string, date-time, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/streamkap/apis/streamkap-rest-api.md) · [All operations](https://skmtc.net/streamkap/apis/streamkap-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/streamkap/streamkap-rest-api/versions/8aea6143d003/schema)
