> For the complete documentation index, see [llms.txt](https://docs.zaia.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zaia.app/inbox/chat-history.md).

# Chat History

All messages generated by AI Agents are logged and available for review under **Chat History**.\
This feature provides complete visibility into user conversations, execution traces, and decision-making logic used by the Agent.\
It is designed for **debugging**, **training optimization**, and **behavior auditing**.

Each conversation entry displays:

* User and Agent messages
* Message timestamps
* Channel source (e.g., WhatsApp, Widget, API)
* Credit usage (if applicable)
* Chat tags

### External user details panel

When a conversation has a linked external user, the right-side details panel makes that user the primary reference for the interaction.

Zaia shows:

* The external user's name
* The phone number
* The finish date, when the conversation is already finished
* The channel name with the channel-type icon

Zaia does not show a separate channel type field.

From this panel, you can:

* Open **User Data** to view or edit the existing external user record
* Block the external user
* Unblock the external user

Block and unblock stay available whenever an external user is loaded.

This applies to active conversations and historical conversations.

The panel stays closed by default.

You can open it on hover or pin it open.

On smaller screens, the panel has its own scroll area so action buttons stay accessible.

Copy actions and assignee editing stay aligned with the related text for a consistent layout.

### **Delivery status and resend**

For outbound messages sent to external channels, you can inspect delivery status in detail and retry failed deliveries when resend is supported.

Use [Resending Failed Deliveries](/inbox/chat-history/resending-failed-deliveries.md) for the full resend flow, supported providers, payload rules, and restrictions.

### **Chat Tags**

Chats can include tags applied directly at the conversation level.

These tags:

* Appear in the list and detail views
* Can be used as filters in **Chat History**
* Update in real time when changed by the [Chat Tagging Tool](/tools/available-tools/chat-tagging-tool.md)

### **Message Inspection**

Selecting any Agent message opens the **Inspection Panel**, a technical trace viewer that exposes the full reasoning path of the AI model.\
This panel displays:

| Parameter              | Description                                                                        |
| ---------------------- | ---------------------------------------------------------------------------------- |
| **Model Used**         | The LLM responsible for generating the response (e.g., Claude Sonnet 4.5, GPT-4o). |
| **Execution Time**     | Duration in seconds for message completion.                                        |
| **Reasoning Steps**    | Internal thinking layers, including Planning, Task Selection, and Tool Calls.      |
| **Inputs and Outputs** | Structured JSON view of the input data, LLM prompts, and resulting output.         |
| **Credits Used**       | Platform credit consumption for the operation.                                     |

The Inspection view helps technical teams trace *why* the Agent responded a certain way — mapping each reasoning phase from **prompt parsing → tool usage → final output**.

> **Note:** This feature is critical for understanding hallucinations, context loss, or suboptimal responses and allows for precise prompt refinement.

***

### **Agent Optimization**

By studying conversation logs and inspections, developers and operations teams can identify:

* Frequent escalation patterns (topics leading to human handoffs).
* Long reasoning loops or high credit usage per task.
* Prompt sections that cause redundant or low-quality outputs.

Data from Chat History can be used to:

* Rewrite system prompts.
* Adjust model temperature and effort parameters.
* Improve Task logic and condition definitions.
* Train Agents on realistic interaction data.
