Skip to content

Commit f305669

Browse files
committed
merge main and fix conflicts
2 parents bc2aaec + 3b21fcb commit f305669

10 files changed

Lines changed: 289 additions & 209 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The AgentScope Ecosystem
7979

8080
## News
8181
<!-- BEGIN NEWS -->
82-
- **[2026-03] `RELS`:** We recently developed and open sourced an AI assistant named [CoPaw](https://github.com/agentscope-ai/CoPaw) (Co Personal Agent Workstation), built upon [AgentScope](https://github.com/agentscope-ai/agentscope), [AgentScope-Runtime](https://github.com/agentscope-ai/agentscope-runtime), and [Reme](https://github.com/agentscope-ai/ReMe).
82+
- **[2026-04] `COMM`:** AgentScope 2.0 is on the way. [Roadmap](https://github.com/orgs/agentscope-ai/projects/2) | [Discussion](https://github.com/agentscope-ai/agentscope/discussions/1441)
8383
- **[2026-02] `FEAT`:** Realtime Voice Agent support. [Example](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/realtime_voice_agent) | [Multi-Agent Realtime Example](https://github.com/agentscope-ai/agentscope/tree/main/examples/workflows/multiagent_realtime) | [Tutorial](https://doc.agentscope.io/tutorial/task_realtime.html)
8484
- **[2026-01] `COMM`:** Biweekly Meetings launched to share ecosystem updates and development plans - join us! [Details & Schedule](https://github.com/agentscope-ai/agentscope/discussions/1126)
8585
- **[2026-01] `FEAT`:** Database support & memory compression in memory module. [Example](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/short_term_memory/memory_compression) | [Tutorial](https://doc.agentscope.io/tutorial/task_memory.html)
@@ -89,7 +89,6 @@ The AgentScope Ecosystem
8989
- **[2025-11] `RELS`:** Alias-Agent for diverse real-world tasks and Data-Juicer Agent for data processing open-sourced. [Alias-Agent](https://github.com/agentscope-ai/agentscope-samples/tree/main/alias) | [Data-Juicer Agent](https://github.com/agentscope-ai/agentscope-samples/tree/main/data_juicer_agent)
9090
- **[2025-11] `INTG`:** Agentic RL via Trinity-RFT library. [Example](https://github.com/agentscope-ai/agentscope/tree/main/examples/tuner/model_tuning) | [Trinity-RFT](https://github.com/agentscope-ai/Trinity-RFT)
9191
- **[2025-11] `INTG`:** ReMe for enhanced long-term memory. [Example](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/long_term_memory/reme)
92-
- **[2025-11] `RELS`:** agentscope-samples repository launched and agentscope-runtime upgraded with Docker/K8s deployment and VNC-powered GUI sandboxes. [Samples](https://github.com/agentscope-ai/agentscope-samples) | [Runtime](https://github.com/agentscope-ai/agentscope-runtime)
9392
<!-- END NEWS -->
9493

9594
[More news →](./docs/NEWS.md)

README_zh.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ AgentScope 生态
7777

7878
## 📢 新闻
7979
<!-- BEGIN NEWS -->
80-
- **[2026-03] `发布`:** 我们最近发布了一个名为 [CoPaw](https://github.com/agentscope-ai/CoPaw)(Co Personal Agent Workstation)的个人助理型产品,它基于 [AgentScope](https://github.com/agentscope-ai/agentscope)[AgentScope-Runtime](https://github.com/agentscope-ai/agentscope-runtime)[Reme](https://github.com/agentscope-ai/ReMe) 构建。
80+
- **[2026-04] `社区`:** AgentScope 2.0 路线图公布,欢迎查看并参与讨论![路线图](https://github.com/orgs/agentscope-ai/projects/2) | [讨论](https://github.com/agentscope-ai/agentscope/discussions/1441)
8181
- **[2026-02] `功能`:** 支持实时语音交互。[样例](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/realtime_voice_agent) | [多智能体实时交互](https://github.com/agentscope-ai/agentscope/tree/main/examples/workflows/multiagent_realtime) | [文档](https://doc.agentscope.io/tutorial/task_realtime.html)
8282
- **[2026-01] `社区`:** AgentScope 双周会议启动,分享生态更新和开发计划 - 欢迎加入![详情与安排](https://github.com/agentscope-ai/agentscope/discussions/1126)
8383
- **[2026-01] `功能`:** 记忆模块新增数据库支持和记忆压缩。[样例](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/short_term_memory/memory_compression) | [教程](https://doc.agentscope.io/tutorial/task_memory.html)
@@ -87,7 +87,6 @@ AgentScope 生态
8787
- **[2025-11] `发布`:** 面向多样化真实任务的 Alias-Agent 和数据处理的 Data-Juicer Agent 开源。[Alias-Agent](https://github.com/agentscope-ai/agentscope-samples/tree/main/alias) | [Data-Juicer Agent](https://github.com/agentscope-ai/agentscope-samples/tree/main/data_juicer_agent)
8888
- **[2025-11] `集成`:** 通过 Trinity-RFT 库实现智能体强化学习。[样例](https://github.com/agentscope-ai/agentscope/tree/main/examples/tuner/model_tuning) | [Trinity-RFT](https://github.com/agentscope-ai/Trinity-RFT)
8989
- **[2025-11] `集成`:** ReMe 增强长期记忆。[样例](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/long_term_memory/reme)
90-
- **[2025-11] `发布`:** agentscope-samples 样例库上线,agentscope-runtime 升级支持 Docker/K8s 部署和 VNC 图形沙盒。[样例库](https://github.com/agentscope-ai/agentscope-samples) | [Runtime](https://github.com/agentscope-ai/agentscope-runtime)
9190
<!-- END NEWS -->
9291

9392
[更多新闻 →](./docs/NEWS_zh.md)

assets/images/agentscope.png

1.42 MB
Loading

docs/NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<!-- The first 10 items are automatically synced to README.md and README_zh.md via GitHub Actions. -->
33
<!-- To update news in READMEs, modify this file and push to trigger the workflow. -->
44

5+
- **[2026-04] `COMM`:** AgentScope 2.0 is on the way. [Roadmap](https://github.com/orgs/agentscope-ai/projects/2) | [Discussion](https://github.com/agentscope-ai/agentscope/discussions/1441)
56
- **[2026-02] `FEAT`:** Realtime Voice Agent support. [Example](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/realtime_voice_agent) | [Multi-Agent Realtime Example](https://github.com/agentscope-ai/agentscope/tree/main/examples/workflows/multiagent_realtime) | [Tutorial](https://doc.agentscope.io/tutorial/task_realtime.html)
67
- **[2026-01] `COMM`:** Biweekly Meetings launched to share ecosystem updates and development plans - join us! [Details & Schedule](https://github.com/agentscope-ai/agentscope/discussions/1126)
78
- **[2026-01] `FEAT`:** Database support & memory compression in memory module. [Example](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/short_term_memory/memory_compression) | [Tutorial](https://doc.agentscope.io/tutorial/task_memory.html)

docs/NEWS_zh.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<!-- The first 10 items are automatically synced to README.md and README_zh.md via GitHub Actions. -->
33
<!-- To update news in READMEs, modify this file and push to trigger the workflow. -->
44

5+
- **[2026-04] `社区`:** AgentScope 2.0 路线图公布,欢迎查看并参与讨论![路线图](https://github.com/orgs/agentscope-ai/projects/2) | [讨论](https://github.com/agentscope-ai/agentscope/discussions/1441)
56
- **[2026-02] `功能`:** 支持实时语音交互。[样例](https://github.com/agentscope-ai/agentscope/tree/main/examples/agent/realtime_voice_agent) | [多智能体实时交互](https://github.com/agentscope-ai/agentscope/tree/main/examples/workflows/multiagent_realtime) | [文档](https://doc.agentscope.io/tutorial/task_realtime.html)
67
- **[2026-01] `社区`:** AgentScope 双周会议启动,分享生态更新和开发计划 - 欢迎加入![详情与安排](https://github.com/agentscope-ai/agentscope/discussions/1126)
78
- **[2026-01] `功能`:** 记忆模块新增数据库支持和记忆压缩。[样例](https://github.com/agentscope-ai/agentscope/tree/main/examples/functionality/short_term_memory/memory_compression) | [教程](https://doc.agentscope.io/tutorial/task_memory.html)

examples/agent/deep_research_agent/built_in_prompt/promptmodule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class ReflectFailure(BaseModel):
127127
"the failed subtask should "
128128
"be further decomposed; otherwise, 'false'.",
129129
},
130-
"rephrased_plan": {
130+
"failed_subtask": {
131131
"type": "string",
132132
"description": "Information about whether "
133133
"the failed subtask requires "

examples/agent/deep_research_agent/deep_research_agent.py

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949
_LOG_DIR,
5050
f"log_{datetime.now().strftime('%y%m%d%H%M%S')}.md",
5151
)
52-
os.makedirs(_LOG_DIR, exist_ok=True)
53-
setup_logger(level="INFO", filepath=_LOG_PATH)
5452

5553

5654
class SubTaskItem(BaseModel):
@@ -188,6 +186,27 @@ def __init__(
188186
self.toolkit.register_tool_function(
189187
self.summarize_intermediate_results,
190188
)
189+
# set up a logger to record the researching process
190+
os.makedirs(_LOG_DIR, exist_ok=True)
191+
setup_logger(level="INFO", filepath=_LOG_PATH)
192+
193+
def _extract_text_from_blocks(
194+
self,
195+
blocks: list,
196+
) -> str:
197+
"""Extract the text content from the output blocks
198+
returned by the model.
199+
200+
This method is designed to make deep research agents
201+
applicable to both thinking and non-thinking models.
202+
"""
203+
for block in blocks:
204+
if block.get("type") == "text":
205+
return block["text"]
206+
raise ValueError(
207+
f"No text block found in model output. "
208+
f"Received block types: {[b.get('type') for b in blocks]}",
209+
)
191210

192211
async def _ensure_mcp_initialized(self) -> None:
193212
"""Ensure MCP client is properly initialized.
@@ -770,9 +789,11 @@ async def summarize_intermediate_results(self) -> ToolResponse:
770789
],
771790
stream=self.model.stream,
772791
)
773-
self.current_subtask[-1].working_plan = blocks[0][
774-
"text"
775-
] # type: ignore[index]
792+
self.current_subtask[
793+
-1
794+
].working_plan = self._extract_text_from_blocks(
795+
blocks,
796+
) # type: ignore[index]
776797
report_prefix = "#" * len(self.current_subtask)
777798
summarize_sys_prompt = self.prompt_dict[
778799
"summarize_sys_prompt"
@@ -810,7 +831,9 @@ async def summarize_intermediate_results(self) -> ToolResponse:
810831
],
811832
stream=self.model.stream,
812833
)
813-
intermediate_report = blocks[0]["text"] # type: ignore[index]
834+
intermediate_report = self._extract_text_from_blocks(
835+
blocks,
836+
) # type: ignore[index]
814837

815838
# Write the intermediate report
816839
intermediate_report_path = os.path.join(
@@ -876,7 +899,7 @@ async def _generate_deepresearch_report(
876899
The expected output items of the original task.
877900
"""
878901
reporting_sys_prompt = self.prompt_dict["reporting_sys_prompt"]
879-
reporting_sys_prompt.format_map(
902+
reporting_sys_prompt = reporting_sys_prompt.format_map(
880903
{
881904
"original_task": self.user_query,
882905
"checklist": checklist,
@@ -928,7 +951,9 @@ async def _generate_deepresearch_report(
928951
msgs=msgs,
929952
stream=self.model.stream,
930953
)
931-
final_report_content = blocks[0]["text"] # type: ignore[index]
954+
final_report_content = self._extract_text_from_blocks(
955+
blocks,
956+
) # type: ignore[index]
932957
logger.info(
933958
"The final Report is generated: %s",
934959
final_report_content,
@@ -970,7 +995,7 @@ async def _summarizing(self) -> Msg:
970995
ensure_ascii=False,
971996
),
972997
)
973-
self.memory.add(summarize_result)
998+
await self.memory.add(summarize_result)
974999
return summarize_result
9751000

9761001
async def reflect_failure(self) -> ToolResponse:

0 commit comments

Comments
 (0)