Async Runs

Monitor and manage asynchronous agent processing jobs.

runs

List async job runs across agents.

lettactl get runs [agent] [options]

Options

FlagTypeDescription
--activebooleanShow only active/running jobs
--agent, -astringFilter by agent name (alias for positional)
--limit, -lnumberLimit number of results
--watch, -wbooleanContinuously poll and refresh the run list (Ctrl+C to stop)

Examples

All runs
lettactl get runs
Agent runs
lettactl get runs my-agent
Active runs
lettactl get runs --active
Watch mode
lettactl get runs my-agent --watch

run

Get details about a specific async run.

lettactl run <run-id> [options]

Options

FlagTypeDescription
--waitbooleanWait for the run to complete
--streambooleanStream run output
--messagesbooleanShow messages produced by the run

Examples

Check run
lettactl run abc-123
Wait for completion
lettactl run abc-123 --wait --messages

track

Track async runs until completion. Auto-exits when all runs reach a terminal state. Exit code 1 if any run failed (CI/CD friendly).

lettactl track [run-ids...] [options]

Options

FlagTypeDescription
--agent, -astringTrack all active runs for an agent

Examples

Track specific runs
lettactl track <run-id-1> <run-id-2>
Track by agent
lettactl track --agent my-agent

run-delete

Cancel and delete a specific async run.

lettactl run-delete <run-id>

Examples

Cancel run
lettactl run-delete abc-123

SDK: Run Management

The LettaCtl SDK exposes run management methods for programmatic use: sendMessage, getRun, waitForRun, listRuns, and deleteRun.

import { LettaCtl } from 'lettactl'

Examples

Send message and wait
const ctl = new LettaCtl({ lettaBaseUrl: 'http://localhost:8283' });
const run = await ctl.sendMessage(agentId, 'Hello');
const completed = await ctl.waitForRun(run.id, { timeout: 60 });
List runs for an agent
const runs = await ctl.listRuns(agentId);
const activeRuns = await ctl.listRuns(agentId, { active: true });
const limited = await ctl.listRuns(agentId, { limit: 5 });
Cancel a run
await ctl.deleteRun(runId);
Check run status
import { isRunTerminal, getEffectiveRunStatus } from 'lettactl';
const run = await ctl.getRun(runId);
if (isRunTerminal(run)) {
  console.log('Done:', getEffectiveRunStatus(run));
}