Skip to content

[Bug] Unknown agent error: NotImplementedError: The delete_by_mark method is not implemented in AgentScopeSessionHistoryMemory class. #425

@hezhefly

Description

@hezhefly

agentscope版本:1.0.13
agentscope-runtime版本:1.0.5

from agentscope_runtime.adapters.agentscope.memory import AgentScopeSessionHistoryMemory会触发agentscope报错:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/agentscope_runtime/engine/runner.py", line 300, in stream_query
    async for event in stream_adapter(
  File "/usr/local/lib/python3.11/site-packages/agentscope_runtime/adapters/agentscope/stream.py", line 53, in adapt_agentscope_message_stream
    async for msg, last in source_stream:
  File "/usr/local/lib/python3.11/site-packages/agentscope_runtime/engine/runner.py", line 175, in _call_handler_streaming
    async for item in result:
  File "/app/core/component/agentscope_component/runner.py", line 51, in query_handler
    async for item in self.agent_handler(
  File "/app/apps/capability_runtime/view.py", line 45, in capability_func
    async for msg, last in stream_printing_messages(
  File "/usr/local/lib/python3.11/site-packages/agentscope/pipeline/_functional.py", line 192, in stream_printing_messages
    raise exception from None
  File "/usr/local/lib/python3.11/site-packages/agentscope/agent/_agent_base.py", line 451, in __call__
    reply_msg = await self.reply(*args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/agentscope/agent/_agent_meta.py", line 120, in async_wrapper
    current_output = await original_func(
                     ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/agentscope/tracing/_trace.py", line 392, in wrapper
    return await func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/agentscope/agent/_react_agent.py", line 437, in reply
    msg_reasoning = await self._reasoning(tool_choice)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/agentscope/agent/_agent_meta.py", line 120, in async_wrapper
    current_output = await original_func(
                     ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/agentscope/agent/_react_agent.py", line 563, in _reasoning
    await self.memory.delete_by_mark(mark=_MemoryMark.HINT)
  File "/usr/local/lib/python3.11/site-packages/agentscope/memory/_working_memory/_base.py", line 86, in delete_by_mark
    raise NotImplementedError(
NotImplementedError: The delete_by_mark method is not implemented in AgentScopeSessionHistoryMemory class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions