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

# ephemeral • AI Agent SDK

> ephemeral: Context manager for ephemeral conversations.

# ephemeral

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**Agent**](../classes/Agent) class in the [**agent**](../modules/agent) module.

Context manager for ephemeral conversations.

Messages within this block are NOT permanently stored in chat\_history.
History is restored to pre-block state after exiting.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def ephemeral() -> Any
```

### Returns

<ResponseField name="Returns" type="Any">
  The result of the operation.
</ResponseField>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
with agent.ephemeral():
        response = agent.chat("[IMAGE] Analyze this")
        # After block, history is restored - image NOT persisted
```

## Source

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