# Manage session lifecycles programmatically with new AgentOS endpoints

> We’ve added API endpoints to create empty sessions, fetch a run by ID, and update sessions. This gives teams precise control over session state, enabling cleaner orchestration, simpler retries, and…

- Published: 2025-10-23
- Author: Agno Team
- Category: Changelog
- Canonical: https://agno-com-nine.vercel.app/articles/manage-session-lifecycles-programmatically-with-new-agentos-endpoints
- Markdown: https://agno-com-nine.vercel.app/articles/manage-session-lifecycles-programmatically-with-new-agentos-endpoints.md

We’ve added API endpoints to create empty sessions, fetch a run by ID, and update sessions. This gives teams precise control over session state, enabling cleaner orchestration, simpler retries, and better auditability across multi-turn interactions.

**Details**

- Create sessions before input arrives to pre-allocate context and IDs
- Retrieve a specific run by ID for diagnostics or replay
- Update sessions to reflect state transitions without side effects

**Who this is for:** Platform teams building orchestration layers, session managers, or observability pipelines that need reliable session lifecycle control.
