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

KeyConfig

class KeyConfig(BaseModel)
源码Source agentscope/app/storage/_redis_storage.py:59–150

键配置,保存相关配置项。位于 agentscope.app.storage 包。

Nested on :class:RedisStorage because customising key prefixes is meaningful only for this backend; users tweak them via RedisStorage(key_config=RedisStorage.KeyConfig(...)).

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
credentialstr
凭证字段。
'agentscope:user:{user_id}:credential:{credential_id}'
agentstr
智能体字段。
'agentscope:user:{user_id}:agent:{agent_id}'
sessionstr
会话字段。
'agentscope:user:{user_id}:session:{session_id}'
mcpstr
MCP字段。
'agentscope:user:{user_id}:mcp:{mcp_id}'
skillstr
技能字段。
'agentscope:user:{user_id}:skill:{skill_id}'
credential_indexstr
凭证索引字段。
'agentscope:user:{user_id}:credentials'
agent_indexstr
智能体索引字段。
'agentscope:user:{user_id}:agents'
mcp_indexstr
MCP 索引字段。
'agentscope:user:{user_id}:mcps'
skill_indexstr
技能索引字段。
'agentscope:user:{user_id}:skills'
mcp_name_indexstr
MCP 名称索引字段。
'agentscope:user:{user_id}:mcp_names'
skill_name_indexstr
技能名称索引字段。
'agentscope:user:{user_id}:skill_names'
session_indexstr
会话索引字段。
'agentscope:user:{user_id}:agent:{agent_id}:sessions'
session_lookupstr
`session_lookup` 字段。
'agentscope:user:{user_id}:agent:{agent_id}:session'
messagesstr
消息字段。
'agentscope:user:{user_id}:session:{session_id}:messages'
message_indexstr
消息索引字段。
'agentscope:user:{user_id}:session:{session_id}:message_ids'
schedulestr
调度字段。
'agentscope:user:{user_id}:schedule:{schedule_id}'
schedule_indexstr
调度索引字段。
'agentscope:user:{user_id}:schedules'
schedule_global_indexstr
`schedule_global_index` 字段。
'agentscope:schedules'
schedule_session_indexstr
调度会话索引字段。
'agentscope:user:{user_id}:schedule:{schedule_id}:sessions'
channelstr
渠道字段。
'agentscope:channel_record:{channel_id}'
channel_indexstr
渠道索引字段。
'agentscope:user:{user_id}:channels'
channel_all_indexstr
渠道所有索引字段。
'agentscope:channels'
channel_botid_indexstr
`channel_botid_index` 字段。
'agentscope:channel_botid:{platform_bot_id}'
channel_session_indexstr
渠道会话索引字段。
'agentscope:user:{user_id}:channel:{channel_id}:sessions'
sopstr
SOP字段。
'agentscope:user:{user_id}:sop:{sop_id}'
sop_indexstr
SOP 索引字段。
'agentscope:user:{user_id}:sops'
sop_runstr
SOP 运行字段。
'agentscope:user:{user_id}:sop_run:{sop_run_id}'
sop_run_indexstr
SOP 运行索引字段。
'agentscope:user:{user_id}:sop_runs'
sop_run_sop_indexstr
SOP 运行 SOP 索引字段。
'agentscope:user:{user_id}:sop:{sop_id}:runs'
teamstr
团队字段。
'agentscope:user:{user_id}:team:{team_id}'
team_indexstr
团队索引字段。
'agentscope:user:{user_id}:teams'
knowledge_basestr
知识库字段。
'agentscope:user:{user_id}:knowledge_base:{knowledge_base_id}'
knowledge_base_indexstr
知识库索引字段。
'agentscope:user:{user_id}:knowledge_bases'
knowledge_documentstr
知识库文档字段。
'agentscope:user:{user_id}:knowledge_base:{knowledge_base_id}:document:{document_id}'
knowledge_document_indexstr
知识库文档索引字段。
'agentscope:user:{user_id}:knowledge_base:{knowledge_base_id}:documents'
knowledge_document_global_indexstr
`knowledge_document_global_index` 字段。
'agentscope:knowledge_documents'

属性详情Attribute Detail

credential

str = 'agentscope:user:{user_id}:credential:{credential_id}'

凭证字段。声明为 str。

The credential field.

源码Source agentscope/app/storage/_redis_storage.py:68

agent

str = 'agentscope:user:{user_id}:agent:{agent_id}'

智能体字段。声明为 str。

The agent field.

源码Source agentscope/app/storage/_redis_storage.py:71

session

str = 'agentscope:user:{user_id}:session:{session_id}'

会话字段。声明为 str。

The session field.

源码Source agentscope/app/storage/_redis_storage.py:72

mcp

str = 'agentscope:user:{user_id}:mcp:{mcp_id}'

MCP字段。声明为 str。

The mcp field.

源码Source agentscope/app/storage/_redis_storage.py:73

skill

str = 'agentscope:user:{user_id}:skill:{skill_id}'

技能字段。声明为 str。

The skill field.

源码Source agentscope/app/storage/_redis_storage.py:74

credential_index

str = 'agentscope:user:{user_id}:credentials'

凭证索引字段。声明为 str。

The credential index field.

源码Source agentscope/app/storage/_redis_storage.py:77

agent_index

str = 'agentscope:user:{user_id}:agents'

智能体索引字段。声明为 str。

The agent index field.

源码Source agentscope/app/storage/_redis_storage.py:78

mcp_index

str = 'agentscope:user:{user_id}:mcps'

MCP 索引字段。声明为 str。

The mcp index field.

源码Source agentscope/app/storage/_redis_storage.py:79

skill_index

str = 'agentscope:user:{user_id}:skills'

