English ← MyDocs

资源

添加会话资源

post /v1/sessions/{session_id}/resources

添加会话资源

路径参数

  • session_id: string

请求头参数

  • "anthropic-beta": optional array of AnthropicBeta

    可选的请求头,用于指定要使用的 beta 版本。

    • string

    • "message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 22 more

      • "message-batches-2024-09-24"

      • "prompt-caching-2024-07-31"

      • "computer-use-2024-10-22"

      • "computer-use-2025-01-24"

      • "pdfs-2024-09-25"

      • "token-counting-2024-11-01"

      • "token-efficient-tools-2025-02-19"

      • "output-128k-2025-02-19"

      • "files-api-2025-04-14"

      • "mcp-client-2025-04-04"

      • "mcp-client-2025-11-20"

      • "dev-full-thinking-2025-05-14"

      • "interleaved-thinking-2025-05-14"

      • "code-execution-2025-05-22"

      • "extended-cache-ttl-2025-04-11"

      • "context-1m-2025-08-07"

      • "context-management-2025-06-27"

      • "model-context-window-exceeded-2025-08-26"

      • "skills-2025-10-02"

      • "fast-mode-2026-02-01"

      • "output-300k-2026-03-24"

      • "user-profiles-2026-03-24"

      • "advisor-tool-2026-03-01"

      • "managed-agents-2026-04-01"

      • "cache-diagnosis-2026-04-07"

请求体参数

  • file_id: string

    先前上传的文件的 ID。

  • type: "file"

    • "file"
  • mount_path: optional string

    容器中的挂载路径。默认为 /mnt/session/uploads/<file_id>

返回值

  • BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }

    • id: string

    • created_at: string

      RFC 3339 格式的时间戳

    • file_id: string

    • mount_path: string

    • type: "file"

      • "file"
    • updated_at: string

      RFC 3339 格式的时间戳

示例

curl https://api.anthropic.com/v1/sessions/$SESSION_ID/resources \
    -H 'Content-Type: application/json' \
    -H 'anthropic-version: 2023-06-01' \
    -H 'anthropic-beta: managed-agents-2026-04-01' \
    -H "X-Api-Key: $ANTHROPIC_API_KEY" \
    -d '{
          "file_id": "file_011CNha8iCJcU1wXNR6q4V8w",
          "type": "file",
          "mount_path": "/uploads/receipt.pdf"
        }'

响应

{
  "id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht",
  "created_at": "2026-03-15T10:00:00Z",
  "file_id": "file_011CNha8iCJcU1wXNR6q4V8w",
  "mount_path": "/uploads/receipt.pdf",
  "type": "file",
  "updated_at": "2026-03-15T10:00:00Z"
}

列出会话资源

get /v1/sessions/{session_id}/resources

列出会话资源

路径参数

  • session_id: string

查询参数

  • limit: optional number

    每页返回的最大资源数(最大 1000)。如果省略,返回所有资源。

  • page: optional string

    来自先前响应 next_page 字段的不透明游标。

请求头参数

  • "anthropic-beta": optional array of AnthropicBeta

    可选的请求头,用于指定要使用的 beta 版本。

    • string

    • "message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 22 more

      • "message-batches-2024-09-24"

      • "prompt-caching-2024-07-31"

      • "computer-use-2024-10-22"

      • "computer-use-2025-01-24"

      • "pdfs-2024-09-25"

      • "token-counting-2024-11-01"

      • "token-efficient-tools-2025-02-19"

      • "output-128k-2025-02-19"

      • "files-api-2025-04-14"

      • "mcp-client-2025-04-04"

      • "mcp-client-2025-11-20"

      • "dev-full-thinking-2025-05-14"

      • "interleaved-thinking-2025-05-14"

      • "code-execution-2025-05-22"

      • "extended-cache-ttl-2025-04-11"

      • "context-1m-2025-08-07"

      • "context-management-2025-06-27"

      • "model-context-window-exceeded-2025-08-26"

      • "skills-2025-10-02"

      • "fast-mode-2026-02-01"

      • "output-300k-2026-03-24"

      • "user-profiles-2026-03-24"

      • "advisor-tool-2026-03-01"

      • "managed-agents-2026-04-01"

      • "cache-diagnosis-2026-04-07"

