---
title: "Genai Conversation Chat"
method: POST
path: "/agents/conversations/chat"
tags: ["Agents"]
---

# Genai Conversation Chat

`POST /agents/conversations/chat`

## Request

- Base URL: `https://trace.wandb.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://trace.wandb.ai/agents/conversations/chat`
- Auth: none declared

## Request body

- AgentConversationChatReq: Request to get the multi-turn chat view for a conversation.
  - `project_id` string, required
  - `conversation_id` string, required
  - `limit` integer: Maximum number of conversation turns to return.
  - `offset` integer: Number of most-recent turns to skip. Results are returned in chronological order within the selected page.
  - `include_feedback` boolean
  - `include_model_tool_calls` boolean: Include tool calls requested in model outputs, even when no execution span was recorded, and place each execution span after the model span that requested it. Requests without execution evidence have no status, duration, or result. Defaults to false.

## Response `200`

Successful Response

- AgentConversationChatRes: Multi-turn chat view: an ordered list of per-turn chat responses. Each entry in `turns` corresponds to one trace_id, which Weave treats as one conversation turn. This is not necessarily one `invoke_agent` span: a turn can contain zero, one, or many agent invocations. The frontend can render turn-number dividers between entries and still reuse `AgentTraceChatRes` rendering for each individual turn.
  - `conversation_id` string, required
  - `turns` AgentTraceChatRes[], required
    - `trace_id` string, required
    - `root_span_name` string, nullable, required
    - `agent_name` string, nullable, required
    - `agent_version` string, nullable, required
    - `status_code` 'UNSET' | 'OK' | 'ERROR', nullable, required
    - `provider` string, nullable, required
    - `started_at` string, date-time, nullable, required
    - `ended_at` string, date-time, nullable, required
    - `wb_user_id` string, nullable, required
    - `total_duration_ms` integer, nullable, required: Wall-clock duration of the trace root span in milliseconds. This is not a sum of child span durations.
    - `total_cost_usd` number, nullable, required
    - `total_input_tokens` integer, required
    - `total_output_tokens` integer, required
    - `total_reasoning_tokens` integer, required
    - `total_cache_creation_input_tokens` integer, required
    - `total_cache_read_input_tokens` integer, required
    - `messages` AgentChatMessage[], required
      - `type` 'user_message' | 'assistant_message' | 'tool_call' | 'agent_handoff' | 'agent_start' | 'context_compacted', required
      - `span_id` string, nullable, required
      - `agent_name` string, nullable, required
      - `agent_version` string, nullable, required
      - `status_code` 'UNSET' | 'OK' | 'ERROR', nullable, required
      - `error_type` string, nullable, required
      - `status_message` string, nullable, required
      - `started_at` string, date-time, nullable, required
      - `user_message` AgentChatUserMessage, required: Payload for a user prompt in the chat timeline.
        - `text` string, required
        - `content_refs` string[], required
      - `assistant_message` AgentChatAssistantMessage, required: Payload for assistant text emitted by an agent or LLM span.
        - `text` string, required
        - `model` string, nullable, required
        - `reasoning_content` string, nullable, required
        - `reasoning_tokens` integer, nullable, required
        - `input_tokens` integer, nullable, required
        - `output_tokens` integer, nullable, required
        - `input_cost_usd` number, nullable, required
        - `output_cost_usd` number, nullable, required
        - `total_cost_usd` number, nullable, required
        - `duration_ms` integer, nullable, required
        - `status` 'UNSET' | 'OK' | 'ERROR', nullable, required
        - `content_refs` string[], required
      - `tool_call` AgentChatToolCall, required: Payload for a tool call timeline event.
        - `tool_name` string, nullable, required
        - `tool_arguments` string, nullable, required
        - `tool_result` string, nullable, required
        - `duration_ms` integer, nullable, required
        - `status` 'UNSET' | 'OK' | 'ERROR', nullable, required
        - `content_refs` string[], required
      - `agent_start` AgentChatAgentStart, required: Payload for an agent lifecycle boundary.
        - `model` string, nullable, required
        - `system_instructions` string, nullable, required
        - `tool_definitions` string, nullable, required
        - `status` 'UNSET' | 'OK' | 'ERROR', nullable, required
      - `agent_handoff` AgentChatAgentHandoff, required: Payload for a future agent-to-agent handoff event.
      - `context_compacted` AgentChatContextCompacted, required: Payload for a context-window compaction event.
        - `compaction_summary` string, nullable, required
        - `compaction_items_before` integer, nullable, required
        - `compaction_items_after` integer, nullable, required
      - `feedback` AgentChatFeedback[], nullable, required
        - `id` string, required
        - `feedback_type` string, required
        - `weave_ref` string, required
        - `payload` object, required
        - `creator` string, nullable, required
        - `created_at` string, date-time, nullable, required
        - `wb_user_id` string, nullable, required
        - `runnable_ref` string, nullable, required
        - `call_ref` string, nullable, required
        - `trigger_ref` string, nullable, required
        - `annotation_ref` string, nullable, required
        - `scorer_tags` string[], required
        - `scorer_tag_reasons` object, required
        - `scorer_tag_confidences` object, required
        - `scorer_ratings` object, required
        - `scorer_rating_reasons` object, required
        - `scorer_rating_confidences` object, required
    - `feedback` AgentChatFeedback[], nullable, required
      - `id` string, required
      - `feedback_type` string, required
      - `weave_ref` string, required
      - `payload` object, required
      - `creator` string, nullable, required
      - `created_at` string, date-time, nullable, required
      - `wb_user_id` string, nullable, required
      - `runnable_ref` string, nullable, required
      - `call_ref` string, nullable, required
      - `trigger_ref` string, nullable, required
      - `annotation_ref` string, nullable, required
      - `scorer_tags` string[], required
      - `scorer_tag_reasons` object, required
      - `scorer_tag_confidences` object, required
      - `scorer_ratings` object, required
      - `scorer_rating_reasons` object, required
      - `scorer_rating_confidences` object, required
  - `total_turns` integer, required
  - `has_more` boolean, required
  - `limit` integer, required
  - `offset` integer, required
  - `total_cost_usd` number, nullable, required
  - `feedback` AgentChatFeedback[], nullable, required
    - `id` string, required
    - `feedback_type` string, required
    - `weave_ref` string, required
    - `payload` object, required
    - `creator` string, nullable, required
    - `created_at` string, date-time, nullable, required
    - `wb_user_id` string, nullable, required
    - `runnable_ref` string, nullable, required
    - `call_ref` string, nullable, required
    - `trigger_ref` string, nullable, required
    - `annotation_ref` string, nullable, required
    - `scorer_tags` string[], required
    - `scorer_tag_reasons` object, required
    - `scorer_tag_confidences` object, required
    - `scorer_ratings` object, required
    - `scorer_rating_reasons` object, required
    - `scorer_rating_confidences` object, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `dd89fadfe4e4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/wandb/apis/fastapi/changes/agents/conversations/chat/post.md)

---

[API](https://skmtc.dev/wandb/apis/fastapi.md) - [All operations](https://skmtc.dev/wandb/apis/fastapi/llms.txt) - [OpenAPI document](https://skmtc.dev/wandb/apis/fastapi/revisions/f7643c49bf2e?raw)
