Sessions

Reference for client.sessions in the Future AGI Python and TypeScript SDKs: sessions.get, sessions.list.

client.sessions on fi.Client (Python) and client.sessions on Client from @future-agi/sdk (TypeScript). The models these methods return are on Observability response models; how arguments, pagination, errors and strict mode work is in the overview.

Methods

MethodDescription
sessions.getReturn a trace session by its identifier.
sessions.listList trace sessions using the supplied filters.

client.sessions

sessions.get

Return a trace session by its identifier.

GET /tracer/trace-session/{id}/query/

MCP tool: get_session

result = client.sessions.get("your-id")
const result = await client.sessions.get("your-id");
Signature
client.sessions.get(
    id: str,
    *,
    navigation_context: str | None | NotGiven = NOT_GIVEN,
    user_id: str | None | NotGiven = NOT_GIVEN,
    filters: str | None | NotGiven = NOT_GIVEN,
    sort_params: str | None | NotGiven = NOT_GIVEN,
    page_number: int | None | NotGiven = NOT_GIVEN,
    page_size: int | None | NotGiven = NOT_GIVEN,
    extra_query: dict[str, Any] | None = None,
    options: RequestOptions | None = None,
) -> models.TraceSessionDetailResult
client.sessions.get(id: string, params: SessionsGetParams = {}, options?: RequestOptions): Promise<models.TraceSessionDetailResult>

export interface SessionsGetParams {
  navigation_context?: string | null;
  user_id?: string | null;
  filters?: string | null;
  sort_params?: string | null;
  page_number?: number | null;
  page_size?: number | null;
}

Parameters

id string Required

Positional argument id.

navigation_context string Optional
user_id string Optional
filters string Optional
sort_params string Optional
page_number integer Optional
page_size integer Optional

Returns

TraceSessionDetailResult.

sessions.list

List trace sessions using the supplied filters.

GET /tracer/trace-session/list_sessions/

MCP tool: list_sessions

result = client.sessions.list()
const result = await client.sessions.list();
Signature
client.sessions.list(
    *,
    project_id: str | None | NotGiven = NOT_GIVEN,
    user_id: str | None | NotGiven = NOT_GIVEN,
    bookmarked: bool | None | NotGiven = NOT_GIVEN,
    filters: str | None | NotGiven = NOT_GIVEN,
    sort_params: str | None | NotGiven = NOT_GIVEN,
    page_number: int | None | NotGiven = NOT_GIVEN,
    page_size: int | None | NotGiven = NOT_GIVEN,
    cursor: str | None | NotGiven = NOT_GIVEN,
    cursor_mode: bool | None | NotGiven = NOT_GIVEN,
    interval: str | None | NotGiven = NOT_GIVEN,
    allow_sampled: bool | None | NotGiven = NOT_GIVEN,
    extra_query: dict[str, Any] | None = None,
    options: RequestOptions | None = None,
) -> models.TraceSessionListResult
client.sessions.list(params: SessionsListParams = {}, options?: RequestOptions): Promise<models.TraceSessionListResult>

export interface SessionsListParams {
  project_id?: string | null;
  user_id?: string | null;
  bookmarked?: boolean | null;
  filters?: string | null;
  sort_params?: string | null;
  /** Zero-based numbered page. Pages whose required ordered work exceeds the finite read contract return HTTP 422 with code page_depth_exceeded; request an earlier page or narrow the time range. */
  page_number?: number | null;
  page_size?: number | null;
  /** Opaque continuation token returned by the previous page. When supplied, do not also send the numbered-page parameter. */
  cursor?: string | null;
  cursor_mode?: boolean | null;
  interval?: string | null;
  /** Omit for backward-compatible complete bounded pages, which may label total_rows as a lower bound. Send false to require an exact total, or true to opt in explicitly to lower-bound totals. */
  allow_sampled?: boolean | null;
}

Parameters

project_id string Optional
user_id string Optional
bookmarked boolean Optional
filters string Optional
sort_params string Optional
page_number integer Optional

Zero-based numbered page. Pages whose required ordered work exceeds the finite read contract return HTTP 422 with code page_depth_exceeded; request an earlier page or narrow the time range.

page_size integer Optional
cursor string Optional

Opaque continuation token returned by the previous page. When supplied, do not also send the numbered-page parameter.

cursor_mode boolean Optional
interval string Optional
allow_sampled boolean Optional

Omit for backward-compatible complete bounded pages, which may label total_rows as a lower bound. Send false to require an exact total, or true to opt in explicitly to lower-bound totals.

Returns

TraceSessionListResult.

Was this page helpful?

Questions & Discussion