Skip to main content

Session Store

View as Markdown

SessionStore object​

A workspace-scoped session store.

creator_user_idstringBetaOutput only

Workspace-local user ID of the authenticated principal that created the store. This is immutable server-set attribution and does not grant access; authorization is evaluated from the authenticated request context.

create_timestringBetaOutput only

Time when the store was created.

update_timestringBetaOutput only

Time when the store was last updated.

descriptionstringBeta

Human-readable description of the session store.

metadataobjectBeta

Mutable caller-defined string labels.

namestringBetaOutput onlyIDImmutable

Resource name in the form session-stores/{session_store_id}.

Get a session store Beta​

GET /api/2.0/agents/{name=session-stores/*}

Gets a session store by resource name.

API scopes: agent-kit

Parameters​

namestringRequiredpath

Resource name in the form session-stores/{session_store_id}.

Response​

Returns the SessionStore object.

List session stores Beta​

GET /api/2.0/agents/session-stores

Lists session stores.

API scopes: agent-kit

Parameters​

page_sizeint32query

Maximum number of session stores to return. Defaults to 10; must be between 1 and 100.

page_tokenstringquery

Token returned by a previous list request.

Response​

Returns a list of SessionStore objects.

Create a session store Beta​

POST /api/2.0/agents/session-stores

Creates a session store.

API scopes: agent-kit

Parameters​

session_store_idstring^[a-z]([a-z0-9-]{0,53}[a-z0-9])?$[ 3 .. 55 ] charactersRequiredquery

Caller-provided, workspace-unique session store ID. It must be 3-55 characters, begin with a lowercase letter, and contain only lowercase letters, digits, and hyphens.

Request body​

The session store to create.

descriptionstring

Human-readable description of the session store.

metadataobject

Mutable caller-defined string labels.

Response​

Returns the SessionStore object.

Update a session store Beta​

PATCH /api/2.0/agents/{name=session-stores/*}

Updates a session store's description and metadata.

API scopes: agent-kit

Parameters​

namestringRequiredIDImmutablepath

Resource name in the form session-stores/{session_store_id}.

update_maskstringRequiredquery

Fields to update. Only description and metadata are mutable; any other path returns INVALID_PARAMETER_VALUE.

Request body​

Session store to update.

descriptionstring

Human-readable description of the session store.

metadataobject

Mutable caller-defined string labels.

Response​

Returns the SessionStore object.

Delete a session store Beta​

DELETE /api/2.0/agents/{name=session-stores/*}

Deletes a session store, its sessions and items, and its service-managed storage. Memory entries retained by a separate Memory Store are not deleted.

API scopes: agent-kit

Parameters​

namestringRequiredpath

Resource name in the form session-stores/{session_store_id}.