Once you’ve deployed an app and invoked it, you can check its status.
const response = await fetch(`https://api.onkernel.com/invocations/${invocation_id}`, {
    headers: {
        'Authorization': `Bearer ${process.env.KERNEL_API_KEY}`,
        'Content-Type': 'application/json'
    }
});
const {
    id,
    app_name,
    action_name,
    payload,
    output,
    started_at,
    finished_at,
    status,
    status_reason } = await response.json();
Or, get the invocation’s info using Kernel’s SDK:
import { Kernel } from '@onkernel/sdk';

const {
    id,
    app_name,
    action_name,
    payload,
    output,
    started_at,
    finished_at,
    status,
    status_reason
} = await Kernel.invocations.get(invocation_id);
An invocation ends once its code execution finishes.
Once the invocation’s status reaches a terminal state (SUCCEEDED or FAILED), the same kernel invocation info command can be used to retrieve the replay.