---
title: Sessions and runs
summary: A session is an append-only event log you can follow live from any device. The run map shows who is doing what.
section: concepts
order: 4
---
## Sessions

A **session** is one conversation or job with an agent. You start it on an agent label (or a pinned version), optionally with a first message and template variables, and the API answers as soon as the session and its first run are stored. The run continues whether or not anyone is watching.

A session has a status: `running`, `idle`, `waiting_human`, `paused_budget` or `ended`. Sending another message to an idle session starts a new run.

## Runs

Work inside a session happens in **runs**. A simple agent has one run. A workflow, or an agent that calls subagents, has a tree of runs, each with its own agent, version, state and cost. A run is `queued`, `working`, `input_required`, `auth_required`, `paused_budget`, `completed`, `failed`, `cancelled` or `rejected`.

A run that is waiting on a person, a login or a budget does not hold a runner, so waiting is free and can last for a long time (an approval step times out after the period its definition sets).

## The event log

Everything a session does is appended to its **event log**: messages, model calls with their usage, the summaries an agent wrote of its earlier turns when a long conversation passed its context ceiling (`context.summarized`, see [Agents](/docs/concepts/agents.md#long-conversations)), tool requests with the policy decision, tool results, judge verdicts, loop iterations, artifacts written, human requests and answers, budget warnings, errors. Events are numbered with a gapless `seq`, and the database refuses to update or delete them, except that the retention job removes the content of events in sessions older than the project's [retention period](/docs/concepts/data-retention.md) (the events stay, marked `redacted`), and a member can delete a whole session. The log is both the audit trail and the source the UI is drawn from.

## Follow it live, from anywhere

`GET /v1/projects/{project}/sessions/{session}/events` streams the log as Server-Sent Events. If your connection drops, reconnect with `Last-Event-ID` and you receive exactly the events after that number and then the live stream, with no gaps and no repeats. The app and the SDK do this automatically. Text as the model types it arrives as live-only `delta.text` events that never move the resume point.

Runs survive disconnects. They also survive the loss of the process that was running them: another runner claims the run when its lease expires and continues from the last completed step. A completed model or tool call is not repeated, and a tool call that was in flight is retried only if it is safe to; otherwise the run records `tool.outcome_unknown` and asks you.

## The run map

The app draws a session as a **run map**: a card per agent, tool or decision, connected the way the work flowed. Parallel branches sit side by side, a judge shows its verdict, a loop shows the iteration, and a step that needs you is marked as your decision. You can answer it where it appears. The same data feeds the timeline of the selected run, with the streaming text, each tool call and the policy that applied to it. When a long conversation passed the agent's context ceiling and older turns were replaced by a summary, the timeline and the map show one quiet item, "Earlier turns summarised (4 turns, 1,234 → 321 tokens)", and its details show the summary.

## Answering a human step

A run can stop and ask a person: to **approve** a tool call, to pick from a **decision card**, or to answer a **question**. You answer with `POST .../sessions/{session}/human/{request_id}` from any device (the app and `argus sessions answer` both do), and the run resumes. See [Tools and approvals](/docs/concepts/tools-and-approvals.md).

## Cancelling

`POST .../sessions/{session}/cancel` cancels the active run and anything queued. The session stays readable.

## Client-side tools

A tool source of kind `client` lets your app answer tool calls itself (open a page, read local state). The run waits for `POST .../tool-results`. Calls made while your app was away are answered when it returns, never twice. The [SDK](/docs/command-line-and-sdk.md) wraps this.

## Images

A message can carry pictures when the agent allows it: the agent's definition says `inputs: { images: true }`, and every model it can call must be able to read images. Argus refuses to save a definition that turns images on with a model it knows reads text only, and the [Studio](/docs/studio.md#try) warns while you edit.

Pictures are uploaded to the session first, then named in the message:

1. Create the session without a first message (a session that starts with images is refused).
2. `POST .../sessions/{session}/images` with `{ "data": "<base64>", "media_type": "image/png" }`. The answer names the stored image, such as `image-3f9c01a2b4d7`.
3. `POST .../sessions/{session}/messages` with parts `[{ "type": "text", "text": "What is this build?" }, { "type": "image", "artifact": "image-3f9c01a2b4d7" }]`.

With the [SDK](/docs/command-line-and-sdk.md): `const up = await session.uploadImage(file); await session.send([{ type: "text", text: "What is this?" }, imagePart(up)]);`.

Argus reads the bytes, not the file name or the declared type: PNG, JPEG, WebP and GIF are accepted and anything else is a `422`. The defaults are 5 MB for one image and 4 images in one message (the deployment can change both). A message part names the image and never carries its bytes, so the event log stays small and a replay sees the same message. An image is stored as a session artifact, so it counts toward the project's [artifact storage limit](/docs/concepts/budgets-and-limits.md), appears in the session's artifact list, can be deleted with the artifact, and is removed with the rest of the session's content when [retention](/docs/concepts/data-retention.md) expires it; the message then reads as having had an image that is no longer stored. When the agent runs, Argus sends each image to the model inside the request, so the model provider never needs to reach Argus. Images are not accepted by a workflow, and an image cannot be given by URL.

## Artifacts

A run can write **artifacts**: named, versioned outputs such as a draft. You can read the latest version or a named one, and compare two versions; text artifacts get a line diff. An artifact can be deleted (every version of it) by a member, which also frees the project's artifact space; retention empties the artifacts of expired sessions.
