GET/api/orgs/{org_id}/sessions/{session_id}/previews

Get one-line previews of tree steps

One short line per named step of the session tree, for the steps on screen: a request step's question (else its answer) from its stored text, a tool step's arguments (else its result). At most 60 characters each. A step with nothing stored is left out. The same rules as the skeleton apply, and a key whose access does not include stored prompts gets state: withheld and no previews.

Authentication: Bearer API key in the Authorization header

Path parameters

  • org_idstringrequired

    Your organization id (uuid). GET /api/whoami returns it.

  • session_idstringrequired

    The session id: the id your agent sent, else the conversation the gateway recognized, else the trace id.

Query parameters

  • nodearray<string>required

    A step's id from the skeleton's id (a request step's is its request id). Repeat it, 1 to 100 times.

Responses

  • 200

    The previews of the named steps that have stored text.

    Response
    • previewsarray<object>required
      previews
      • idstringrequired
      • sideenumrequired

        input (the question, a tool result fed back, or a tool's arguments) or output (the answer, or a tool's result) when no input is stored.

        "input""output"
      • textstringrequired

        One line, at most 60 characters.

      • cutbooleanrequired

        True when the stored text is longer.

    • stateenumrequired
      "shown""withheld"
  • 400

    No node, more than 100, or an id that is not 1 to 256 printable characters (invalid_parameter).

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 401

    Missing, unknown or revoked API key.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 404

    No such session in the organization (session_not_found).

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 429

    Too many reads. rate_limited: this organization's API-key reads of the request log are over about 10 per second (burst 30) or 4 in flight on one server (sessions are not limited). build_capacity: the shared analytics read slots are busy. Retry after Retry-After.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

  • 503

    This deployment has no observability store (observability_unavailable), or the store could not answer (trace_store_error). Retry shortly.

    Response
    • errorstringrequired

      Human-readable message.

    • codestring

      Stable machine reason, when the route defines one (for example pro_required).

    • actionstring

      Stable remediation action, when the route defines one.

    • detailsobject

      Customer-safe string facts the caller needs to act (for example a suggested identifier).

Request

curl 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/sessions/run-42/previews?node=req_01JD8ZK4M2Q7V9X3N5T6B8C0EF%2Ct-1' \
  -H "Authorization: Bearer <YOUR_API_KEY>"

Response

{
  "previews": [
    {
      "id": "req_01JD8ZK4M2Q7V9X3N5T6B8C0EF",
      "side": "input",
      "text": "Where is order A-1042?",
      "cut": false
    },
    {
      "id": "t-1",
      "side": "input",
      "text": "{\"order_id\":\"A-1042\"}",
      "cut": false
    }
  ],
  "state": "shown"
}

https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/sessions/run-42/previews?node=req_01JD8ZK4M2Q7V9X3N5T6B8C0EF%2Ct-1