API

RepoAgentSession

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id}/complete create Success
POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions create Success
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id} load Success
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id}/transcript load A page of transcript events, newest-last within the page
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id}/transcript_export load Transcript file attachment
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id}/transcript_index load Without chunk: the transcript index state, when state is ready the manifest and the per-chunk chunks URLs are included, otherwise only state, session_id, and checkpoint_id. With chunk: that chunk object's raw JSON, zstd-encoded when the client accepts it
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions load Success
PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id} patch The updated agent session
PUT /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id} update Success

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

repo_agent_session, err := client.RepoAgentSession(nil).Load(map[string]any{"organization_id": "example", "repo_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(repo_agent_session)
created, err := client.RepoAgentSession(nil).Create(map[string]any{"organization_id": "example", "repo_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
updated, err := client.RepoAgentSession(nil).Update(map[string]any{"id": "example_id", "organization_id": "example", "repo_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)
patched, err := client.RepoAgentSession(nil).Patch(map[string]any{"id": "example_id", "organization_id": "example", "repo_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(patched)

Lua

Construct client as shown in the Lua setup, then call the operations:

local repo_agent_session, err = client:RepoAgentSession():load({ organization_id = "example", repo_id = "example" })
local created, err = client:RepoAgentSession():create({ organization_id = "example", repo_id = "example" })
local updated, err = client:RepoAgentSession():update({ id = "example_id", organization_id = "example", repo_id = "example" })
local patched, err = client:RepoAgentSession():patch({ id = "example_id", organization_id = "example", repo_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$repo_agent_session = $client->RepoAgentSession()->load(["organization_id" => "example", "repo_id" => "example"]);
$created = $client->RepoAgentSession()->create(["organization_id" => "example", "repo_id" => "example"]);
$updated = $client->RepoAgentSession()->update(["id" => "example_id", "organization_id" => "example", "repo_id" => "example"]);
$patched = $client->RepoAgentSession()->patch(["id" => "example_id", "organization_id" => "example", "repo_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

repo_agent_session = client.RepoAgentSession().load({"organization_id": "example", "repo_id": "example"})
created = client.RepoAgentSession().create({ "organization_id": "example", "repo_id": "example" })
updated = client.RepoAgentSession().update({"id": "example_id", "organization_id": "example", "repo_id": "example"})
patched = client.RepoAgentSession().patch({"id": "example_id", "organization_id": "example", "repo_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

repo_agent_session = client.RepoAgentSession.load({ "organization_id" => "example", "repo_id" => "example" })
created = client.RepoAgentSession.create({ "organization_id" => "example", "repo_id" => "example" })
updated = client.RepoAgentSession.update({ "id" => "example_id", "organization_id" => "example", "repo_id" => "example" })
patched = client.RepoAgentSession.patch({ "id" => "example_id", "organization_id" => "example", "repo_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const repo_agent_session = await client.RepoAgentSession().load({ organization_id: "example", repo_id: "example" })
const created = await client.RepoAgentSession().create({ organization_id: "example", repo_id: "example" })
const updated = await client.RepoAgentSession().update({ id: "example_id", organization_id: "example", repo_id: "example" })
const patched = await client.RepoAgentSession().patch({ id: "example_id", organization_id: "example", repo_id: "example" })

Fields

Field Type Required Description
adapter string No Adapter
agent_session object Yes Agent Session
external_session_id string No External Session Id
id string No Id
status string No Status
title one,string,null No Title

create

POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id}/complete

Operation ID: complete_api_v1_agent_session.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions

Operation ID: post_api_v1_organizations_org_slug_repos_repo_slug_agent_sessions.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id}

Operation ID: api_v1_agent_session.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id}/transcript

Operation ID: transcript_api_v1_agent_session.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes
cursor query string No Opaque backward-pagination cursor from a previous response's prev_cursor. Omit for the latest (tail) page.
limit query integer No Events per page (default 200).
checkpoint query string No Public id of a specific uploaded checkpoint to read. Defaults to the session's latest uploaded checkpoint.

Responses

200: A page of transcript events, newest-last within the page

application/json

Property Type Required Description
checkpoint_id string Yes
events array of object Yes
events[].category enum: context, prompt, response, reasoning, tool, lifecycle, ... Yes Rails-owned conversation meaning for this event. system is harness bookkeeping (mode, title, file-history rows), attachment is context the harness injected, and other is a row shape Vex does not recognize; the browser hides all three by default.
events[].index integer Yes 0-based position in the full flattened transcript.
events[].kind enum: message, reasoning, tool_use, tool_result, lifecycle, other Yes
events[].name string Yes Rails-owned hook, tool, harness row-type, or attachment-type name, or null when the source carried none.
events[].role enum: user, assistant, system, developer, tool, null Yes
events[].skill_names array of string Yes Skill names Rails identified from this tool call.
events[].summary string Yes Rails-owned short description of a tool input, or null when no useful detail was present.
events[].text string Yes Sanitized, per-event byte-capped display text.
events[].timestamp string Yes ISO8601 capture time, or null when the source carried none.
events[].truncated boolean Yes True when text was truncated at the per-event cap.
events[].turn_index integer Yes 0-based conversation turn, or null for session context and events before the first prompt.
has_more_before boolean Yes True when older events exist before this page.
prev_cursor string Yes Cursor for the previous (older) page, or null at the start.
session_id string Yes
total_events integer Yes Total events in the resolved checkpoint's transcript.
401: Unauthorized
403: Forbidden
404: Not found
409: The session has no uploaded checkpoint transcript available yet

application/json

Property Type Required Description
error string Yes
422: The checkpoint archive could not be read

application/json

Property Type Required Description
error string Yes
502: Bad gateway

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id}/transcript_export

Operation ID: transcript_export_api_v1_agent_session.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes
checkpoint query string No Public id of a specific uploaded checkpoint to export.
format query enum: markdown, jsonl No Export format. Defaults to Markdown.

Responses

200: Transcript file attachment

application/json

The response is object.

text/markdown

The response is string.

application/x-ndjson

The response is string.

400: The requested export format is unsupported

application/json

Property Type Required Description
error string Yes
401: Unauthorized
403: Forbidden
404: Not found
409: The session has no uploaded checkpoint transcript available yet

application/json

Property Type Required Description
error string Yes
422: The checkpoint archive could not be read

application/json

Property Type Required Description
error string Yes
502: Bad gateway

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id}/transcript_index

Operation ID: transcript_index_api_v1_agent_session.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes
checkpoint query string No Public id of a specific uploaded checkpoint. Defaults to the session's latest uploaded checkpoint.
chunk query integer No Sequence number of a single chunk to serve instead of the index body. Must be a non-negative integer listed in the manifest's chunks; anything else is a 404. Clients follow the url from the index response rather than building this themselves.

Responses

200: Without chunk: the transcript index state, when state is ready the manifest and the per-chunk chunks URLs are included, otherwise only state, session_id, and checkpoint_id. With chunk: that chunk object's raw JSON, zstd-encoded when the client accepts it

application/json

The response is object or object.

401: Unauthorized
403: Forbidden
404: The session is not readable, the pinned checkpoint does not exist, or the requested chunk is not in the manifest (or its object is gone)
409: The session has no uploaded checkpoint to index yet

application/json

Property Type Required Description
error string Yes
422: Unprocessable entity
502: Bad gateway

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions

Operation ID: api_v1_agent_sessions.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

patch

PATCH /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id}

Operation ID: patch_api_v1_organizations_org_slug_repos_repo_slug_agent_sessions_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes

Request body

application/json

Property Type Required Description
agent_session object Yes
agent_session.title string Yes

Responses

200: The updated agent session

application/json

Property Type Required Description
agent_session object Yes
agent_session.adapter string No
agent_session.external_session_id string No
agent_session.id string No
agent_session.status string No
agent_session.title string No
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity

update

PUT /api/v1/organizations/{org_slug}/repos/{repo_slug}/agent_sessions/{id}

Operation ID: put_api_v1_organizations_org_slug_repos_repo_slug_agent_sessions_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway