> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oneshotagent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Goal Outputs

> List and read what a compute goal's tasks produced

## Overview

A goal answers in two places. Its short answer, in the planner's words, is `result` on the [status endpoint](/api-reference/compute/status). What its tasks produced is here: the files a sandbox task left in its output folder, and tool results too large for a task row.

* `GET /v1/compute/{goalId}/outputs` lists them.
* `GET /v1/compute/{goalId}/outputs/{key}` returns one with its content. The key is a path and keeps its slashes.

Read the outputs before you confirm a goal that is waiting in `awaiting_confirmation`.

## Authentication

Send your agent wallet address in `X-Agent-ID` **and** a signed **read proof** in `x-agent-proof` (EIP-712, `scope: "read"`), or an access token (`Authorization: Bearer oneshot_…`) instead. A request without a valid proof or token gets `401 proof_required`. The OneShot SDK signs and sends the proof automatically. Raw HTTP callers: see [Read Proof Authentication](/sdk/overview#read-authentication).

Only the wallet that created the goal can read its outputs; other callers get a `404`.

## Path Parameters

<ParamField path="goalId" type="string" required>
  Goal ID (a UUID) from the create endpoint
</ParamField>

<ParamField path="key" type="string">
  For a read: the full `key` of one output, for example `artifacts/<task_id>/result.txt`
</ParamField>

## Response

<ResponseField name="data" type="array | object">
  The list returns an array; a read returns one object. Each output has:

  * `key`: `artifacts/<task_id>/<file>` for a file a sandbox task left, `results/<tool>/<task_id>` for a large tool result
  * `task_id`: the task that produced it, or `null`
  * `content_type`: for example `text/plain`
  * `size_bytes`: size of the content
  * `summary`: one line describing it, or `null`
  * `readable`: `false` when the content was too large to keep (about 10 KB and over); only the description exists
  * `updated_at`: timestamp

  A read adds:

  * `content`: the text, or `null` when `readable` is `false`
  * `truncated`: `true` when the content was cut to 200,000 characters
</ResponseField>

Each task on the [tasks endpoint](/api-reference/compute/tasks) also lists its `outputs` by key.

<RequestExample>
  ```bash cURL theme={null}
  curl https://win.oneshotagent.com/v1/compute/3f2b9c1e-8d4a-4f6b-9e2a-7c1d5b8a0f42/outputs \
    -H "X-Agent-ID: 0xYourWalletAddress" \
    -H "x-agent-proof: <base64 EIP-712 proof, scope read>"
  ```

  ```typescript SDK theme={null}
  const goal = await agent.getComputeGoal(goalId);
  console.log(goal.result);

  for (const out of await agent.getComputeOutputs(goalId)) {
    if (!out.readable) continue;
    const { content } = await agent.getComputeOutput(goalId, out.key);
    console.log(out.key, content);
  }
  ```

  ```python Python theme={null}
  goal = client.get_compute_goal(goal_id)
  print(goal["result"])

  for out in client.get_compute_outputs(goal_id):
      if out["readable"]:
          print(out["key"], client.get_compute_output(goal_id, out["key"])["content"])
  ```
</RequestExample>

<ResponseExample>
  ```json List theme={null}
  {
    "success": true,
    "data": [
      {
        "key": "artifacts/b7e4f0a2-1c3d-4e5f-8a9b-0c1d2e3f4a5b/result.txt",
        "task_id": "b7e4f0a2-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
        "content_type": "text/plain",
        "size_bytes": 84,
        "summary": "Agent output: result.txt (84 bytes)",
        "readable": true,
        "updated_at": "2026-01-15T12:06:10.000Z"
      }
    ]
  }
  ```

  ```json Read theme={null}
  {
    "success": true,
    "data": {
      "key": "artifacts/b7e4f0a2-1c3d-4e5f-8a9b-0c1d2e3f4a5b/result.txt",
      "task_id": "b7e4f0a2-1c3d-4e5f-8a9b-0c1d2e3f4a5b",
      "content_type": "text/plain",
      "size_bytes": 84,
      "summary": "Agent output: result.txt (84 bytes)",
      "readable": true,
      "updated_at": "2026-01-15T12:06:10.000Z",
      "content": "f6a0dbd5b741d76782253e9be928c53e3a4ab4ab4c60ee7f46c53b704688315f\n2880067194370816120",
      "truncated": false
    }
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.