> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fiddler.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# get_conversation_id

> Get the conversation ID for the current agent invocation.

Retrieves the conversation ID that was previously set using set\_conversation\_id().
Works in both synchronous and asynchronous contexts automatically.

## Parameters

**agent** `Agent` *required*

The Strands Agent instance to retrieve the conversation ID from

## Returns

The conversation ID string, or empty string if none has been set

## Example

```python theme={null}
from strands import Agent
from strands.models.openai import OpenAIModel
from fiddler_strandsagents import get_conversation_id, set_conversation_id

model = OpenAIModel(api_key="...", model_id="gpt-4o")
agent = Agent(model=model)
set_conversation_id(agent, "session_12345")
conversation_id = get_conversation_id(agent)
print(conversation_id)  # "session_12345"
```
