Skip to content

Delete a AgentRun

DELETE
/apis/nodus.dev/v1/namespaces/{namespace}/agentruns/{name}
curl --request DELETE \
--url https://example.com/apis/nodus.dev/v1/namespaces/example/agentruns/example
namespace
required
string

The project.

name
required
string

The object’s name.

dryRun
string
fieldValidation
string
fieldManager
string
propagationPolicy
string
Idempotency-Key
string
If-Match
string

OK

Media type application/json

AgentRun is one durable execution of an Agent revision: a conversation the agent works through turn by turn in its own Sandbox. A run survives restarts of Nodus: it replays its journal to where it stopped and never repeats a recorded model call or tool call.

object
apiVersion
string
kind
string
metadata
object
annotations
object
key
additional properties
string
creationTimestamp
string
deletionGracePeriodSeconds
integer format: int64
deletionTimestamp
string
finalizers
Array<string>
nullable
generateName
string
generation
integer format: int64
labels
object
key
additional properties
string
managedFields
Array<object>
nullable
object
apiVersion
string
fieldsType
string
fieldsV1
object
key
additional properties
manager
string
operation
string
subresource
string
time
string
name
string
namespace
string
ownerReferences
Array<object>
nullable
object
apiVersion
required
string
blockOwnerDeletion
boolean
controller
boolean
kind
required
string
name
required
string
uid
required
string
resourceVersion
string
selfLink
string
uid
string
spec
required

AgentRunSpec describes an AgentRun. Everything is immutable after create except state.

object
agent
required

Agent names an Agent in the project, or a template in project nodus.

string
deadline

Deadline fails the run with DeadlineExceeded when it passes.

string
dependsOn

DependsOn lists the task keys of the group the run starts after, each already in the group (or earlier in the same AgentRunList). The run is canceled when one of them fails or is canceled.

Array<string>
nullable
group

Group names the AgentGroup the run is a task of; the run then runs the group’s Agent, starts when the group releases it and is named -.

string
input

Input is the first prompt: a JSON string, or any JSON value, sent to the model as its text. Up to 256 KiB.

keepAlive

KeepAlive keeps the run Waiting for messages after each turn instead of succeeding.

boolean
state

State is the desired state: Running (the default) or the cancel state.

string
taskKey

TaskKey is the run’s key in its group, a DNS label unique in the group; required with group.

string
status

AgentRunStatus is what Nodus observed about an AgentRun.

object
answer

AgentRunAnswer is the final answer of a run.

object
preview
required

Preview is the first 4 KiB of the answer.

string
sha256
required

SHA256 is the hex digest of the whole answer.

string
size
required

Size is the answer’s length in bytes.

integer format: int64
completionTime

CompletionTime is when the run reached a terminal phase.

string
cost

Cost is status.cost on every kind that spends money. It is a display copy of the ledger: amounts are decimal USD strings, and nothing is charged from these fields.

object
bySegment

CostSegments splits a charge by billing segment.

object
bootUSD

BootUSD is the charge from the start of billing until the program started.

string
coveredByNodus

CoveredByNodus lists the segments (Boot, Running, Restore, Teardown) with time Nodus paid for instead of charging it, such as the start and teardown of a run that failed because of Nodus.

Array<string>
nullable
restoreUSD

RestoreUSD is the charge for bringing a replacement up after capacity was lost.

string
runningUSD

RunningUSD is the charge while the program ran.

string
teardownUSD

TeardownUSD is the charge from stop until deletion was confirmed, with the billing increment.

string
final

Final is true once the final charge has posted.

boolean
fundedUntilTime

FundedUntilTime is when the current holds stop paying for the object.

string
heldUSD

HeldUSD is what is currently held for it.

string
limitUSD

LimitUSD is the object’s maxCostUSD, if it has one.

string
rateUSDPerHour

RateUSDPerHour is the sum of the hourly rates of its capacity that is still billing.

string
totalUSD

TotalUSD is what has been charged for this object so far.

string
dispatches

Dispatches counts how many times a dispatcher picked the run up; more than one means it recovered.

integer format: int32
message

Message explains the phase in a sentence.

string
observedGeneration

ObservedGeneration is the spec generation this status reflects.

integer format: int64
phase

Phase is the lifecycle phase: Queued, Running, Waiting for a message or funds, then a terminal phase.

string
reason

Reason is the machine-readable reason for the phase, such as WaitingForMessage or MaxCostReached.

string
revision

Revision is the Agent revision the run pinned at admission.

integer format: int64
sandbox

Sandbox names the run’s Sandbox once it exists; it is deleted when the run ends.

string
startTime

StartTime is when the first dispatch started.

string
steps

