🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
Auto-update documentation after merge [skip ci]
camel-docs-bot8d287a81df98
diff --git a/docs/mintlify/reference/camel.agents.chat_agent.mdx b/docs/mintlify/reference/camel.agents.chat_agent.mdxindex 379fcbf1b..70a344909 100644--- a/docs/mintlify/reference/camel.agents.chat_agent.mdx+++ b/docs/mintlify/reference/camel.agents.chat_agent.mdx@@ -240,6 +240,7 @@ Class for managing conversations of CAMEL Chat Agents.- **tool_execution_timeout** (Optional[float], optional): Timeout for individual tool execution. If None, wait indefinitely.- **mask_tool_output** (Optional[bool]): Whether to return a sanitized placeholder instead of the raw tool output. (default: :obj:`False`)- **pause_event** (Optional[asyncio.Event]): Event to signal pause of the agent's operation. When clear, the agent will pause its execution. (default: :obj:`None`)+- **prune_tool_calls_from_memory** (bool): Whether to clean tool call messages from memory after response generation to save token usage. When enabled, removes FUNCTION/TOOL role messages and ASSISTANT messages with tool_calls after each step. (default: :obj:`False`)<a id="camel.agents.chat_agent.ChatAgent.__init__"></a>@@ -263,7 +264,8 @@ def __init__(stop_event: Optional[threading.Event] = None,tool_execution_timeout: Optional[float] = None,mask_tool_output: bool = False,- pause_event: Optional[asyncio.Event] = None+ pause_event: Optional[asyncio.Event] = None,+ prune_tool_calls_from_memory: bool = False):```diff --git a/docs/mintlify/reference/camel.memories.agent_memories.mdx b/docs/mintlify/reference/camel.memories.agent_memories.mdxindex f140c4721..0259c2901 100644--- a/docs/mintlify/reference/camel.memories.agent_memories.mdx+++ b/docs/mintlify/reference/camel.memories.agent_memories.mdx@@ -79,6 +79,19 @@ def get_context_creator(self):def clear(self):```+<a id="camel.memories.agent_memories.ChatHistoryMemory.clean_tool_calls"></a>++### clean_tool_calls++```python+def clean_tool_calls(self):+```++Removes tool call messages from memory.+This method removes all FUNCTION/TOOL role messages and any ASSISTANT+messages that contain tool_calls in their meta_dict to save token+usage.+<a id="camel.memories.agent_memories.VectorDBMemory"></a>## VectorDBMemorydiff --git a/docs/mintlify/reference/camel.memories.base.mdx b/docs/mintlify/reference/camel.memories.base.mdxindex 2565437f3..dde6766dd 100644--- a/docs/mintlify/reference/camel.memories.base.mdx+++ b/docs/mintlify/reference/camel.memories.base.mdx@@ -184,6 +184,19 @@ def get_context(self):(List[OpenAIMessage], int): A tuple containing the constructedcontext in OpenAIMessage format and the total token count.+<a id="camel.memories.base.AgentMemory.clean_tool_calls"></a>++### clean_tool_calls++```python+def clean_tool_calls(self):+```++Removes tool call messages from memory.+This is an optional method that can be overridden by subclasses+to implement cleaning of tool-related messages. By default, it+does nothing, maintaining backward compatibility.+<a id="camel.memories.base.AgentMemory.__repr__"></a>### __repr__