返回值

  • data: array of BetaManagedAgentsSessionResource

    会话的资源,按 created_at 排序。

    • BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }

      • id: string

      • created_at: string

        RFC 3339 格式的时间戳

      • mount_path: string

      • type: "github_repository"

        • "github_repository"
      • updated_at: string

        RFC 3339 格式的时间戳

      • url: string

      • checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout

        • BetaManagedAgentsBranchCheckout object { name, type }

          • name: string

            要检出的分支名称。

          • type: "branch"

            • "branch"
        • BetaManagedAgentsCommitCheckout object { sha, type }

          • sha: string

            要检出的完整提交 SHA。

          • type: "commit"

            • "commit"
    • BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }

      • id: string

      • created_at: string

        RFC 3339 格式的时间戳

      • file_id: string

      • mount_path: string

      • type: "file"

        • "file"
      • updated_at: string

        RFC 3339 格式的时间戳

    • BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }

      附加到代理会话的内存存储。

      • memory_store_id: string

        内存存储 ID(memstore_...)。必须属于调用者的组织和工作区。

      • type: "memory_store"

        • "memory_store"
      • access: optional "read_write" or "read_only"

        附加内存存储的访问模式。

        • "read_write"

        • "read_only"

      • description: optional string

        内存存储的描述,在附加时快照。渲染到代理的系统提示中。存储没有描述时为空字符串。

      • instructions: optional string

        每个附加项对代理如何使用此存储的指导。渲染到系统提示的记忆部分。最多 4096 个字符。

      • mount_path: optional string

        存储在会话容器中挂载的文件系统路径,例如 /mnt/memory/user-preferences。从存储的名称派生。仅输出。

      • name: optional string

        内存存储的显示名称,在附加时快照。之后对存储名称的编辑不会传播到此资源。

  • next_page: optional string

    下一页的不透明游标。没有更多结果时为 null。

示例

curl https://api.anthropic.com/v1/sessions/$SESSION_ID/resources \
    -H 'anthropic-version: 2023-06-01' \
    -H 'anthropic-beta: managed-agents-2026-04-01' \
    -H "X-Api-Key: $ANTHROPIC_API_KEY"

响应

{
  "data": [
    {
      "id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht",
      "created_at": "2026-03-15T10:00:00Z",
      "file_id": "file_011CNha8iCJcU1wXNR6q4V8w",
      "mount_path": "/uploads/receipt.pdf",
      "type": "file",
      "updated_at": "2026-03-15T10:00:00Z"
    },
    {
      "id": "sesrsc_011CZkZCKr6eXyl0gWMOdQiu",
      "created_at": "2026-03-15T10:00:00Z",
      "mount_path": "/workspace/example-repo",
      "type": "github_repository",
      "updated_at": "2026-03-15T10:00:00Z",
      "url": "https://github.com/example-org/example-repo",
      "checkout": {
        "name": "main",
        "type": "branch"
      }
    }
  ],
  "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
}

获取会话资源

get /v1/sessions/{session_id}/resources/{resource_id}

获取会话资源

路径参数

  • session_id: string

  • resource_id: string

请求头参数

  • "anthropic-beta": optional array of AnthropicBeta

    可选的请求头,用于指定要使用的 beta 版本。

    • string

    • "message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 22 more

      • "message-batches-2024-09-24"

      • "prompt-caching-2024-07-31"

      • "computer-use-2024-10-22"

      • "computer-use-2025-01-24"

      • "pdfs-2024-09-25"

      • "token-counting-2024-11-01"

      • "token-efficient-tools-2025-02-19"

      • "output-128k-2025-02-19"

      • "files-api-2025-04-14"

      • "mcp-client-2025-04-04"

      • "mcp-client-2025-11-20"

      • "dev-full-thinking-2025-05-14"

      • "interleaved-thinking-2025-05-14"

      • "code-execution-2025-05-22"

      • "extended-cache-ttl-2025-04-11"

      • "context-1m-2025-08-07"

      • "context-management-2025-06-27"

      • "model-context-window-exceeded-2025-08-26"

      • "skills-2025-10-02"

      • "fast-mode-2026-02-01"

      • "output-300k-2026-03-24"

      • "user-profiles-2026-03-24"

      • "advisor-tool-2026-03-01"

      • "managed-agents-2026-04-01"

      • "cache-diagnosis-2026-04-07"

