Once you’ve deployed an app and invoked it, you can check its status.

The API is available, and the CLI command is coming soon.

kernel invocation info <invocation_id>
App Invocation:
Invocation ID: 026d6dad-7a9d-4622-9c5a-a02ec6825889
Status: RUNNING # One of [QUEUED, RUNNING, SUCCEEDED, FAILED]

You can also access the invocation’s info by making a GET request to Kernel’s API:

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.