---
title: "Agent Session"
description: "An agent session is a durable instance of an AI agent that keeps the context needed to work across multiple user inputs and turns. Depending on the runtime, it can hold an agent configuration, conversation items, tool results, pending actions, and references to saved artifacts. The application retains a session identifier so a later message continues the same work."
canonical_url: "https://promptmetheus.com/resources/llm-knowledge-base/agent-session"
---

> Index of every page on this site: [llms.txt](https://promptmetheus.com/llms.txt)

An agent session is a durable instance of an [AI agent](https://promptmetheus.com/resources/llm-knowledge-base/ai-agent) that keeps the context needed to work across multiple user inputs and turns. Depending on the runtime, it can hold an agent configuration, conversation items, tool results, pending actions, and references to saved artifacts. The application retains a session identifier so a later message continues the same work.

The distinction between a session and a turn matters operationally. A turn is one cycle of work triggered by input. A session can contain many turns: a user may start an analysis, inspect the result, then steer the agent to revise it without creating a new session. A [resumable agent run](https://promptmetheus.com/resources/llm-knowledge-base/resumable-agent-run) concerns recovery of an interrupted execution; session persistence also supports ordinary follow-up work after a turn has completed.

The session is also separate from the [agent sandbox](https://promptmetheus.com/resources/llm-knowledge-base/agent-sandbox) or other compute environment. An environment may be stopped or replaced while the conversation survives. If files or processes must survive that replacement, the application needs persistent storage or snapshots rather than assuming the session ID preserves the machine's filesystem. [Agent memory](https://promptmetheus.com/resources/llm-knowledge-base/agent-memory) is broader still: it stores selected knowledge for future retrieval, potentially across sessions.

Production applications should record the session ID, observe turn outcomes, and reconcile missed stream events from saved session state. A completed turn does not guarantee that every tool succeeded; the final output and any changed external state still need inspection. Session retention, access control, and deletion also matter because the stored history may contain sensitive input and tool output.

The [OpenAI Agents API session guide](https://developers.openai.com/api/docs/guides/agents-api/sessions) illustrates these boundaries, including turns, follow-up input, saved items, and event recovery.

## Sitemap

See the full [sitemap](https://promptmetheus.com/sitemap.md) for all pages.