返回值

  • BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }

    • id: string

    • created_at: string

      RFC 3339 格式的时间戳

    • mount_path: string

    • type: "github_repository"

      • "github_repository"
    • updated_at: string

      RFC 3339 格式的时间戳

    • url: string

    • checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout

      • BetaManagedAgentsBranchCheckout object { name, type }

        • name: string

          要检出的分支名称。

        • type: "branch"

          • "branch"
      • BetaManagedAgentsCommitCheckout object { sha, type }

        • sha: string

          要检出的完整提交 SHA。

        • type: "commit"

          • "commit"
  • BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }

    • id: string

    • created_at: string

      RFC 3339 格式的时间戳

    • file_id: string

    • mount_path: string

    • type: "file"

      • "file"
    • updated_at: string

      RFC 3339 格式的时间戳

  • BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }

    附加到代理会话的内存存储。

    • memory_store_id: string

      内存存储 ID(memstore_...)。必须属于调用者的组织和工作区。

    • type: "memory_store"

      • "memory_store"
    • access: optional "read_write" or "read_only"

      附加内存存储的访问模式。

      • "read_write"

      • "read_only"

    • description: optional string

      内存存储的描述,在附加时快照。渲染到代理的系统提示中。存储没有描述时为空字符串。

    • instructions: optional string

      每个附加项对代理如何使用此存储的指导。渲染到系统提示的记忆部分。最多 4096 个字符。

    • mount_path: optional string

      存储在会话容器中挂载的文件系统路径,例如 /mnt/memory/user-preferences。从存储的名称派生。仅输出。

    • name: optional string

      内存存储的显示名称,在附加时快照。之后对存储名称的编辑不会传播到此资源。

示例

curl https://api.anthropic.com/v1/sessions/$SESSION_ID/resources/$RESOURCE_ID \
    -H 'anthropic-version: 2023-06-01' \
    -H 'anthropic-beta: managed-agents-2026-04-01' \
    -H "X-Api-Key: $ANTHROPIC_API_KEY"

响应

{
  "id": "sesrsc_011CZkZCKr6eXyl0gWMOdQiu",
  "created_at": "2026-03-15T10:00:00Z",
  "mount_path": "/workspace/example-repo",
  "type": "github_repository",
  "updated_at": "2026-03-15T10:00:00Z",
  "url": "https://github.com/example-org/example-repo",
  "checkout": {
    "name": "main",
    "type": "branch"
  }
}

更新会话资源

post /v1/sessions/{session_id}/resources/{resource_id}

更新会话资源

路径参数

  • session_id: string

  • resource_id: string

请求头参数

  • "anthropic-beta": optional array of AnthropicBeta

    可选的请求头,用于指定要使用的 beta 版本。

    • string

    • "message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 22 more

      • "message-batches-2024-09-24"

      • "prompt-caching-2024-07-31"

      • "computer-use-2024-10-22"

      • "computer-use-2025-01-24"

      • "pdfs-2024-09-25"

      • "token-counting-2024-11-01"

      • "token-efficient-tools-2025-02-19"

      • "output-128k-2025-02-19"

      • "files-api-2025-04-14"

      • "mcp-client-2025-04-04"

      • "mcp-client-2025-11-20"

      • "dev-full-thinking-2025-05-14"

      • "interleaved-thinking-2025-05-14"

      • "code-execution-2025-05-22"

      • "extended-cache-ttl-2025-04-11"

      • "context-1m-2025-08-07"

      • "context-management-2025-06-27"

      • "model-context-window-exceeded-2025-08-26"

      • "skills-2025-10-02"

      • "fast-mode-2026-02-01"

      • "output-300k-2026-03-24"

      • "user-profiles-2026-03-24"

      • "advisor-tool-2026-03-01"

      • "managed-agents-2026-04-01"

      • "cache-diagnosis-2026-04-07"

请求体参数

  • authorization_token: string

    资源的新授权令牌。目前只有 github_repository 资源支持令牌轮换。

