Skip to content

Tools

Manage messages·

compact the agent's history

  • tool authors · prompt writers
  • 1 min
  • 23 words
  • from the code

In 10 seconds

  • 1 tool in tools/manage_messages.py — compact the agent's history.

manage_messages·

manage_messages(
    action: str = 'stats',
    turns: Optional[str] = None,
    start: Optional[int] = None,
    end: Optional[int] = None,
    role: Optional[str] = None,
    summary_len: int = 100,
    **kwargs,
) -> str

Manage the current agent's conversation history.

source ↗