AgentRunSteps counts journal steps.

object
total
required

Total is the number of steps recorded.

integer format: int32
turns

Turns lists the run’s turns with the Claude model that served each.

Array<object>
nullable

AgentTurn is one prompt and the model’s work on it. The model is chosen once per turn and serves all of it.

object
costUSD

CostUSD is the turn’s charge.

string
fallbackReason

FallbackReason says why the router fell back to Sonnet.

string
family

Family is the Claude family the router chose (Nodus access).

string
inputTokens
required

InputTokens is the turn’s input token usage, cache reads and writes included.

integer format: int64
model
required

Model is the Anthropic model that served every call of the turn.

string
modelCalls
required

ModelCalls is the number of model calls the turn made.

integer format: int32
outputTokens
required

OutputTokens is the turn’s output token usage.

integer format: int64
prompt
required

Prompt is “input” for the run’s input, or the key of the message that brought the prompt.

string
routedBy
required

RoutedBy is jev, fallback (with fallbackReason) or fixed (BYOK).

string
toolCalls
required

ToolCalls is the number of commands the turn ran in the Sandbox.

integer format: int32
Example generated
{
"apiVersion": "example",
"kind": "example",
"metadata": {
"annotations": {
"additionalProperty": "example"
},
"creationTimestamp": "example",
"deletionGracePeriodSeconds": 1,
"deletionTimestamp": "example",
"finalizers": [
"example"
],
"generateName": "example",
"generation": 1,
"labels": {
"additionalProperty": "example"
},
"managedFields": [
{
"apiVersion": "example",
"fieldsType": "example",
"fieldsV1": {
"additionalProperty": "example"
},
"manager": "example",
"operation": "example",
"subresource": "example",
"time": "example"
}
],
"name": "example",
"namespace": "example",
"ownerReferences": [
{
"apiVersion": "example",
"blockOwnerDeletion": true,
"controller": true,
"kind": "example",
"name": "example",
"uid": "example"
}
],
"resourceVersion": "example",
"selfLink": "example",
"uid": "example"
},
"spec": {
"agent": "example",
"deadline": "example",
"dependsOn": [
"example"
],
"group": "example",
"input": "example",
"keepAlive": true,
"state": "example",
"taskKey": "example"
},
"status": {
"answer": {
"preview": "example",
"sha256": "example",
"size": 1
},
"completionTime": "example",
"cost": {
"bySegment": {
"bootUSD": "example",
"coveredByNodus": [
"example"
],
"restoreUSD": "example",
"runningUSD": "example",
"teardownUSD": "example"
},
"final": true,
"fundedUntilTime": "example",
"heldUSD": "example",
"limitUSD": "example",
"rateUSDPerHour": "example",
"totalUSD": "example"
},
"dispatches": 1,
"message": "example",
"observedGeneration": 1,
"phase": "example",
"reason": "example",
"revision": 1,
"sandbox": "example",
"startTime": "example",
"steps": {
"total": 1
},
"turns": [
{
"costUSD": "example",
"fallbackReason": "example",
"family": "example",
"inputTokens": 1,
"model": "example",
"modelCalls": 1,
"outputTokens": 1,
"prompt": "example",
"routedBy": "example",
"toolCalls": 1
}
]
}
}

An error: a metav1.Status whose reason is a registered code.

Media type application/json

Status is the error body of every API response: a Kubernetes metav1.Status (so kubectl and client-go understand it) plus three top-level extensions that those clients ignore (ADR-028).

object
apiVersion
string
code
integer format: int32
details
object
causes
Array<object>
nullable
object
field
string
message
string
reason
string
group
string
kind
string
name
string
retryAfterSeconds
integer format: int32
uid
string
docs

Docs is the URL of the code’s docs page.

string
fix

Fix says what to do next, for example a CLI command or the field to change.

string
kind
string
message
string
metadata
object
continue
string
remainingItemCount
integer format: int64
resourceVersion
string
selfLink
string
shardInfo
object
selector
required
string
reason
string
requestId

RequestID identifies the request in logs and support tickets.

string
status
string
Example generated
{
"apiVersion": "example",
"code": 1,
"details": {
"causes": [
{
"field": "example",
"message": "example",
"reason": "example"
}
],
"group": "example",
"kind": "example",
"name": "example",
"retryAfterSeconds": 1,
"uid": "example"
},
"docs": "example",
"fix": "example",
"kind": "example",
"message": "example",
"metadata": {
"continue": "example",
"remainingItemCount": 1,
"resourceVersion": "example",
"selfLink": "example",
"shardInfo": {
"selector": "example"
}
},
"reason": "example",
"requestId": "example",
"status": "example"
}