返回值

  • BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }

    • id: string

    • created_at: string

      RFC 3339 格式的时间戳

    • mount_path: string

    • type: "github_repository"

      • "github_repository"
    • updated_at: string

      RFC 3339 格式的时间戳

    • url: string

    • checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout

      • BetaManagedAgentsBranchCheckout object { name, type }

        • name: string

          要检出的分支名称。

        • type: "branch"

          • "branch"
      • BetaManagedAgentsCommitCheckout object { sha, type }

        • sha: string

          要检出的完整提交 SHA。

        • type: "commit"

          • "commit"
  • BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }

    • id: string

    • created_at: string

      RFC 3339 格式的时间戳

    • file_id: string

    • mount_path: string

    • type: "file"

      • "file"
    • updated_at: string

      RFC 3339 格式的时间戳

  • BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }

    附加到代理会话的内存存储。

    • memory_store_id: string

      内存存储 ID(memstore_...)。必须属于调用者的组织和工作区。

    • type: "memory_store"

      • "memory_store"
    • access: optional "read_write" or "read_only"

      附加内存存储的访问模式。

      • "read_write"

      • "read_only"

    • description: optional string

      内存存储的描述,在附加时快照。渲染到代理的系统提示中。存储没有描述时为空字符串。

    • instructions: optional string

      每个附加项对代理如何使用此存储的指导。渲染到系统提示的记忆部分。最多 4096 个字符。

    • mount_path: optional string

      存储在会话容器中挂载的文件系统路径,例如 /mnt/memory/user-preferences。从存储的名称派生。仅输出。

    • name: optional string

      内存存储的显示名称,在附加时快照。之后对存储名称的编辑不会传播到此资源。

示例

curl https://api.anthropic.com/v1/sessions/$SESSION_ID/resources/$RESOURCE_ID \
    -H 'Content-Type: application/json' \
    -H 'anthropic-version: 2023-06-01' \
    -H 'anthropic-beta: managed-agents-2026-04-01' \
    -H "X-Api-Key: $ANTHROPIC_API_KEY" \
    -d '{
          "authorization_token": "ghp_exampletoken"
        }'

响应

{
  "id": "sesrsc_011CZkZCKr6eXyl0gWMOdQiu",
  "created_at": "2026-03-15T10:00:00Z",
  "mount_path": "/workspace/example-repo",
  "type": "github_repository",
  "updated_at": "2026-03-15T10:00:00Z",
  "url": "https://github.com/example-org/example-repo",
  "checkout": {
    "name": "main",
    "type": "branch"
  }
}

删除会话资源

delete /v1/sessions/{session_id}/resources/{resource_id}

删除会话资源

路径参数

  • session_id: string

  • resource_id: string

请求头参数

  • "anthropic-beta": optional array of AnthropicBeta

    可选的请求头,用于指定要使用的 beta 版本。

    • string

    • "message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 22 more

      • "message-batches-2024-09-24"

      • "prompt-caching-2024-07-31"

      • "computer-use-2024-10-22"

      • "computer-use-2025-01-24"

      • "pdfs-2024-09-25"

      • "token-counting-2024-11-01"

      • "token-efficient-tools-2025-02-19"

      • "output-128k-2025-02-19"

      • "files-api-2025-04-14"

      • "mcp-client-2025-04-04"

      • "mcp-client-2025-11-20"

      • "dev-full-thinking-2025-05-14"

      • "interleaved-thinking-2025-05-14"

      • "code-execution-2025-05-22"

      • "extended-cache-ttl-2025-04-11"

      • "context-1m-2025-08-07"

      • "context-management-2025-06-27"

      • "model-context-window-exceeded-2025-08-26"

      • "skills-2025-10-02"

      • "fast-mode-2026-02-01"

      • "output-300k-2026-03-24"

      • "user-profiles-2026-03-24"

      • "advisor-tool-2026-03-01"

      • "managed-agents-2026-04-01"

      • "cache-diagnosis-2026-04-07"

返回值

  • BetaManagedAgentsDeleteSessionResource object { id, type }

    资源删除确认。

    • id: string

    • type: "session_resource_deleted"

      • "session_resource_deleted"

示例

curl https://api.anthropic.com/v1/sessions/$SESSION_ID/resources/$RESOURCE_ID \
    -X DELETE \
    -H 'anthropic-version: 2023-06-01' \
    -H 'anthropic-beta: managed-agents-2026-04-01' \
    -H "X-Api-Key: $ANTHROPIC_API_KEY"

