---
title: "Fork Agent Session"
method: POST
path: "/agents/{agent_id}/sessions/{session_id}/fork"
tags: ["Agents"]
---

# Fork Agent Session

`POST /agents/{agent_id}/sessions/{session_id}/fork`

Deep-copy a session into a new independent session. Every run is copied with a fresh ``run_id``; the new session has a fresh ``session_id``. The original is untouched. Use to explore alternative conversation paths without mutating the source.

Distinct from ``/continue?fork=true``: that creates a sibling **run** inside the **same** session. This creates a sibling **session**.

## Path parameters

- `agent_id` string, required
- `session_id` string, required

## Query parameters

- `user_id` string, nullable

## Response `200`

Session forked successfully

- unknown

## Other responses

- `400` — Source session is empty or missing
- `401` — Unauthorized
- `404` — Agent not found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.dev/agno/apis/agno-api-reference.md) · [All operations](https://skmtc.dev/agno/apis/agno-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agno/agno-api-reference/revisions/5f6149d395d0/schema)
