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

# Session Deduplication Cache • AI Agent SDK

> SessionDeduplicationCache: Thread-safe session-level content deduplication cache.

# SessionDeduplicationCache

> Defined in the [**manager**](../modules/manager) module.

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

Thread-safe session-level content deduplication cache.

Tracks content hashes across all agents in a workflow session
to prevent duplicate content from being sent to LLM.

## Constructor

<ParamField query="max_size" type="int" required={false} default="1000">
  No description available.
</ParamField>

## Methods

<CardGroup cols={2}>
  <Card title="check_and_add()" icon="function" href="../functions/SessionDeduplicationCache-check_and_add">
    Check if content hash exists and add if new.
  </Card>

  <Card title="get_stats()" icon="function" href="../functions/SessionDeduplicationCache-get_stats">
    Get deduplication statistics.
  </Card>

  <Card title="clear()" icon="function" href="../functions/SessionDeduplicationCache-clear">
    Clear the cache.
  </Card>
</CardGroup>

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Session Management" icon="clock" href="/docs/concepts/session-management" />

  <Card title="Sessions Feature" icon="folder" href="/docs/features/sessions" />

  <Card title="Session Persistence" icon="database" href="/docs/features/session-persistence" />

  <Card title="Caching Concept" icon="database" href="/docs/concepts/caching" />
</CardGroup>
