Skip to content
中文

Get Session Prompt Revs (Extension)

GET/agent/v1/sessions/{session_id}/prompt-revs● Supported

Request parameters

  • session_idstringrequired

    path: Session id from session creation or listing, or the own face's session name for a main session.

  • run_idstringoptional

    query: Read this run's own record. Omit it to read the last record written, which moves only when the Rev set changes and may be several turns older than this call.

  • acknowledge_wakestringrequired

    query: Must be true. Says you know this read constructs the session object once and that its startup may settle an interrupted turn. Anything else is 400 INVALID_PARAMS, refused before the session is touched.

    values true

Returns

200

Available only on /agent/v1. Returns run_id, config_revision_id, config_version, platform, at and reaped_turns. platform is ONE map keyed by each input's own name — section:<name> for a prompt section, plus catalog and tools as ordinary entries — and each value is that input's 8-hex content Rev; no prompt text is ever returned. With run_id you read that run's own record; without it you read the last record written, which moves only when the Rev set changes and may be several turns older than this call, so run_id is null then. at is for telling how old the answer is and never takes part in a comparison. This call constructs the session object once (a Durable Object cannot be read without being entered) and its startup may settle an interrupted turn, so acknowledge_wake=true is required; reaped_turns says how many interrupted turns this call's own arrival settled (0 when none), and only a value above 0 is evidence about this call. This method does not distinguish a new instance from a rebuilt first probe: that distinction is not in the contract yet, and when agent.sessions.tablesInfo's contract face carries start_phase the two methods move to it together. It writes no row and does not refresh the eviction ordering key of the session's cached context parts. A run with no record and an unreadable session both answer 404 with only reason: unknown_run or unknown_session, carrying no record field at all.

Errors follow the Anthropic error format (type / message / request_id) — see error codes

Request

curl
curl "https://api.deepraxis.com/agent/v1/sessions/sesn_abc123/prompt-revs?acknowledge_wake=true&run_id=run_7f3c" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"
Python
import requests

opts = dict(
    base_url="https://api.deepraxis.com/agent",
    api_key="$PRAXIS_API_KEY",
)

# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.get(
    f"{opts['base_url']}/v1/sessions/sesn_abc123/prompt-revs?acknowledge_wake=true&run_id=run_7f3c",
    headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())
TypeScript
const opts = {
  baseURL: "https://api.deepraxis.com/agent",
  apiKey: "$PRAXIS_API_KEY",
};

// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/sessions/sesn_abc123/prompt-revs?acknowledge_wake=true&run_id=run_7f3c`, {
  headers: { Authorization: `Bearer ${opts.apiKey}` },
});
console.log(resp.status, await resp.json());

Response 200

{
  "found": true,
  "run_id": "run_7f3c",
  "config_revision_id": "agr_12",
  "config_version": 12,
  "platform": {
    "catalog": "a1b2c3d4",
    "section:memory": "0f1e2d3c",
    "section:computer": "99887766",
    "tools": "01234567"
  },
  "at": 1764000000000,
  "reaped_turns": 0
}

Response

HTTP 200

The turn’s record: no prompt text, only the identifiers of what it ran on.

application/json

Name Type Description
run_id string | null The run this record belongs to; null when the last record was read, because that record is written when the Rev set moves and is not tied to a turn.
config_revision_id string The configuration-layer revision the turn pinned.
config_version integer | null The version number config_revision_id carries, read from that revision's own row; null only on a record written before the version was read from the row, which stored a constant instead.
platform object One entry per platform input, keyed by the input's own name: section:<name> for a prompt section, plus catalog and tools. The value is that input's 8-hex content Rev, never its text.
at integer When the record was taken, epoch milliseconds. Informational only: it never takes part in a comparison.
reaped_turns integer Interrupted turns this read's own arrival settled; 0 when it settled none. Only a value above 0 is evidence about this call.