Skip to main content
DELETE
Delete Session
Delete a conversation session and all associated data including messages, archives, and usage records.
This operation is irreversible. All session data including message history and archives will be permanently deleted.

Request

Path Parameters

string
required
The session ID to delete

Headers

string
required
Your OpenViking API key for authentication

Response

string
Response status (ok or error)
object
Deletion result
string
The deleted session identifier
number
Request processing time in seconds

Examples

Response Example

What Gets Deleted

Deleting a session removes:
  1. Active messages - Current conversation messages
  2. Message archives - All history/archive_N/ directories
  3. Tool records - Tool execution data in tools/
  4. Session metadata - .abstract.md, .overview.md, .meta.json
  5. Relations - Links to contexts and skills used
Deleting a session does NOT delete:
  • Extracted memories (stored in user/memories/ and agent/memories/)
  • Resources referenced during the session
  • Skills used in the session

Use Cases

Clean Up Old Sessions

Delete After Commit

If you want to keep only memories and discard conversation history:

Batch Delete

Safe Delete with Confirmation

Error Responses

Session Not Found

Insufficient Permissions

Best Practices

Always Commit Before Deleting

Extract memories before deletion:

Check Session Content First

Implement Soft Delete

Instead of immediate deletion, mark sessions as deleted: