Skip to main content
Glama

memory_log_conversation

Record complete AI conversation turns with code changes to persistent Markdown journals for maintaining context across sessions.

Instructions

Record one full conversation turn to today's journal.

You MUST pass the complete user message and your entire reply — no truncation, no summary, no "..." or "see above". If your reply is very long, pass the first part here then use memory_log_conversation_append() for the rest.

Args: user_message: The user's full message in this turn. agent_response: Your full reply (complete text, every paragraph). model: The model used for this response (e.g. "claude-4-opus"). code_changes: Optional. Files created/modified, e.g. "- src/foo.py (created)". title: Optional. One-line summary for this turn; if empty, derived from first line of user_message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_messageYes
agent_responseNo
modelNo
code_changesNo
titleNo

Implementation Reference

  • The tool handler for memory_log_conversation, which records a conversation turn to the journal directory.
    async def memory_log_conversation(
        user_message: str,
        agent_response: str = "",
        model: str = "",
        code_changes: str = "",
        title: str = "",
    ) -> str:
        """Record one full conversation turn to today's journal.
    
        You MUST pass the **complete** user message and your **entire** reply — no
        truncation, no summary, no "..." or "see above". If your reply is very long,
        pass the first part here then use memory_log_conversation_append() for the rest.
    
        Args:
            user_message: The user's full message in this turn.
            agent_response: Your full reply (complete text, every paragraph).
            model: The model used for this response (e.g. "claude-4-opus").
            code_changes: Optional. Files created/modified, e.g. "- `src/foo.py` (created)".
            title: Optional. One-line summary for this turn; if empty, derived from first line of user_message.
        """
        journal_dir = _get_journal_dir()
        path = write_turn(
            journal_dir, user_message, agent_response, model, code_changes, title=title
        )
        return f"Recorded in {path.name}"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/liuhao6741/openclaw-memory'

If you have feedback or need assistance with the MCP directory API, please join our Discord server