> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# log

> Read back the full conversation and its timeline of structured events.

[ref-aichatclient]: /docs/server-sdks/reference/python/agents/ai-chat-client

[visiblemessages]: /docs/server-sdks/reference/python/agents/chat-gateway/visible-messages

Read the conversation back. This changes nothing about the conversation.

## **Parameters**

**`conversation_id`** `str` — required

The conversation to read.

---

## **Returns**

`ChatLog` — carries `messages` and `call_timeline`.

Messages contain the fields returned by the service. Code that displays a transcript should not
assume every entry has a timestamp. `call_timeline` contains any structured timeline entries returned
for the conversation.

`messages` can include your prompt and other non-dialogue entries. Filter to `user` and
`assistant` before displaying a transcript.
[`ChatGateway.visible_messages()`][visiblemessages] does this filtering for you.

## **Example**

```python {10,12}
import asyncio

from signalwire.ai_chat import AIChatClient

VISIBLE = {"user", "assistant"}


async def main():
    async with AIChatClient(space="your-space") as client:
        conversation = await client.log("chat-8f21")

        for message in conversation.messages:
            if message["role"] in VISIBLE:
                print(message["role"], message["content"])


asyncio.run(main())
```