技能索引字段。声明为 str。

The skill index field.

源码Source agentscope/app/storage/_redis_storage.py:80

mcp_name_index

str = 'agentscope:user:{user_id}:mcp_names'

MCP 名称索引字段。声明为 str。

The mcp name index field.

源码Source agentscope/app/storage/_redis_storage.py:85

skill_name_index

str = 'agentscope:user:{user_id}:skill_names'

技能名称索引字段。声明为 str。

The skill name index field.

源码Source agentscope/app/storage/_redis_storage.py:86

session_index

str = 'agentscope:user:{user_id}:agent:{agent_id}:sessions'

会话索引字段。声明为 str。

The session index field.

源码Source agentscope/app/storage/_redis_storage.py:87

session_lookup

str = 'agentscope:user:{user_id}:agent:{agent_id}:session'

session_lookup 字段。声明为 str。

The session lookup field.

源码Source agentscope/app/storage/_redis_storage.py:92

messages

str = 'agentscope:user:{user_id}:session:{session_id}:messages'

消息字段。声明为 str。

The messages field.

源码Source agentscope/app/storage/_redis_storage.py:97

message_index

str = 'agentscope:user:{user_id}:session:{session_id}:message_ids'

消息索引字段。声明为 str。

The message index field.

源码Source agentscope/app/storage/_redis_storage.py:100

schedule

str = 'agentscope:user:{user_id}:schedule:{schedule_id}'

调度字段。声明为 str。

The schedule field.

源码Source agentscope/app/storage/_redis_storage.py:104

schedule_index

str = 'agentscope:user:{user_id}:schedules'

调度索引字段。声明为 str。

The schedule index field.

源码Source agentscope/app/storage/_redis_storage.py:105

schedule_global_index

str = 'agentscope:schedules'

schedule_global_index 字段。声明为 str。

The schedule global index field.

源码Source agentscope/app/storage/_redis_storage.py:106

schedule_session_index

str = 'agentscope:user:{user_id}:schedule:{schedule_id}:sessions'

调度会话索引字段。声明为 str。

The schedule session index field.

源码Source agentscope/app/storage/_redis_storage.py:107

channel

str = 'agentscope:channel_record:{channel_id}'

渠道字段。声明为 str。

The channel field.

源码Source agentscope/app/storage/_redis_storage.py:115

channel_index

str = 'agentscope:user:{user_id}:channels'

渠道索引字段。声明为 str。

The channel index field.

源码Source agentscope/app/storage/_redis_storage.py:116

channel_all_index

str = 'agentscope:channels'

渠道所有索引字段。声明为 str。

The channel all index field.

源码Source agentscope/app/storage/_redis_storage.py:117

channel_botid_index

str = 'agentscope:channel_botid:{platform_bot_id}'

channel_botid_index 字段。声明为 str。

The channel botid index field.

源码Source agentscope/app/storage/_redis_storage.py:118

channel_session_index

str = 'agentscope:user:{user_id}:channel:{channel_id}:sessions'

渠道会话索引字段。声明为 str。

The channel session index field.

源码Source agentscope/app/storage/_redis_storage.py:119

sop

str = 'agentscope:user:{user_id}:sop:{sop_id}'

SOP字段。声明为 str。

The sop field.

源码Source agentscope/app/storage/_redis_storage.py:123

sop_index

str = 'agentscope:user:{user_id}:sops'

SOP 索引字段。声明为 str。

The sop index field.

源码Source agentscope/app/storage/_redis_storage.py:124

sop_run

str = 'agentscope:user:{user_id}:sop_run:{sop_run_id}'

SOP 运行字段。声明为 str。

The sop run field.

源码Source agentscope/app/storage/_redis_storage.py:125

sop_run_index

str = 'agentscope:user:{user_id}:sop_runs'

SOP 运行索引字段。声明为 str。

The sop run index field.

源码Source agentscope/app/storage/_redis_storage.py:126

sop_run_sop_index

str = 'agentscope:user:{user_id}:sop:{sop_id}:runs'

SOP 运行 SOP 索引字段。声明为 str。

The sop run sop index field.

源码Source agentscope/app/storage/_redis_storage.py:128

team

str = 'agentscope:user:{user_id}:team:{team_id}'

团队字段。声明为 str。

The team field.

源码Source agentscope/app/storage/_redis_storage.py:130

team_index

str = 'agentscope:user:{user_id}:teams'

团队索引字段。声明为 str。

The team index field.

源码Source agentscope/app/storage/_redis_storage.py:131

knowledge_base

str = 'agentscope:user:{user_id}:knowledge_base:{knowledge_base_id}'

知识库字段。声明为 str。

The knowledge base field.

源码Source agentscope/app/storage/_redis_storage.py:133

knowledge_base_index

str = 'agentscope:user:{user_id}:knowledge_bases'

知识库索引字段。声明为 str。

The knowledge base index field.

源码Source agentscope/app/storage/_redis_storage.py:136

knowledge_document

str = 'agentscope:user:{user_id}:knowledge_base:{knowledge_base_id}:document:{document_id}'

知识库文档字段。声明为 str。

The knowledge document field.

源码Source agentscope/app/storage/_redis_storage.py:139

knowledge_document_index

str = 'agentscope:user:{user_id}:knowledge_base:{knowledge_base_id}:documents'

知识库文档索引字段。声明为 str。

The knowledge document index field.

源码Source agentscope/app/storage/_redis_storage.py:144

knowledge_document_global_index

str = 'agentscope:knowledge_documents'

knowledge_document_global_index 字段。声明为 str。

The knowledge document global index field.

源码Source agentscope/app/storage/_redis_storage.py:150
基于官方固定版本源码静态生成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.