praisonaiagents.context.manager
Core SDK 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
Overview
This module provides components for manager.Classes
SessionDeduplicationCache
Thread-safe session-level content deduplication cache.
EstimationMode
Token estimation modes.
ContextShareMode
How context is shared between agents.
ToolShareMode
How tools are shared between agents.
OptimizationEventType
Types of optimization events.
ContextPolicy
Policy for context sharing during agent handoffs.
OptimizationEvent
Record of an optimization event.
EstimationMetrics
Metrics for token estimation accuracy.
PerToolBudget
Per-tool token budget configuration.
SnapshotHookData
Data captured at LLM call boundary for exact snapshot.
ManagerConfig
Complete configuration for ContextManager.
ContextManager
Unified facade for context management.
MultiAgentContextManager
Context manager for multi-agent orchestration.

