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

# manager • AI Agent SDK

> Context Manager Facade for PraisonAI Agents.

# manager

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

Context Manager Facade for PraisonAI Agents.

Provides a unified interface for context management:

* Budgeting and allocation
* Token estimation with validation
* Composition within limits
* Optimization with benefit checking
* Monitoring with snapshot hooks
* Multi-agent orchestration support
* Optimization history tracking

This is the main entry point for context management in both SDK and CLI.

## Import

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents.context import manager
```

## Classes

<CardGroup cols={2}>
  <Card title="SessionDeduplicationCache" icon="brackets-curly" href="../classes/SessionDeduplicationCache">
    Thread-safe session-level content deduplication cache.
  </Card>

  <Card title="EstimationMode" icon="brackets-curly" href="../classes/EstimationMode">
    Token estimation modes.
  </Card>

  <Card title="ContextShareMode" icon="brackets-curly" href="../classes/ContextShareMode">
    How context is shared between agents.
  </Card>

  <Card title="ToolShareMode" icon="brackets-curly" href="../classes/ToolShareMode">
    How tools are shared between agents.
  </Card>

  <Card title="OptimizationEventType" icon="brackets-curly" href="../classes/OptimizationEventType">
    Types of optimization events.
  </Card>

  <Card title="ContextPolicy" icon="brackets-curly" href="../classes/ContextPolicy">
    Policy for context sharing during agent handoffs.
  </Card>

  <Card title="OptimizationEvent" icon="brackets-curly" href="../classes/OptimizationEvent">
    Record of an optimization event.
  </Card>

  <Card title="EstimationMetrics" icon="brackets-curly" href="../classes/EstimationMetrics">
    Metrics for token estimation accuracy.
  </Card>

  <Card title="PerToolBudget" icon="brackets-curly" href="../classes/PerToolBudget">
    Per-tool token budget configuration.
  </Card>

  <Card title="SnapshotHookData" icon="brackets-curly" href="../classes/SnapshotHookData">
    Data captured at LLM call boundary for exact snapshot.
  </Card>

  <Card title="ContextManager" icon="brackets-curly" href="../classes/ContextManager">
    Unified facade for context management.
  </Card>

  <Card title="MultiAgentContextManager" icon="brackets-curly" href="../classes/MultiAgentContextManager">
    Context manager for multi-agent orchestration.
  </Card>
</CardGroup>

## Functions

<CardGroup cols={1}>
  <Card title="create_context_manager()" icon="function" href="../functions/create_context_manager">
    Create a context manager with proper config precedence.
  </Card>
</CardGroup>
