---
title: "Get response"
method: GET
path: "/v2/agents/{agent_key}/responses/{task_id}"
tags: ["Agents"]
deprecated: true
---

# Get response

`GET /v2/agents/{agent_key}/responses/{task_id}`

> **Deprecated.**

Retrieve an agent response by task ID, including output, model info, token usage, and execution status.

## Path parameters

- `agent_key` string, required — The unique key identifier of the agent
- `task_id` string, required — The agent execution task ID returned from create response

## Response `200`

Response retrieved successfully. Returns the current state of the agent execution including output messages, model used, token usage, and status.

- GetAgentResponse — Response type from the get-response endpoint. Includes a status field indicating the current state of the agent execution.
  - `_id` string, required — The unique response ID
  - `task_id` string, required — The agent execution task ID
  - `output` AgentResponseMessage[], required — Array of messages from the agent execution
    - `messageId` string, required
    - `role` 'user' | 'agent' | 'tool' | 'system', required
    - `parts` union[], required
      - union
        - TextPart — A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
          - `kind` 'text', required
          - `text` string, required
        - ErrorPart — An error content part containing error information. Used when an error occurs during agent execution.
          - `kind` 'error', required
          - `error` string, required
          - `code` number
        - DataPart — A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
          - `kind` 'data', required
          - `data` object, required
          - `metadata` object
        - FilePart — A file content part that can contain either base64-encoded bytes or a URI reference. Used for images, documents, and other binary content in agent communications.
          - `kind` 'file', required
          - `file` union, required
            - object — Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
              - …
            - object — File in URI format. Check in the model's documentation for the supported mime types for the URI format
              - …
          - `metadata` object
        - ToolCallPart — A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
          - `kind` 'tool_call', required
          - `tool_name` string, required
          - `tool_call_id` string, required
          - `arguments` object, required
          - `thought_signature` string
          - `metadata` object
        - ToolResultPart — The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
          - `kind` 'tool_result', required
          - `tool_call_id` string, required
          - `result` unknown
          - `metadata` object
    - `metadata` object
  - `created_at` string, required — ISO timestamp of response creation
  - `model` string, required — Model used in provider/model format
  - `usage` object, nullable — Token usage from the agent execution
    - `completion_tokens` number — Number of tokens in the generated completion.
    - `prompt_tokens` number — Number of tokens in the prompt.
    - `total_tokens` number — Total number of tokens used in the request (prompt + completion).
    - `prompt_tokens_details` object, nullable
      - `cached_tokens` integer, nullable
      - `cache_creation_tokens` integer, nullable
      - `audio_tokens` integer, nullable — The number of audio input tokens consumed by the request.
    - `completion_tokens_details` object, nullable
      - `reasoning_tokens` number, nullable
      - `accepted_prediction_tokens` number, nullable
      - `rejected_prediction_tokens` number, nullable
      - `audio_tokens` integer, nullable — The number of audio output tokens produced by the response.
  - `finish_reason` 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call' | 'max_iterations' | 'max_time' — The reason why the agent stopped generating
  - `pending_tool_calls` object[] — Tool calls awaiting user response (when finish_reason is function_call)
    - `id` string, required
    - `type` 'function', required
    - `function` object, required
      - `name` string
      - `arguments` string
  - `telemetry` Telemetry — Telemetry information for correlating the response with traces
    - `trace_id` string, required — The root trace ID for the agent execution
    - `span_id` string, required — The span ID of the agent execution within the trace
  - `status` 'in_progress' | 'completed' | 'failed', required — Current status of the agent response
  - `error` string — Error message when status is failed

## Other responses

- `401` — Unauthorized.
- `404` — Response not found. The specified task ID does not exist for this agent or workspace.

## Changes

> 345 revisions in range; 150 not diffed.

- **2026-07-17** `2f27caf6888c` — 1 info
  - endpoint deprecated
- **2026-07-16** `bee257c5b248` — 1 info
  - endpoint reactivated
- **2026-07-16** `801f61a5a056` — 1 info
  - endpoint deprecated
- **2026-07-16** `42d5d2062527` — 1 info
  - endpoint reactivated
- **2026-07-10** `8ecb8a66eb1d` — 1 info
  - endpoint deprecated

[Full history](https://skmtc.dev/orq-ai/apis/orq-ai-api/changes/v2/agents/:agent_key/responses/:task_id/get.md)

---

[API](https://skmtc.dev/orq-ai/apis/orq-ai-api.md) · [All operations](https://skmtc.dev/orq-ai/apis/orq-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/orq-ai/apis/orq-ai-api/revisions/3ddbbbd87b26?raw)
