Skip to main content

resources

Creates, updates, deletes, gets or lists a resources resource.

Overview

Nameresources
TypeResource
Idanthropic.sessions.resources

Fields

The following fields are returned by SELECT queries:

Successful response (OK)

NameDatatypeDescription
idstring
namestringDisplay name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource.
file_idstring
memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
accessstringAccess mode for the mounted store. Defaults to read_write. read_only mounts the store as a read-only filesystem. (read_write, read_only)
checkoutobject
created_atstring (date-time)A timestamp in RFC 3339 format
descriptionstringDescription of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description.
instructionsstringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
mount_pathstring
typestring (github_repository)
updated_atstring (date-time)A timestamp in RFC 3339 format
urlstring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsession_id, resource_id
listselectsession_id
updateupdatesession_id, resource_id, authorization_token
deletedeletesession_id, resource_id
addexecsession_id, type, file_id

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resource_idstringPath parameter resource_id (example: sesrsc_011CZkZBJq5dWxk9fVLNcPht)
session_idstringPath parameter session_id (example: sesn_011CZkZAtmR3yMPDzynEDxu7)

SELECT examples

Successful response (OK)

SELECT
id,
name,
file_id,
memory_store_id,
access,
checkout,
created_at,
description,
instructions,
mount_path,
type,
updated_at,
url
FROM anthropic.sessions.resources
WHERE session_id = '{{ session_id }}' -- required
AND resource_id = '{{ resource_id }}' -- required
;

UPDATE examples

No description available.

UPDATE anthropic.sessions.resources
SET
authorization_token = '{{ authorization_token }}'
WHERE
session_id = '{{ session_id }}' --required
WHERE resource_id = '{{ resource_id }}' --required
AND authorization_token = '{{ authorization_token }}' --required
RETURNING
id,
name,
file_id,
memory_store_id,
access,
checkout,
created_at,
description,
instructions,
mount_path,
type,
updated_at,
url;

DELETE examples

No description available.

DELETE FROM anthropic.sessions.resources
WHERE session_id = '{{ session_id }}' --required
AND resource_id = '{{ resource_id }}' --required
;

Lifecycle Methods

Successful response (OK)

EXEC anthropic.sessions.resources.add
@session_id='{{ session_id }}' --required
@@json=
'{
"type": "{{ type }}",
"file_id": "{{ file_id }}",
"mount_path": "{{ mount_path }}"
}'
;