> ## 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.

# Get Default Policy • AI Agent SDK

> get_default_policy: Get the default context compaction policy.

# get\_default\_policy

Function

> This function is defined in the [**policy**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/policy.md) module.

Get the default context compaction policy.

## Signature

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

### Returns

**Returns** `ContextCompactionPolicyProtocol`

The result of the operation.

## Uses

* `get_default_policy_impl`

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/context/policy.py#L36)
>
> `praisonaiagents/context/policy.py` at line 36


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