# Review conversations

Read what people and an agent said in its [conversations](/docs/concepts/conversations.md), with what each one cost.

## Before you start

You need a conversation with an agent. See [Chat with an agent](/docs/agents/chat.md).

## See one agent's conversations

**Studio**

1. In your project, open **Orchestration** > **Conversations**.
2. Open **Agent**.
3. Pick your agent. The list keeps only its conversations.
4. Click **Open** on a conversation. You should now see its **Usage**: **Model credits**, **Input tokens** and **Output tokens**.

**API**

1. Set `PROJECT` to your project's ID ([Find your IDs](/docs/authentication/api-keys.md#find-your-ids)): `export PROJECT=<id>`.
2. Set `AGENT_ID` to your agent's ID: `export AGENT_ID=<id>`.
3. List the agent's conversations with your [API key](/docs/authentication/api-keys.md). You should now see only that agent's conversations:

```bash
curl "https://api.veryfront.com/conversations?project_reference=$PROJECT&agent_id=$AGENT_ID" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY"
```

## Read a conversation

**Studio**

1. In the conversation you opened, scroll to **Messages**. You should now see your question and the agent's reply, each with its **Sender**, both **Completed**.
2. To keep the messages, open the **⋯** menu above the table. You should now see **Export JSON** and **Export CSV**, which download the messages the filters keep.

**API**

1. Set `CONVERSATION_ID` to the `id` of one conversation from the list above: `export CONVERSATION_ID=<id>`.
2. List its messages. You should now see your question and the agent's reply, `role` `user` and `assistant`, both `status` `completed`:

```bash
curl https://api.veryfront.com/conversations/$CONVERSATION_ID/messages \
  -H "Authorization: Bearer $VERYFRONT_API_KEY"
```

### Try it in a sandbox

```playground
step: Set PROJECT | export PROJECT=$VERYFRONT_PROJECT_ID
step: Add the support agent | curl -fsS -X POST https://api.veryfront.com/projects/$PROJECT/agents -H "Authorization: Bearer $VERYFRONT_API_KEY" -H "Content-Type: application/json" -d '{ "id": "support", "name": "Support assistant", "system_prompt": "Answer customer questions about orders and refunds. Refunds take 5 business days. Keep replies to two sentences." }'
step: Ask it a question | export CONVERSATION=$(curl -fsS -X POST https://api.veryfront.com/conversations -H "Authorization: Bearer $VERYFRONT_API_KEY" -H "Content-Type: application/json" -d '{ "project_reference": "'$PROJECT'", "type": "chat", "title": "Refund question", "initial_message": { "role": "user", "parts": [{ "type": "text", "text": "How long does a refund take?" }] } }') && export CONVERSATION_ID=$(printf '%s' "$CONVERSATION" | jq -r .id) MESSAGE_ID=$(printf '%s' "$CONVERSATION" | jq -r .initial_message_id)
step: Let the agent answer | curl -fsS -X POST https://api.veryfront.com/runs -H "Authorization: Bearer $VERYFRONT_API_KEY" -H "Content-Type: application/json" -d '{ "project_id": "'$PROJECT'", "conversation_id": "'$CONVERSATION_ID'", "target": { "type": "agent", "id": "support" }, "input": { "agent_id": "support", "messages": [{ "id": "'$MESSAGE_ID'", "role": "user", "parts": [{ "type": "text", "text": "How long does a refund take?" }] }], "tools": [], "context": [] }, "config": { "agent_admission": { "mode": "project", "input_message_id": "'$MESSAGE_ID'" } }, "execution": { "runtime": { "type": "main_branch" } } }'
step: Wait for the answer | for i in $(seq 60); do curl -s https://api.veryfront.com/projects/$PROJECT/runs -H "Authorization: Bearer $VERYFRONT_API_KEY" | grep -q '"status":"completed"' && break; sleep 3; done
step: Set AGENT_ID | export AGENT_ID=support
step: List the agent's conversations | curl "https://api.veryfront.com/conversations?project_reference=$PROJECT&agent_id=$AGENT_ID" -H "Authorization: Bearer $VERYFRONT_API_KEY"
step: Set CONVERSATION_ID | export CONVERSATION_ID=$(curl -s "https://api.veryfront.com/conversations?project_reference=$PROJECT&agent_id=$AGENT_ID" -H "Authorization: Bearer $VERYFRONT_API_KEY" | jq -r '.data[0].id')
check: curl https://api.veryfront.com/conversations/$CONVERSATION_ID/messages -H "Authorization: Bearer $VERYFRONT_API_KEY"
expect: "role":"assistant"
```

## With MCP

1. Call `veryfront__list_conversations` with `"project_reference": "my-project"`, your project's slug or ID, and `"agent_id"`, your agent's ID, such as `"support"`.
2. Call `veryfront__list_conversation_messages` with the `conversation_id` of one conversation from the list. It worked when you see your question and the agent's reply, with `role` `user` and `assistant`, both `status` `completed`.

## Next steps

* [Debug a run](/docs/observability/debug.md)
* [Learn about conversations](/docs/concepts/conversations.md)