响应

{
  "id": "sesrsc_011CZkZBJq5dWxk9fVLNcPht",
  "type": "session_resource_deleted"
}

域类型

Beta Managed Agents 删除会话资源

  • BetaManagedAgentsDeleteSessionResource object { id, type }

    资源删除确认。

    • id: string

    • type: "session_resource_deleted"

      • "session_resource_deleted"

Beta Managed Agents File Resource

  • BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }

    • id: string

    • created_at: string

      RFC 3339 格式的时间戳

    • file_id: string

    • mount_path: string

    • type: "file"

      • "file"
    • updated_at: string

      RFC 3339 格式的时间戳

Beta Managed Agents GitHub Repository Resource

  • BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }

    • id: string

    • created_at: string

      RFC 3339 格式的时间戳

    • mount_path: string

    • type: "github_repository"

      • "github_repository"
    • updated_at: string

      RFC 3339 格式的时间戳

    • url: string

    • checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout

      • BetaManagedAgentsBranchCheckout object { name, type }

        • name: string

          要检出的分支名称。

        • type: "branch"

          • "branch"
      • BetaManagedAgentsCommitCheckout object { sha, type }

        • sha: string

          要检出的完整提交 SHA。

        • type: "commit"

          • "commit"

Beta Managed Agents Memory Store Resource

  • BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }

    附加到代理会话的内存存储。

    • memory_store_id: string

      内存存储 ID(memstore_...)。必须属于调用者的组织和工作区。

    • type: "memory_store"

      • "memory_store"
    • access: optional "read_write" or "read_only"

      附加内存存储的访问模式。

      • "read_write"

      • "read_only"

    • description: optional string

      内存存储的描述,在附加时快照。渲染到代理的系统提示中。存储没有描述时为空字符串。

    • instructions: optional string

      每个附加项对代理如何使用此存储的指导。渲染到系统提示的记忆部分。最多 4096 个字符。

    • mount_path: optional string

      存储在会话容器中挂载的文件系统路径,例如 /mnt/memory/user-preferences。从存储的名称派生。仅输出。

    • name: optional string

      内存存储的显示名称,在附加时快照。之后对存储名称的编辑不会传播到此资源。

Beta Managed Agents Session Resource

  • BetaManagedAgentsSessionResource = BetaManagedAgentsGitHubRepositoryResource or BetaManagedAgentsFileResource or BetaManagedAgentsMemoryStoreResource

    附加到代理会话的内存存储。

    • BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }

      • id: string

      • created_at: string

        RFC 3339 格式的时间戳

      • mount_path: string

      • type: "github_repository"

        • "github_repository"
      • updated_at: string

        RFC 3339 格式的时间戳

      • url: string

      • checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout

        • BetaManagedAgentsBranchCheckout object { name, type }

          • name: string

            要检出的分支名称。

          • type: "branch"

            • "branch"
        • BetaManagedAgentsCommitCheckout object { sha, type }

          • sha: string

            要检出的完整提交 SHA。

          • type: "commit"

            • "commit"
    • BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }

      • id: string

      • created_at: string

        RFC 3339 格式的时间戳

      • file_id: string

      • mount_path: string

      • type: "file"

        • "file"
      • updated_at: string

        RFC 3339 格式的时间戳

    • BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }

      附加到代理会话的内存存储。

      • memory_store_id: string

        内存存储 ID(memstore_...)。必须属于调用者的组织和工作区。

      • type: "memory_store"

        • "memory_store"
      • access: optional "read_write" or "read_only"

        附加内存存储的访问模式。

        • "read_write"

        • "read_only"

      • description: optional string

        内存存储的描述,在附加时快照。渲染到代理的系统提示中。存储没有描述时为空字符串。

      • instructions: optional string

        每个附加项对代理如何使用此存储的指导。渲染到系统提示的记忆部分。最多 4096 个字符。

      • mount_path: optional string

        存储在会话容器中挂载的文件系统路径,例如 /mnt/memory/user-preferences。从存储的名称派生。仅输出。

      • name: optional string

        内存存储的显示名称,在附加时快照。之后对存储名称的编辑不会传播到此资源。

