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

# Optimization Event • AI Agent SDK

> OptimizationEvent: Record of an optimization event.

# OptimizationEvent

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

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

Record of an optimization event.

## Properties

<ResponseField name="timestamp" type="str">
  No description available.
</ResponseField>

<ResponseField name="event_type" type="OptimizationEventType">
  No description available.
</ResponseField>

<ResponseField name="strategy" type="Optional">
  No description available.
</ResponseField>

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

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

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

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

<ResponseField name="details" type="Dict">
  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/context/manager.py#L218">
  `praisonaiagents/context/manager.py` at line 218
</Card>
