# AppProcess

A run of an app: its inputs, status, console output, named outputs and return value. Returned when you start an app and when you read or list its runs.

**Kind:** an object, used in responses.

## Fields

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `app` | [`VersionReference`](https://docs.maitento.com/reference/types/version-reference.md) | The app and the version of it this run executes. |
| `dateStarted` | `datetime \| null` | When the run started executing, in UTC. Null until a worker picks it up. |
| `datePaused` | `datetime \| null` | When the run was last paused, in UTC. Null if it has never paused. |
| `dateEnded` | `datetime \| null` | When the run ended (`Finished`, `Error` or `Killed`), in UTC. Null while it is still going. |
| `executionTime` | `timespan` | How long the run has spent executing, summed across every time a worker ran it. It includes the time spent waiting for the runs the app started (see `awaitTime`). |
| `awaitTime` | `timespan \| null` | How much of `executionTime` the app spent waiting for runs it started (`InteractionAwait`, `AppProcessAwait` and the other await calls) rather than working itself. The app's own time is `executionTime` minus this. Null means not recorded: treat it as zero. |
| `inputs` | [`NameValuePair`](https://docs.maitento.com/reference/types/name-value-pair.md)`[]` | The values the run was started with, one per app input. |
| `outputs` | [`AppOutput`](https://docs.maitento.com/reference/types/app-output.md)`[]` | The named outputs the app has set (`AppStateSetOutput…`), in the order each name was first set. Setting a name again replaces its value. |
| `consoleOutputs` | [`AppConsoleOutput`](https://docs.maitento.com/reference/types/app-console-output.md)`[]` | What the app has printed (`PrintLine`, `TraceLine` and the like), oldest first. |
| `failureDetails` | `string \| null` | Why the run failed, when its status is `Error` (for example an uncaught `throw`). Null otherwise. |
| `status` | [`AppProcessStatus`](https://docs.maitento.com/reference/types/app-process-status.md) | Where the run is in its life. |
| `pauseType` | [`AppProcessPauseType`](https://docs.maitento.com/reference/types/app-process-pause-type.md) | What a `Paused` run is waiting for. `None` when it is not paused. |
| `pauseAssociatedId` | `uuid \| null` | The id of the run a `Paused` run is waiting for (its kind is `pauseType`). Null when it is not paused. |
| `returnValue` | `string \| null` | What `main` returned, as text. Null until the run finishes. |
| `dateRunnerPing` | `datetime \| null` | When the worker running this run last reported that it is still alive, in UTC. Null before it starts. |
| `dateRunnerClaimed` | `datetime \| null` | When a worker last picked this run up, in UTC: the start of its current stretch of execution. While the run is `Running`, its runtime so far is `executionTime` plus the time since this. Null if it has not been picked up. |
| `waitingForLaneSinceUtc` | `datetime \| null` | When the run started waiting for a lane, in UTC; null when it isn't waiting. A waiting run is in status New, and `GET /processes/{type}/{id}/lane` says why it waits. Set by Maitento. |
| `hostname` | `string \| null` | Identifies the worker that ran this run, for diagnostics. Null until a worker picks it up. |
| `parentProcessId` | `uuid \| null` | The run that started this one, such as an app that called `AppStart`. Null for a run started directly (through the API or an automation), or when it isn't known. |
| `parentProcessType` | [`ProcessType`](https://docs.maitento.com/reference/types/process-type.md)`\| null` | What kind of run `parentProcessId` is. Null exactly when that is null. |
| `rootProcessId` | `uuid \| null` | The run at the top of this run's tree, shared by every run in it (this app, the apps it started, and their interactions and code pipelines), so you can group them with one comparison. A top-level app run is its own root, so this equals its `id`. May be null on older runs. |
| `triggeredByAutomatedActionId` | `uuid \| null` | The automation that started this run (by its schedule, a message trigger or a manual trigger). Null when the run was started any other way. |
| `triggeredByAutomatedActionName` | `string \| null` | The automation's name when it started this run (a snapshot). Null exactly when `triggeredByAutomatedActionId` is. |
| `retentionLeaseActive` | `boolean \| null` | True while a retention lease keeps this run: its own, or one inherited from a retained run that started it. A retained run is never deleted when the tenant's retention period ends. Null or false: not retained. |
| `retentionLeaseAppliedAtUtc` | `datetime \| null` | When the lease was taken, in UTC. For an inherited lease, when the ancestor's lease was taken. |
| `retentionLeaseAppliedByUserId` | `uuid \| null` | The id of the user who took the lease. |
| `retentionLeaseAppliedByUserName` | `string \| null` | The name of the user who took the lease, as it was when they took it. |
| `retentionLeaseNote` | `string \| null` | Why it is retained, as the person who retained it wrote it (optional, at most 500 characters). |
| `retentionLeaseInheritedFromProcessId` | `uuid \| null` | Null when the lease is this run's own. Otherwise the id of the ancestor run whose lease keeps this one; releasing that run's lease releases this one too. |
| `credentials` | [`InteractionProcessCredential`](https://docs.maitento.com/reference/types/interaction-process-credential.md)`[]` | The model keys sent with the start request, in the order they are tried. Every interaction the app starts uses them before your tenant's model keys. Empty when none were sent. |
| `allowMaitentoFallback` | `boolean \| null` | Whether an interaction this app starts may use Maitento's own key for a provider once no key of yours for it is left. Null means no. |
| `credentialStack` | [`CredentialStackSnapshot`](https://docs.maitento.com/reference/types/credential-stack-snapshot.md)`\| null` | The credential stack the app runs on, as it stood when it started (no secrets). Interactions and apps it starts inherit it when it was chosen explicitly. Null: the app uses the credentials it was started with. |
| `aiModelOverrides` | [`AiModelOverrideRequest`](https://docs.maitento.com/reference/types/ai-model-override-request.md)`[] \| null` | Model overrides for named agents, applied to every interaction this app starts. Null: agents use the models their definitions name. |
| `webDownloadPartitionId` | `uuid \| null` | The temporary knowledge base (partition) that pages fetched by the web tools of every interaction and code pipeline this app starts are kept in, passed on to the apps it starts. Null: each run uses its namespace's default, then the tenant's. |
| `webAccessOverrides` | [`WebAccessOverride`](https://docs.maitento.com/reference/types/web-access-override.md)`[] \| null` | Web tool overrides (on or off, for all agents or one by name) applied to every interaction this app starts. |
| `userCreatedById` | `uuid` | The id of the user who created it. A call made with an API key is recorded as the key's user. |
| `tenantId` | `uuid` | The id of the tenant it belongs to. |
| `id` | `uuid` | The unique id. Use it in `by-id` routes and wherever another object refers to this one. |
| `dateCreated` | `datetime` | When it was created, in UTC. |
| `dateUpdated` | `datetime` | When it was last changed, in UTC. |

## Example

```json
{
  "app": {
    "id": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
    "version": 0
  },
  "dateStarted": "2026-10-26T12:00:00.0000000Z",
  "datePaused": "2026-10-26T12:00:00.0000000Z",
  "dateEnded": "2026-10-26T12:00:00.0000000Z",
  "executionTime": "00:05:00",
  "awaitTime": "00:05:00",
  "inputs": [
    {
      "name": "...",
      "value": "..."
    }
  ],
  "outputs": [
    {
      "name": "...",
      "type": "String",
      "value": "...",
      "date": "2026-10-26T12:00:00.0000000Z"
    }
  ],
  "consoleOutputs": [
    {
      "text": "...",
      "type": "Normal",
      "date": "2026-10-26T12:00:00.0000000Z"
    }
  ],
  "failureDetails": "...",
  "status": "New",
  "pauseType": "None",
  "pauseAssociatedId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "returnValue": "...",
  "dateRunnerPing": "2026-10-26T12:00:00.0000000Z",
  "dateRunnerClaimed": "2026-10-26T12:00:00.0000000Z",
  "waitingForLaneSinceUtc": "2026-10-26T12:00:00.0000000Z",
  "hostname": "...",
  "parentProcessId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "parentProcessType": "App",
  "rootProcessId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "triggeredByAutomatedActionId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "triggeredByAutomatedActionName": "...",
  "retentionLeaseActive": false,
  "retentionLeaseAppliedAtUtc": "2026-10-26T12:00:00.0000000Z",
  "retentionLeaseAppliedByUserId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "retentionLeaseAppliedByUserName": "...",
  "retentionLeaseNote": "...",
  "retentionLeaseInheritedFromProcessId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "credentials": [
    {
      "provider": "...",
      "baseUrl": "...",
      "modelNameOverrides": {
        "key": "..."
      },
      "credentialId": "...",
      "isOwnLicense": false,
      "priority": 0
    }
  ],
  "allowMaitentoFallback": false,
  "credentialStack": {
    "stackId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
    "stackName": "...",
    "stackVersion": 0,
    "source": "Start",
    "resolvedAtUtc": "2026-10-26T12:00:00.0000000Z",
    "entries": [
      {}
    ],
    "passesToChildren": false
  },
  "aiModelOverrides": [
    {
      "agentName": "...",
      "modelName": "...",
      "customModel": {},
      "purpose": "Agent"
    }
  ],
  "webDownloadPartitionId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "webAccessOverrides": [
    {
      "agentName": "...",
      "search": false,
      "fetch": false
    }
  ],
  "userCreatedById": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "tenantId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "id": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "dateCreated": "2026-10-26T12:00:00.0000000Z",
  "dateUpdated": "2026-10-26T12:00:00.0000000Z"
}
```

## Where it's used

- [`appRuns.get`](https://docs.maitento.com/reference/api/app-runs.md) (`GET /apps/processes/by-id/{id}`)
- [`appRuns.updateInputs`](https://docs.maitento.com/reference/api/app-runs.md) (`PUT /apps/processes/by-id/{id}/inputs`)
- [`apps.start`](https://docs.maitento.com/reference/api/apps.md) (`PUT /apps/by-id/{id}/versions/{versionNumber}/start`)
- [`apps.start`](https://docs.maitento.com/reference/api/apps.md) (`PUT /namespaces/{namespaceName}/apps/by-name/{name}/versions/latest/start`)