Resource Retrieve Response

  • ResourceRetrieveResponse = BetaManagedAgentsGitHubRepositoryResource or BetaManagedAgentsFileResource or BetaManagedAgentsMemoryStoreResource

    请求的会话资源。

    • BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }

      • id: string

      • created_at: string

        RFC 3339 格式的时间戳

      • mount_path: string

      • type: "github_repository"

        • "github_repository"
      • updated_at: string

        RFC 3339 格式的时间戳

      • url: string

      • checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout

        • BetaManagedAgentsBranchCheckout object { name, type }

          • name: string

            要检出的分支名称。

          • type: "branch"

            • "branch"
        • BetaManagedAgentsCommitCheckout object { sha, type }

          • sha: string

            要检出的完整提交 SHA。

          • type: "commit"

            • "commit"
    • BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }

      • id: string

      • created_at: string

        RFC 3339 格式的时间戳

      • file_id: string

      • mount_path: string

      • type: "file"

        • "file"
      • updated_at: string

        RFC 3339 格式的时间戳

    • BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }

      附加到代理会话的内存存储。

      • memory_store_id: string

        内存存储 ID(memstore_...)。必须属于调用者的组织和工作区。

      • type: "memory_store"

        • "memory_store"
      • access: optional "read_write" or "read_only"

        附加内存存储的访问模式。

        • "read_write"

        • "read_only"

      • description: optional string

        内存存储的描述,在附加时快照。渲染到代理的系统提示中。存储没有描述时为空字符串。

      • instructions: optional string

        每个附加项对代理如何使用此存储的指导。渲染到系统提示的记忆部分。最多 4096 个字符。

      • mount_path: optional string

        存储在会话容器中挂载的文件系统路径,例如 /mnt/memory/user-preferences。从存储的名称派生。仅输出。

      • name: optional string

        内存存储的显示名称,在附加时快照。之后对存储名称的编辑不会传播到此资源。

Resource Update Response

  • ResourceUpdateResponse = BetaManagedAgentsGitHubRepositoryResource or BetaManagedAgentsFileResource or BetaManagedAgentsMemoryStoreResource

    更新后的会话资源。

    • BetaManagedAgentsGitHubRepositoryResource object { id, created_at, mount_path, 4 more }

      • id: string

      • created_at: string

        RFC 3339 格式的时间戳

      • mount_path: string

      • type: "github_repository"

        • "github_repository"
      • updated_at: string

        RFC 3339 格式的时间戳

      • url: string

      • checkout: optional BetaManagedAgentsBranchCheckout or BetaManagedAgentsCommitCheckout

        • BetaManagedAgentsBranchCheckout object { name, type }

          • name: string

            要检出的分支名称。

          • type: "branch"

            • "branch"
        • BetaManagedAgentsCommitCheckout object { sha, type }

          • sha: string

            要检出的完整提交 SHA。

          • type: "commit"

            • "commit"
    • BetaManagedAgentsFileResource object { id, created_at, file_id, 3 more }

      • id: string

      • created_at: string

        RFC 3339 格式的时间戳

      • file_id: string

      • mount_path: string

      • type: "file"

        • "file"
      • updated_at: string

        RFC 3339 格式的时间戳

    • BetaManagedAgentsMemoryStoreResource object { memory_store_id, type, access, 4 more }

      附加到代理会话的内存存储。

      • memory_store_id: string

        内存存储 ID(memstore_...)。必须属于调用者的组织和工作区。

      • type: "memory_store"

        • "memory_store"
      • access: optional "read_write" or "read_only"

        附加内存存储的访问模式。

        • "read_write"

        • "read_only"

      • description: optional string

        内存存储的描述,在附加时快照。渲染到代理的系统提示中。存储没有描述时为空字符串。

      • instructions: optional string

        每个附加项对代理如何使用此存储的指导。渲染到系统提示的记忆部分。最多 4096 个字符。

      • mount_path: optional string

        存储在会话容器中挂载的文件系统路径,例如 /mnt/memory/user-preferences。从存储的名称派生。仅输出。

      • name: optional string

        内存存储的显示名称,在附加时快照。之后对存储名称的编辑不会传播到此资源。