process • AI Agent SDK
process: Process messages through the context pipeline.
process
Method
</div>
This is a method of the ContextManager class in the manager module.
Process messages through the context pipeline.
Applies budgeting, optimization, and monitoring.
Signature
def process(messages: List[Dict[str, Any]], system_prompt: str, tools: Optional[List[Dict[str, Any]]], trigger: Literal['turn', 'tool_call', 'manual', 'overflow']) -> Dict[str, Any]Parameters
ParamField
ListConversation messages
ParamField
strSystem prompt content
ParamField
OptionalTool schemas
ParamField
LiteralWhat triggered this processing
Returns
ResponseField
Dict[str, Any]Dict with processed messages and metadata
Uses
resettrack_system_prompttrack_toolstrack_historyget_utilizationget_totalget_warningsestimate_messages_tokens
Source
View on GitHubpraisonaiagents/context/manager.py at line 324