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

# Pre Compaction Memory Flush Config • AI Agent SDK

> PreCompactionMemoryFlushConfig: Bounded policy for extracting durable memories before compaction.

# PreCompactionMemoryFlushConfig

> Defined in the [**Feature Configs**](../modules/feature_configs) module.

<Badge color="blue">AI Agent</Badge>

Bounded policy for extracting durable memories before compaction.

The feature is enabled only when this config (or `True`) is assigned to
`ExecutionConfig.pre_compaction_memory_flush`. The nested config defaults
to enabled so `PreCompactionMemoryFlushConfig(...)` is ergonomic while
the containing execution feature remains default-off.

## Properties

<ResponseField name="enabled" type="bool">
  No description available.
</ResponseField>

<ResponseField name="timeout_seconds" type="float">
  No description available.
</ResponseField>

<ResponseField name="min_turns_to_flush" type="int">
  No description available.
</ResponseField>

<ResponseField name="max_flush_tokens" type="int">
  No description available.
</ResponseField>

<ResponseField name="llm" type="Optional[str]">
  No description available.
</ResponseField>

<Accordion title="Internal & Generic Methods">
  * **to\_dict**: Generic utility method.
</Accordion>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/config/feature_configs.py#L749">
  `praisonaiagents/config/feature_configs.py` at line 749
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Memory Concept" icon="brain" href="/docs/docs/concepts/memory" />

  <Card title="Memory Overview" icon="database" href="/docs/docs/memory/overview" />

  <Card title="Memory Configuration" icon="gear" href="/docs/docs/configuration/memory-config" />

  <Card title="Session Resume" icon="rotate-right" href="/docs/docs/memory/session-resume" />

  <Card title="Configuration Overview" icon="gear" href="/docs/docs/configuration/index" />
</CardGroup>
