From 9714d711b3907a4f1b58cf250104440e3c36dc94 Mon Sep 17 00:00:00 2001 From: Cameron Pfiffer Date: Wed, 24 Sep 2025 13:39:08 -0700 Subject: [PATCH] Update X tool registration to use x_config.yaml and remove user note tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Switch from config_loader.get_letta_config() to x.get_x_letta_config() - Remove x_user_note_* tools from registration (attach/detach remain) - Fixes X bot tool registration to use correct configuration file 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- register_x_tools.py | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/register_x_tools.py b/register_x_tools.py index 985c899..2552620 100644 --- a/register_x_tools.py +++ b/register_x_tools.py @@ -5,14 +5,12 @@ from typing import List from letta_client import Letta from rich.console import Console from rich.table import Table -from config_loader import get_letta_config +from x import get_x_letta_config # Import standalone functions and their schemas from tools.blocks import ( - attach_x_user_blocks, detach_x_user_blocks, - x_user_note_append, x_user_note_replace, x_user_note_set, x_user_note_view, - AttachXUserBlocksArgs, DetachXUserBlocksArgs, - XUserNoteAppendArgs, XUserNoteReplaceArgs, XUserNoteSetArgs, XUserNoteViewArgs + attach_x_user_blocks, detach_x_user_blocks, + AttachXUserBlocksArgs, DetachXUserBlocksArgs ) from tools.halt import halt_activity, HaltArgs from tools.ignore import ignore_notification, IgnoreNotificationArgs @@ -29,7 +27,7 @@ from tools.x_post import post_to_x, PostToXArgs # Import X search tool from tools.search_x import search_x_posts, SearchXArgs -letta_config = get_letta_config() +letta_config = get_x_letta_config() logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) console = Console() @@ -81,30 +79,6 @@ X_TOOL_CONFIGS = [ "description": "Detach X user-specific memory blocks from the agent. Blocks are preserved for later use.", "tags": ["memory", "blocks", "user", "x", "twitter"] }, - { - "func": x_user_note_append, - "args_schema": XUserNoteAppendArgs, - "description": "Append a note to an X user's memory block. Creates the block if it doesn't exist.", - "tags": ["memory", "blocks", "user", "append", "x", "twitter"] - }, - { - "func": x_user_note_replace, - "args_schema": XUserNoteReplaceArgs, - "description": "Replace text in an X user's memory block.", - "tags": ["memory", "blocks", "user", "replace", "x", "twitter"] - }, - { - "func": x_user_note_set, - "args_schema": XUserNoteSetArgs, - "description": "Set the complete content of an X user's memory block.", - "tags": ["memory", "blocks", "user", "set", "x", "twitter"] - }, - { - "func": x_user_note_view, - "args_schema": XUserNoteViewArgs, - "description": "View the content of an X user's memory block.", - "tags": ["memory", "blocks", "user", "view", "x", "twitter"] - }, # X thread tool { -- 2.51.2