> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Clear Branch • AI Agent SDK

> clear_branch: Clear the current branch context.

# clear\_branch

Method

> This is a method of the [**ContextTraceEmitter**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/ContextTraceEmitter.md) class in the [**context\_events**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/context_events.md) module.

Clear the current branch context.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def clear_branch() -> None
```

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/trace/context_events.py#L707)
>
> `praisonaiagents/trace/context_events.py` at line 707


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.