---
title: "Reset To Template"
method: POST
path: "/api/ai-agents/{agent_id}/reset"
tags: ["ai-agents", "ai-agents"]
---

# Reset To Template

`POST /api/ai-agents/{agent_id}/reset`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/ai-agents/{agent_id}/reset`
- Auth: none declared

Drop a workspace fork; the parent template re-surfaces in the list.

Mirrors POST /api/prompts/{prompt_id}/reset (apps/api-gateway/src/api/
prompts.py:1018). Cascades clean up triggers, knowledge, escalations,
tasks via existing composite FKs. Also deletes the forked prompts row
(identified by based_on_system_id pointing at the template's prompt).

400 if target has no based_on_template_id (it isn't a fork).

Spec: §6

## Path parameters

- `agent_id` integer, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/77bef09a9209?raw)
