AS AgentScopeAPI 手册 / API Reference
类class agentscope.app.access

ResourceRef

class ResourceRef(BaseModel)
源码Source agentscope/app/access/_policy.py:51–76

资源引用,把智能体接入外部消息渠道与企业平台。位于 agentscope.app.access 包。

Policies return ResourceRef objects to describe cross-owner resources that a viewer may access. Routers and runtime services then load the concrete record through the existing owner-scoped storage APIs using (owner_id, resource_id).

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
kindResourceKind
种类字段。
Field(description='Resource kind: credential, agent, or knowledge_base.')
owner_idstr
所有者标识字段。
Field(description="Resource owner user id, matching the storage record's user_id.")
resource_idstr
资源标识字段。
Field(description='Resource id under the owner, such as credential_id or agent_id.')
permissionResourcePermission
权限字段。
Field(default=ResourcePermission.READ, description='Granted permission level. Defaults to read.')

属性详情Attribute Detail

kind

ResourceKind = Field(description='Resource kind: credential, agent, or knowledge_base.')

种类字段。声明为 ResourceKind。

Resource kind: credential, agent, or knowledge_base.

源码Source agentscope/app/access/_policy.py:60

owner_id

str = Field(description="Resource owner user id, matching the storage record's user_id.")

所有者标识字段。声明为 str。

Resource owner user id, matching the storage record's user_id.

源码Source agentscope/app/access/_policy.py:63

resource_id

str = Field(description='Resource id under the owner, such as credential_id or agent_id.')

资源标识字段。声明为 str。

Resource id under the owner, such as credential_id or agent_id.

源码Source agentscope/app/access/_policy.py:68

permission

ResourcePermission = Field(default=ResourcePermission.READ, description='Granted permission level. Defaults to read.')

权限字段。声明为 ResourcePermission。

Granted permission level.

源码Source agentscope/app/access/_policy.py:73
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.