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

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**policy**](../modules/policy) module.

Get the default context compaction policy.

## Signature

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

### Returns

<ResponseField name="Returns" type="ContextCompactionPolicyProtocol">
  The result of the operation.
</ResponseField>

## Uses

* `get_default_policy_impl`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/context/policy.py#L36">
  `praisonaiagents/context/policy.py` at line 36
</Card>
