> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-chat/introduction.md

## Article Content:

# About the Containers Chat API

The Containers Chat API manages conversations and messages for the Wix AI coding agent. Use this API to integrate the coding agent's chat experience into your app, allowing users to send requests, track the agent's progress, and read the full response.

With the Containers Chat API, you can:

- Create and manage conversations for a project.
- Send user messages to trigger the coding agent.
- Read a conversation's full message history, including in-progress assistant responses.

## The turn lifecycle

When you call [Send Message](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-chat/conversation-v1/send-message.md), two things happen immediately:

1. The user message is persisted with `DONE` status.
2. An assistant turn is opened with `WORKING` status. This turn represents the agent's in-progress response.

As the agent works, the assistant turn's `tasks` field is updated with a live checklist of work items. When the agent finishes, the turn transitions to `DONE` with the final response in its `parts` field. If the agent fails, the turn transitions to `ERROR`.

## Tracking the assistant's response

The API doesn't support real-time streaming. After calling [Send Message](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-chat/conversation-v1/send-message.md), poll [Query Messages](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-chat/conversation-v1/query-messages.md) to check the assistant turn's status. When the status changes from `WORKING` to `DONE`, the final response is available in the `parts` field.

## Before you begin

It's important to note the following points before starting to code:

- This API is in Beta.
- Conversations are scoped to a project. You need a `projectId` to create a conversation.
- [Send Message](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-chat/conversation-v1/send-message.md) requires an `idempotencyKey`. Use a unique key per user message and reuse the same key if retrying a failed request.

## Use cases

- [Send a message and track the assistant's response](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-chat/sample-flows.md)

## Terminology

- **Conversation**: A chat thread for a project. A project can have multiple conversations. Conversations hold thread metadata; messages are returned separately via [Query Messages](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-chat/conversation-v1/query-messages.md).
- **Message**: A single turn in a conversation. Messages have a `role` of `USER` or `ASSISTANT` and a `status` of `WORKING`, `DONE`, or `ERROR`.
- **Task**: A work item shown as a live checklist on an assistant turn while the agent is processing. Returned in the `tasks` field of the assistant message.

@sdk_package_setup