--- title: 'Agent trace' description: 'Read every step an agent run took, in order. Send one request and get JSON back. Examples in cURL, TypeScript and Python.' og:title: 'Agent trace | Stophy' og:description: 'Read every step an agent run took, in order. Send one request and get JSON back. Examples in cURL, TypeScript and Python.' openapi: 'api-reference/openapi.json GET /v1/agent/{id}/trace' --- {/* Generated by scripts/gen-reference.ts from api-reference/openapi.json and the live catalog. Do not edit. */} ## Price Free. See [Pricing](/account/pricing). ```bash cURL curl https://api.stophy.dev/v1/agent/job_4kxytfWzbr774qn3-Ju4Qw/trace \ -H "Authorization: Bearer $STOPHY_API_KEY" ``` ```typescript TypeScript const response = await fetch("https://api.stophy.dev/v1/agent/job_4kxytfWzbr774qn3-Ju4Qw/trace", { headers: { Authorization: `Bearer ${process.env.STOPHY_API_KEY}`, }, }); console.log(await response.json()); ``` ```python Python import os import requests response = requests.get( "https://api.stophy.dev/v1/agent/job_4kxytfWzbr774qn3-Ju4Qw/trace", headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"}, ) print(response.json()) ``` ```json 200 { "success": true, "id": "job_4kxytfWzbr774qn3-Ju4Qw", "events": [ { "schemaVersion": 1, "eventId": "e481e4a1-c5eb-5d1b-bcb2-834c7189811d", "runId": "job_4kxytfWzbr774qn3-Ju4Qw", "occurredAt": "2026-11-17T17:50:23.347Z", "producerSequence": 0, "agent": { "id": "system", "role": "system", "name": "stophy" }, "type": "run.started" } ], "creditsUsed": 2, "costUsd": 0.004 } ```