***

title: cleanup
slug: /reference/typescript/agents/skill-base/cleanup
description: Release resources when the skill is removed or the agent shuts down.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Called when the skill is removed or the agent shuts down. Override to release
resources, close connections, cancel background tasks, etc.

Takes no parameters.

## **Returns**

`Promise<void>`

## **Example**

```typescript {2}
class MySkill extends SkillBase {
  async cleanup(): Promise<void> {
    // Release resources, close connections
    console.log('Skill cleaned up');
  }
}
```