Build and run agents you can see, understand and trust.
Python agentchatbotlarge-language-modelsllmllm-agentmcpmulti-agentmulti-modalreact-agentrealtime-agentvoice-agentvoice-assistant
docs(agent): fix copy-paste and mismatched docstrings in agent, state and tool modules (#1989)
NekoPunchdc458d56aafc
diff --git a/src/agentscope/agent/_agent.py b/src/agentscope/agent/_agent.pyindex b16d154a9..2e701ea72 100644--- a/src/agentscope/agent/_agent.py+++ b/src/agentscope/agent/_agent.py@@ -121,23 +121,23 @@ class Agent:toolkit (`Toolkit | None`, optional):The toolkit used for registering tools, MCPs and skills as thesole source.- middlewares (`list[MiddlewareBase] | None`):+ middlewares (`list[MiddlewareBase] | None`, optional):Middlewares applied to the agent to modify its behaviorwithout altering its source code. Supported hook pointsinclude: reply, reasoning, acting, model call, and systemprompt retrieval.- state (`AgentState`):+ state (`AgentState | None`, optional):The agent state. A new state will be created if not provided.offloader (`Offloader | None`, optional):The context offloader. If provided, the compressed context andtool result will be offloaded.- model_config (`ModelConfig`):+ model_config (`ModelConfig | None`, optional):The additional chat model configuration including fallbackmodel and retries.- context_config (`CompressionConfig`):+ context_config (`ContextConfig | None`, optional):The context config for context compression and tool resultcompression.- react_config (`ReActConfig`):+ react_config (`ReActConfig | None`, optional):The config for the reasoning-acting loop."""self.name = name@@ -1327,7 +1327,7 @@ class Agent:"""Execute a single tool call and forward every event into *queue*.Args:- tool_call (`ToolBlockCall`):+ tool_call (`ToolCallBlock`):The tool call to execute.queue (`Queue`):The shared async queue that collects events from all@@ -1694,7 +1694,7 @@ class Agent:message (`str`):The error message to be returned for the tool call.state (`ToolResultState`):- The state of the tool result, which can be "error", "denied",+ The state of the tool result, such as "error" or "denied".Yields:`ToolResultStartEvent \diff --git a/src/agentscope/agent/_config.py b/src/agentscope/agent/_config.pyindex 39190cb27..a530b02dc 100644--- a/src/agentscope/agent/_config.py+++ b/src/agentscope/agent/_config.py@@ -44,8 +44,8 @@ class SummarySchema(BaseModel):"Any promises made to the user"),)- """Whether to execute multiple tool calls in parallel within one- reasoning step."""+ """The important context to preserve across compression, e.g. user+ preferences, domain-specific details and promises made to the user."""class ContextConfig(BaseModel):@@ -101,7 +101,7 @@ class ContextConfig(BaseModel):)"""The string template to present the compressed summary to the agent,which will be formatted with the fields from the- `compression_summary_model`."""+ `summary_schema`."""summary_schema: dict = Field(default_factory=SummarySchema.model_json_schema,diff --git a/src/agentscope/state/_state.py b/src/agentscope/state/_state.pyindex 3e5f216b4..2bda779ae 100644--- a/src/agentscope/state/_state.py+++ b/src/agentscope/state/_state.py@@ -154,9 +154,9 @@ class AgentState(BaseModel):summary: str | list[TextBlock | DataBlock] = """""The compressed summary of the context, which will be prepended to the- context when feed into the LLM."""+ context when fed into the LLM."""context: list[Msg] = Field(default_factory=list)- """The uncompressed conversation context, that will be feed into the LLM"""+ """The uncompressed conversation context, which will be fed into the LLM"""reply_id: str = Field(default_factory=_generate_id)"""The id of the current reply, which is also used as the id of thefinal message of the reply."""diff --git a/src/agentscope/tool/_response.py b/src/agentscope/tool/_response.pyindex 57d834965..db6eed57a 100644--- a/src/agentscope/tool/_response.py+++ b/src/agentscope/tool/_response.py@@ -44,7 +44,7 @@ class ToolChunk(BaseModel):parse the tool result block."""id: str = Field(default_factory=_generate_id)- """The identity of the tool response."""+ """The identity of the tool chunk."""class ToolResponse(BaseModel):