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

AgentData

class AgentData(BaseModel)
源码Source agentscope/app/storage/_model/_agent.py:94–182

智能体数据模型。位于 agentscope.app.storage 包。核心成员包括 context_config、react_config、invite_config。

The agent data model. Declared in agentscope.app.storage.

属性摘要Property Summary

属性Property说明Description
context_config
获取上下文配置。
Return the deprecated flat context configuration.
react_config
获取ReAct 配置。
Return the deprecated flat ReAct configuration.
invite_config
获取邀请配置。
Return the deprecated flat invite configuration.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
idSkipJsonSchema[str]
标识字段。
Field(description='Unique agent id', default_factory=_generate_id)
namestr
智能体的名称。
Field(description='The name of the agent.', title='Name')
system_promptstr
系统提示词用于智能体。
Field(default="You're a helpful assistant.", description='The system prompt for the agent.', title='System Prompt', json_schema_extra={'format': 'textarea'})
chat_configAgentChatConfig
设置用于智能体's 文本会话。
Field(default_factory=AgentChatConfig, description="The settings for the agent's text conversations.", title='Chat Config')

属性详情Attribute Detail

id

SkipJsonSchema[str] = Field(description='Unique agent id', default_factory=_generate_id)

标识字段。声明为 SkipJsonSchema[str]。

Unique agent id

源码Source agentscope/app/storage/_model/_agent.py:97

name

str = Field(description='The name of the agent.', title='Name')

智能体的名称。

The name of the agent.

源码Source agentscope/app/storage/_model/_agent.py:110

system_prompt

str = Field(default="You're a helpful assistant.", description='The system prompt for the agent.', title='System Prompt', json_schema_extra={'format': 'textarea'})

系统提示词用于智能体。

The system prompt for the agent.

源码Source agentscope/app/storage/_model/_agent.py:115

chat_config

AgentChatConfig = Field(default_factory=AgentChatConfig, description="The settings for the agent's text conversations.", title='Chat Config')

设置用于智能体's 文本会话。

The settings for the agent's text conversations.

源码Source agentscope/app/storage/_model/_agent.py:124

属性详情Property Detail

context_config

def context_config() -> ContextConfig

获取上下文配置。

Return the deprecated flat context configuration.

返回Returns ContextConfig
返回ContextConfig。Returns context config.
源码Source agentscope/app/storage/_model/_agent.py:131–139

react_config

def react_config() -> ReActConfig

获取ReAct 配置。

Return the deprecated flat ReAct configuration.

返回Returns ReActConfig
返回ReActConfig。Returns ReAct config.
源码Source agentscope/app/storage/_model/_agent.py:142–150

invite_config

def invite_config() -> InviteConfig

获取邀请配置。

Return the deprecated flat invite configuration.

返回Returns InviteConfig
返回InviteConfig。Returns invite config.
源码Source agentscope/app/storage/_model/_agent.py:153–161
基于官方固定版本源码静态生成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.