Claude Platform Docs

资源

添加会话资源
BetaManagedAgentsFileResource beta().sessions().resources().add(params, requestOptions = RequestOptions.none())
POST/v1/sessions/{session_id}/resources
Requires anthropic-beta: managed-agents-2026-04-01. Learn how to send beta headers.
列出会话资源
ResourceListPage beta().sessions().resources().list(params = ResourceListParams.none(), requestOptions = RequestOptions.none())
GET/v1/sessions/{session_id}/resources
Requires anthropic-beta: managed-agents-2026-04-01. Learn how to send beta headers.
获取会话资源
ResourceRetrieveResponse beta().sessions().resources().retrieve(params, requestOptions = RequestOptions.none())
GET/v1/sessions/{session_id}/resources/{resource_id}
Requires anthropic-beta: managed-agents-2026-04-01. Learn how to send beta headers.
更新会话资源
ResourceUpdateResponse beta().sessions().resources().update(params, requestOptions = RequestOptions.none())
POST/v1/sessions/{session_id}/resources/{resource_id}
Requires anthropic-beta: managed-agents-2026-04-01. Learn how to send beta headers.
删除会话资源
BetaManagedAgentsDeleteSessionResource beta().sessions().resources().delete(params, requestOptions = RequestOptions.none())
DELETE/v1/sessions/{session_id}/resources/{resource_id}
Requires anthropic-beta: managed-agents-2026-04-01. Learn how to send beta headers.
Models
class BetaManagedAgentsDeleteSessionResource { type = "session_resource_deleted"; id; }

Confirmation of resource deletion.

JsonValue type = "session_resource_deleted"
String id
class BetaManagedAgentsFileResource { type = "file"; id; createdAt; /* 3 more */ }
JsonValue type = "file"
String id
OffsetDateTime createdAt

A timestamp in RFC 3339 format

formatdate-time
String fileId
String mountPath
OffsetDateTime updatedAt

A timestamp in RFC 3339 format

formatdate-time
class BetaManagedAgentsGitHubRepositoryResource { type = "github_repository"; id; createdAt; /* 4 more */ }
class BetaManagedAgentsMemoryStoreResource { type = "memory_store"; memoryStoreId; access; /* 4 more */ }

A memory store attached to an agent session.

JsonValue type = "memory_store"
String memoryStoreId

The memory store ID (memstore_...). Must belong to the caller's organization and workspace.

pattern^memstore_[a-zA-Z0-9_]+$
Optional<Access> access

Access mode for the mounted store. Defaults to read_write. read_only mounts the store as a read-only filesystem.

One of the following:
READ_WRITE("read_write")
READ_ONLY("read_only")
Optional<String> description

Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description.

Optional<String> instructions

Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.

maxLength4096
Optional<String> mountPath

Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.

Optional<String> name

Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource.

class BetaManagedAgentsSessionResource: union