### Install Yaade Skill Source: https://github.com/reyanshgupta/yaade/blob/main/setup/claude-code-skill/README.md Platform-specific setup scripts for installing the Yaade skill. ```bash ./setup/claude-code-skill/setup-skill-macos.sh ``` ```batch setup\claude-code-skill\setup-skill-windows.bat ``` -------------------------------- ### Yaade Project Setup Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Clone the repository and install dependencies using UV. ```bash git clone https://github.com/reyanshgupta/yaade.git cd yaade uv sync ``` -------------------------------- ### Clone Yaade Repository and Install from Source Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Steps to clone the Yaade repository and install it from the source code. This method includes running an install script that checks Python version and installs dependencies. ```bash git clone https://github.com/reyanshgupta/yaade.git cd yaade ./install.sh ``` -------------------------------- ### Install Yaade from PyPI Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Use this command to install the Yaade package using pip. This is the recommended installation method. ```bash pip install yaade ``` -------------------------------- ### Manual Installation Source: https://github.com/reyanshgupta/yaade/blob/main/setup/claude-code-skill/README.md Manual steps to create the skill directory and copy the required metadata file. ```bash mkdir -p ~/.claude/skills/yaade cp setup/claude-code-skill/SKILL.md ~/.claude/skills/yaade/ ``` -------------------------------- ### Configure Yaade MCP for Claude Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Configuration examples for Claude's MCP server settings, depending on whether Yaade is installed via pip or from source. ```json { "mcpServers": { "yaade": { "type": "stdio", "command": "yaade", "args": ["serve"], "env": {} } } } ``` ```json { "mcpServers": { "yaade": { "type": "stdio", "command": "uv", "args": ["run", "yaade", "serve"], "cwd": "/path/to/yaade", "env": {} } } } ``` -------------------------------- ### Claude Desktop MCP Configuration (source install) Source: https://github.com/reyanshgupta/yaade/blob/main/README.md JSON configuration for Claude Desktop when Yaade is installed from source. This specifies the command to run Yaade using uv as an MCP server, including the path to the Yaade directory. ```json { "mcpServers": { "yaade": { "command": "uv", "args": ["run", "--directory", "/path/to/yaade", "yaade", "serve"], "env": { "YAADE_LOG_LEVEL": "INFO" } } } } ``` -------------------------------- ### Setup MCP for OpenCode (macOS) Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Shell script to automatically configure MCP integration for OpenCode on macOS. ```bash ./setup/opencode/setup-mcp-macos.sh ``` -------------------------------- ### AI Agent Setup for Yaade Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Set up symlinks for AI coding assistants or manually link specific tools. ```bash # Setup symlinks for common tools ./.agents/setup.sh ``` ```bash # Or manually symlink specific tools ln -sf .agents/CLAUDE.md CLAUDE.md ln -sf .agents/.cursorrules .cursorrules ``` -------------------------------- ### Setup MCP for Cursor (macOS) Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Shell script to automatically configure MCP integration for Cursor on macOS. ```bash ./setup/cursor/setup-mcp-macos.sh ``` -------------------------------- ### Setup MCP for Claude Desktop (macOS) Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Shell script to automatically configure MCP integration for Claude Desktop on macOS. ```bash ./setup/claude-desktop/setup-mcp-macos.sh ``` -------------------------------- ### Launch TUI Source: https://context7.com/reyanshgupta/yaade/llms.txt Launches the interactive terminal user interface for memory management, configuration, and setup. ```APIDOC ## Launch TUI ### Description Launch the interactive terminal user interface for memory management, configuration, and setup. ### Command ```bash yaade ``` ### Features The TUI provides: - Memory Management: Add, edit, delete, search memories. - Setup: Configure MCP integration with Claude Desktop, Claude Code, OpenCode, Cursor. - Settings: Select embedding model, configure themes, storage settings. ### Keyboard Shortcuts - `1`, `2`, `3`: Navigate to menu items - `j`/`k` or `↑`/`↓`: Move selection - `Enter`: Select item - `Ctrl+P`: Switch themes - `a`: Add new memory (in Memory Management) - `e`: Edit selected memory - `d`: Delete selected memory - `r`: Refresh list - `Q`: Quit ``` -------------------------------- ### Uninstall Yaade from Source Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Command to uninstall Yaade when it was installed from source. ```bash ./uninstall.sh ``` -------------------------------- ### Configure Yaade MCP for Cursor Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Configuration for Cursor when Yaade is installed from source. ```json { "mcpServers": { "yaade": { "command": "uv", "args": ["run", "yaade", "serve"], "cwd": "/path/to/yaade", "env": {} } } } ``` -------------------------------- ### Claude Desktop MCP Configuration (pip install) Source: https://github.com/reyanshgupta/yaade/blob/main/README.md JSON configuration for Claude Desktop when Yaade is installed via pip. This specifies the command to run Yaade as an MCP server. ```json { "mcpServers": { "yaade": { "command": "yaade", "args": ["serve"], "env": { "YAADE_LOG_LEVEL": "INFO" } } } } ``` -------------------------------- ### Setup Claude Code Skill (macOS/Linux) Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Shell script to set up the Claude Code Skill on macOS and Linux. ```bash ./setup/claude-code-skill/setup-skill-macos.sh ``` -------------------------------- ### Setup MCP for Claude Code (macOS) Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Shell script to automatically configure MCP integration for Claude Code on macOS. ```bash ./setup/claude-code/setup-mcp-macos.sh ``` -------------------------------- ### Run Yaade MCP Server Source: https://context7.com/reyanshgupta/yaade/llms.txt Start the Yaade MCP server in headless mode for integration with Claude Desktop/Code via stdio transport. Server logs go to stderr, while MCP JSON-RPC uses stdout. ```bash yaade serve ``` -------------------------------- ### Configure Claude Code for Yaade MCP (Source Install) Source: https://context7.com/reyanshgupta/yaade/llms.txt Configure Claude Code to connect to the Yaade MCP server using stdio transport. This configuration is for installations from source. ```json { "mcpServers": { "yaade": { "type": "stdio", "command": "uv", "args": ["run", "yaade", "serve"], "cwd": "/path/to/yaade", "env": {} } } } ``` -------------------------------- ### Get Memory API Source: https://context7.com/reyanshgupta/yaade/llms.txt Retrieves a specific memory by its unique identifier, returning its full content and metadata. ```APIDOC ## get_memory ### Description Retrieve a specific memory by its unique identifier. Returns the full memory content, metadata, and embedding vector. ### Method GET ### Endpoint /get_memory/{memory_id} ### Parameters #### Path Parameters - **memory_id** (string) - Required - The unique identifier of the memory to retrieve. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the memory. - **content** (string) - The content of the memory. - **metadata** (object) - Metadata associated with the memory (type, source, tags, importance, created_at). - **embedding** (array of floats) - The vector embedding of the memory content. #### Not Found Response (404) - Returns `null` if the memory with the specified ID is not found. ### Response Example ```json { "id": "550e8400-e29b-41d4-a716-446655440000", "content": "User prefers TypeScript over JavaScript for new projects", "metadata": { "type": "text", "source": "claude", "tags": "preferences,programming,languages", "importance": 8.5, "created_at": "2024-01-15T10:30:00.123456" }, "embedding": [0.0234, -0.0567, 0.1234, ...] } ``` ### Not Found Response Example ```json null ``` ``` -------------------------------- ### Get Supported Model Information Source: https://context7.com/reyanshgupta/yaade/llms.txt Retrieve detailed information about a specific supported embedding model, including its ID, dimensions, and size. ```python info = EmbeddingService.get_supported_model_info("all-MiniLM-L6-v2") ``` -------------------------------- ### Configure Claude Code for Yaade MCP Source: https://context7.com/reyanshgupta/yaade/llms.txt Configure Claude Code to connect to the Yaade MCP server using stdio transport. This configuration is for installations via pip. ```json { "mcpServers": { "yaade": { "type": "stdio", "command": "yaade", "args": ["serve"], "env": {} } } } ``` -------------------------------- ### Get Embedding Dimension Source: https://context7.com/reyanshgupta/yaade/llms.txt Retrieve the dimensionality of the embeddings generated by the currently loaded model. This is useful for understanding vector sizes. ```python dim = embedding_service.get_embedding_dimension() ``` -------------------------------- ### Configure Server Settings Source: https://context7.com/reyanshgupta/yaade/llms.txt Access configuration values and override defaults using environment variables prefixed with YAADE_. ```python from app.models.config import ServerConfig # Load configuration (reads from ~/.yaade/config.json, then env vars) config = ServerConfig() # Access configuration values print(config.data_dir) # Path: ~/.yaade print(config.embedding_model_name) # str: "all-MiniLM-L6-v2" print(config.embedding_batch_size) # int: 32 print(config.embedding_max_seq_length) # int: 512 print(config.host) # str: "localhost" print(config.port) # int: 8000 print(config.log_level) # str: "INFO" # Derived paths print(config.chroma_path) # Path: ~/.yaade/chroma print(config.sqlite_path) # Path: ~/.yaade/metadata.db # Environment variable overrides (YAADE_ prefix): # YAADE_DATA_DIR=/custom/path # YAADE_EMBEDDING_MODEL_NAME=all-mpnet-base-v2 # YAADE_EMBEDDING_BATCH_SIZE=64 # YAADE_HOST=0.0.0.0 # YAADE_PORT=9000 # YAADE_LOG_LEVEL=DEBUG ``` -------------------------------- ### Download Embedding Model Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Manually download an embedding model for local use. Ensure sufficient disk space. ```bash yaade download-model download all-MiniLM-L6-v2 ``` -------------------------------- ### Download All Supported Embedding Models Source: https://context7.com/reyanshgupta/yaade/llms.txt Download all embedding models supported by Yaade. This can be useful for ensuring all capabilities are available. ```bash yaade download-model all ``` -------------------------------- ### List Available Embedding Models Source: https://context7.com/reyanshgupta/yaade/llms.txt View all available embedding models and their cache status. This command helps in managing which models are downloaded and ready for use. ```bash yaade download-model list ``` -------------------------------- ### Execute memory cleanup Source: https://context7.com/reyanshgupta/yaade/llms.txt Applies approved cleanup actions to the database. Requires confirm_deletion to be set to True to proceed with permanent changes. ```python # MCP tool call parameters execute_memory_cleanup( actions_to_execute=["exact_duplicates", "near_duplicates"], # Actions to perform analysis_id="optional-reference-id", # For audit trail confirm_deletion=True # REQUIRED: Must be True ) ``` -------------------------------- ### Analyze memory cleanup Source: https://context7.com/reyanshgupta/yaade/llms.txt Performs a non-destructive preview of duplicate detection and consolidation opportunities. Requires setting similarity and consolidation thresholds. ```python # MCP tool call parameters analyze_memory_cleanup( similarity_threshold=0.85, # Threshold for duplicate detection (0.95 = very similar) consolidation_threshold=0.70 # Threshold for consolidation (0.85 = can be merged) ) ``` -------------------------------- ### Set Environment Variables Source: https://context7.com/reyanshgupta/yaade/llms.txt Configure Yaade runtime behavior using shell environment variables. ```bash # Data storage location (default: ~/.yaade) export YAADE_DATA_DIR=~/.yaade # Embedding model selection (default: all-MiniLM-L6-v2) # Options: all-MiniLM-L6-v2, all-MiniLM-L12-v2, all-mpnet-base-v2, # paraphrase-MiniLM-L6-v2, multi-qa-MiniLM-L6-cos-v1, ``` -------------------------------- ### Yaade CLI Commands Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Common command-line interface commands for Yaade, including launching the TUI, running the MCP server, and showing version or help information. ```bash yaade yaade serve yaade --version, -v yaade --help ``` -------------------------------- ### Manage Vector Storage with ChromaDB Source: https://context7.com/reyanshgupta/yaade/llms.txt Perform CRUD operations and semantic searches on memory embeddings using the VectorStore interface. ```python from app.storage.vector_store import VectorStore from app.models.memory import Memory, MemoryType, MemorySource from datetime import datetime import uuid # Initialize vector store vector_store = VectorStore(persist_directory="/path/to/.yaade/chroma") # Create and add a memory memory = Memory( id=str(uuid.uuid4()), content="User prefers TypeScript over JavaScript", type=MemoryType.TEXT, source=MemorySource.CLAUDE, tags=["preferences", "programming"], importance=8.5, metadata={"context": "project discussion"}, embedding=[0.1, 0.2, ...], # 384 floats from EmbeddingService updated_at=None ) await vector_store.add_memory(memory) # Search for similar memories results = await vector_store.search_similar( query_embedding=[0.1, 0.2, ...], # 384 floats n_results=10, filter_metadata={"tags": {"$contains": "preferences"}} ) # Returns: {"ids": [[...]], "documents": [[...]], "metadatas": [[...]], "distances": [[...]]} # Get memory by ID memory_data = await vector_store.get_memory_by_id("memory-uuid") # Returns: {"id": "...", "content": "...", "metadata": {...}, "embedding": [...]} # Delete memory success = await vector_store.delete_memory("memory-uuid") # Returns: True if deleted, False if error # Count total memories count = await vector_store.count_memories() # Returns: int # Get all memories all_memories = await vector_store.get_all_memories(limit=100) # Returns: {"ids": [...], "documents": [...], "metadatas": [...]} ``` -------------------------------- ### Initialize EmbeddingService Source: https://context7.com/reyanshgupta/yaade/llms.txt Initialize the EmbeddingService with a specific sentence-transformers model. This service is used for generating text embeddings. ```python from app.search.embeddings import EmbeddingService embedding_service = EmbeddingService(model_name="all-MiniLM-L6-v2") ``` -------------------------------- ### Configure Yaade Environment Variables Source: https://context7.com/reyanshgupta/yaade/llms.txt Set environment variables to configure Yaade's embedding model, batch size, sequence length, server host and port, logging level, and TUI theme. Defaults are provided for most settings. ```bash export YAADE_EMBEDDING_MODEL_NAME=all-MiniLM-L6-v2 # Batch size for embedding generation (default: 32) export YAADE_EMBEDDING_BATCH_SIZE=32 # Maximum sequence length for embeddings (default: 512) export YAADE_EMBEDDING_MAX_SEQ_LENGTH=512 # Server host (default: localhost) export YAADE_HOST=localhost # Server port (default: 8000) export YAADE_PORT=8000 # Logging level (default: INFO) # Options: DEBUG, INFO, WARNING, ERROR export YAADE_LOG_LEVEL=INFO # TUI theme (default: cyberpunk) # Options: cyberpunk, cyberpunk_soft, neon_nights export YAADE_THEME=cyberpunk ``` -------------------------------- ### Execute Memory Cleanup Source: https://context7.com/reyanshgupta/yaade/llms.txt Executes approved memory cleanup actions including duplicate removal and consolidation. Requires explicit confirmation to proceed with permanent changes. ```APIDOC ## execute_memory_cleanup ### Description Execute approved memory cleanup actions including duplicate removal and consolidation. Requires explicit confirmation to proceed with permanent changes. Always run analyze_memory_cleanup first to review proposed changes. ### Method MCP tool call ### Parameters #### Request Body - **actions_to_execute** (array of strings) - Required - Actions to perform (e.g., `["exact_duplicates", "near_duplicates"]`). - **analysis_id** (string) - Optional - For audit trail. - **confirm_deletion** (boolean) - Required - Must be `True` to proceed with permanent changes. ### Response #### Success Response (200) - **status** (string) - Indicates the cleanup completion status. - **execution_results** (object) - Details of the executed actions. - **executed_actions** (array) - List of actions that were executed. - **results** (object) - Specific results for each executed action. - **final_memory_count** (integer) - The total number of memories after cleanup. - **analysis_reference** (string) - Reference to the analysis performed prior to execution. - **timestamp** (string) - Timestamp of the cleanup execution. #### Success Response Example ```json { "status": "cleanup_completed", "execution_results": { "executed_actions": ["exact_duplicates", "near_duplicates"], "results": { "exact_duplicates": {"deleted_count": 3, "errors": []}, "near_duplicates": {"deleted_count": 5, "errors": []} }, "errors": [] }, "final_memory_count": 142, "analysis_reference": "optional-reference-id", "timestamp": "2024-01-15T12:00:00.000000" } ``` #### Confirmation Required Response - **error** (string) - Message indicating confirmation is required. - **status** (string) - Status indicating confirmation is required. - **warning** (string) - Warning about the permanent nature of the operation. #### Confirmation Required Response Example ```json { "error": "Cleanup not executed - must set confirm_deletion=True to proceed with permanent changes", "status": "confirmation_required", "warning": "This operation will permanently delete duplicates or consolidate memories in your database" } ``` #### Invalid Actions Response - **error** (string) - Message indicating invalid actions were provided. - **status** (string) - Status indicating the operation failed. #### Invalid Actions Response Example ```json { "error": "Invalid actions: [\"invalid_action\"]", "status": "failed" } ``` ``` -------------------------------- ### Check Embedding Model Cache Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Verify if a specific embedding model is already downloaded and cached locally. ```bash yaade download-model check all-MiniLM-L6-v2 ``` -------------------------------- ### Yaade Model Management CLI Commands Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Commands for managing embedding models with Yaade. This includes listing, downloading, and checking the cache status of models. ```bash yaade download-model yaade download-model list yaade download-model download yaade download-model check yaade download-model all yaade download-model all --force ``` -------------------------------- ### Download a Specific Embedding Model Source: https://context7.com/reyanshgupta/yaade/llms.txt Download a particular embedding model for use with Yaade. Ensure you have sufficient disk space and network bandwidth for the download. ```bash yaade download-model download all-mpnet-base-v2 ``` -------------------------------- ### Force Re-download All Embedding Models Source: https://context7.com/reyanshgupta/yaade/llms.txt Force a re-download of all embedding models, including those already cached. Use this if you suspect model corruption or want the latest versions. ```bash yaade download-model all --force ``` -------------------------------- ### Generate Query Embedding (Async) Source: https://context7.com/reyanshgupta/yaade/llms.txt Generate an embedding vector specifically for a search query, optimized for retrieval tasks. This is typically used to find similar texts. ```python query_embedding = await embedding_service.encode_query("programming preferences") ``` -------------------------------- ### Running Yaade Tests Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Execute tests using pytest, with an option to include code coverage. ```bash uv run pytest ``` ```bash uv run pytest --cov=app ``` -------------------------------- ### Launch Yaade TUI Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Command to launch the Yaade interactive terminal interface. From here, users can manage memories, configure MCP integration, select embedding models, and customize themes. ```bash yaade ``` -------------------------------- ### Analyze Memory Cleanup Source: https://context7.com/reyanshgupta/yaade/llms.txt Analyzes memories for duplicate detection and consolidation opportunities without making any changes. This is a non-destructive preview operation. ```APIDOC ## analyze_memory_cleanup ### Description Analyze memories for duplicate detection and consolidation opportunities without making any changes. Identifies exact duplicates, near-duplicates (using embedding similarity), and groups of related memories that can be merged. This is a non-destructive preview operation. ### Method MCP tool call ### Parameters #### Request Body - **similarity_threshold** (float) - Optional - Threshold for duplicate detection (0.95 = very similar) - **consolidation_threshold** (float) - Optional - Threshold for consolidation (0.85 = can be merged) ### Response #### Success Response (200) - **status** (string) - Indicates the analysis completion status. - **analysis** (object) - Contains detailed analysis results. - **total_memories** (integer) - Total number of memories analyzed. - **analysis** (object) - Breakdown of analysis findings. - **exact_duplicates** (array) - List of exact duplicate memory groups. - **near_duplicates** (array) - List of near-duplicate memory groups. - **consolidation_groups** (array) - List of memory groups suitable for consolidation. - **proposed_actions** (object) - Summary of proposed cleanup actions. - **estimated_cleanup** (object) - Estimated impact of cleanup operations. - **next_steps** (string) - Guidance on the next actions to take. - **available_actions** (array) - List of available cleanup actions. #### Response Example ```json { "status": "analysis_complete", "analysis": { "total_memories": 150, "analysis": { "exact_duplicates": [ { "type": "exact", "confidence": 1.0, "memories": [ {"id": "id1", "content": "User likes Python...", "importance": 5.0}, {"id": "id2", "content": "User likes Python...", "importance": 3.0} ], "primary_memory": {"id": "id1", "content": "User likes Python..."}, "duplicates_to_remove": ["id2"] } ], "near_duplicates": [ { "type": "near_duplicate", "confidence": 0.92, "memories": [...], "primary_memory": {...}, "duplicates_to_remove": [...] } ], "consolidation_groups": [ { "reason": "Similar memories with tag: programming", "memory_count": 5, "memories": [...], "consolidated_content_preview": "[1] First memory... [2] Second memory..." } ] }, "proposed_actions": { "delete_exact_duplicates": 3, "delete_near_duplicates": 5, "consolidate_groups": 2 }, "estimated_cleanup": { "memories_to_delete": 8, "memories_to_consolidate": 10, "final_count": 132 } }, "next_steps": "Review the proposed actions and use execute_memory_cleanup to apply specific cleanup operations.", "available_actions": ["exact_duplicates", "near_duplicates", "consolidation"] } ``` #### Error Response - **memory_id** (string) - Identifier for the memory. - **status** (string) - Indicates the error status. - **error** (string) - Description of the error. - **timestamp** (string) - Timestamp of the error. #### Error Response Example ```json { "memory_id": "invalid-id", "status": "not_found", "timestamp": "2024-01-15T11:00:00.000000" } ``` ``` -------------------------------- ### execute_memory_cleanup Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Executes memory cleanup actions based on analysis. ```APIDOC ## execute_memory_cleanup ### Description Execute cleanup with confirmation. ### Parameters - **actions_to_execute** (list) - Required - exact_duplicates, near_duplicates, consolidation - **analysis_id** (string) - Optional - Reference to previous analysis - **confirm_deletion** (bool) - Required - Must be True to proceed ``` -------------------------------- ### Search memories via semantic similarity Source: https://context7.com/reyanshgupta/yaade/llms.txt Perform a semantic search against stored memories using cosine similarity. Results are returned in ranked order. ```python # MCP tool call parameters search_memories( query="What are the user's programming language preferences?", limit=10, # Max results (default: 10) filter_tags=["preferences"] # Optional tag filter ) # Response: [ { "memory_id": "550e8400-e29b-41d4-a716-446655440000", "content": "User prefers TypeScript over JavaScript for new projects", "similarity_score": 0.89, "metadata": { "type": "text", "source": "claude", "tags": "preferences,programming,languages", "importance": 8.5, "created_at": "2024-01-15T10:30:00.123456" } }, { "memory_id": "660e8400-e29b-41d4-a716-446655440001", "content": "User uses VS Code as primary IDE", "similarity_score": 0.72, "metadata": { "type": "text", "source": "manual", "tags": "preferences,tools", "importance": 5.0, "created_at": "2024-01-14T09:15:00.000000" } } ] ``` -------------------------------- ### Generate Single Text Embedding (Async) Source: https://context7.com/reyanshgupta/yaade/llms.txt Generate an embedding vector for a single piece of text asynchronously. The output dimension depends on the loaded model. ```python embedding = await embedding_service.encode_text("User prefers TypeScript") ``` -------------------------------- ### Generate Multiple Text Embeddings (Batch Async) Source: https://context7.com/reyanshgupta/yaade/llms.txt Generate embedding vectors for a list of texts in a single asynchronous batch call. This is more efficient for processing multiple texts. ```python embeddings = await embedding_service.encode_text([ "User prefers TypeScript", "User uses VS Code", "User likes dark themes" ]) ``` -------------------------------- ### Add Memory API Source: https://context7.com/reyanshgupta/yaade/llms.txt Stores a new memory with automatic semantic embedding generation, supporting categorization and importance scoring. ```APIDOC ## add_memory ### Description Store a new memory with automatic semantic embedding generation. Supports categorization by type, source, tags, and importance scoring. The memory content is converted to a vector embedding and stored in ChromaDB for later semantic search. ### Method POST ### Endpoint /add_memory ### Parameters #### Request Body - **content** (string) - Required - The main content of the memory. - **memory_type** (string) - Optional - The type of memory (e.g., "text", "image", "document", "conversation", "code"). - **source** (string) - Optional - The source of the memory (e.g., "claude", "chatgpt", "cursor", "browser", "api", "manual"). - **tags** (array of strings) - Optional - Keywords or labels associated with the memory. - **importance** (float) - Optional - A score from 0.0 to 10.0 indicating the memory's importance. - **metadata** (object) - Optional - Additional key-value pairs for context. ### Request Example ```json { "content": "User prefers TypeScript over JavaScript for new projects", "memory_type": "text", "source": "claude", "tags": ["preferences", "programming", "languages"], "importance": 8.5, "metadata": {"context": "discussed during project setup"} } ``` ### Response #### Success Response (200) - **memory_id** (string) - The unique identifier for the newly added memory. - **status** (string) - Indicates the result of the operation (e.g., "added"). - **timestamp** (string) - The date and time when the memory was added. #### Error Response - **error** (string) - Description of the error (e.g., "Failed to generate embedding: Model not loaded"). - **status** (string) - Indicates the result of the operation (e.g., "failed"). ### Response Example ```json { "memory_id": "550e8400-e29b-41d4-a716-446655440000", "status": "added", "timestamp": "2024-01-15T10:30:00.123456" } ``` ### Error Response Example ```json { "error": "Failed to generate embedding: Model not loaded", "status": "failed" } ``` ``` -------------------------------- ### search_memories Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Performs semantic search across stored memories. ```APIDOC ## search_memories ### Description Semantic search across memories. ### Parameters - **query** (string) - Required - Search query - **limit** (int) - Optional - Max results (default: 10) - **filter_tags** (list) - Optional - Filter by tags ``` -------------------------------- ### Define Memory Models Source: https://context7.com/reyanshgupta/yaade/llms.txt Use Pydantic models to structure, validate, and serialize memory data and collections. ```python from app.models.memory import Memory, MemoryType, MemorySource, MemoryCollection from datetime import datetime # Create a memory with all fields memory = Memory( id="unique-uuid-string", content="The actual memory content to store", type=MemoryType.TEXT, # TEXT, IMAGE, DOCUMENT, CONVERSATION, CODE source=MemorySource.CLAUDE, # CLAUDE, CHATGPT, CURSOR, BROWSER, API, MANUAL tags=["tag1", "tag2"], metadata={"custom": "data"}, created_at=datetime.now(), updated_at=None, embedding=[0.1, 0.2, ...], # Optional: 384 or 768 floats importance=5.0 # 0.0 to 10.0, default 1.0 ) # Serialize to JSON json_data = memory.model_dump_json() # Create a memory collection collection = MemoryCollection( id="collection-uuid", name="Project Preferences", description="User preferences for the current project", memories=["memory-id-1", "memory-id-2"], created_at=datetime.now() ) ``` -------------------------------- ### Check Yaade server health Source: https://context7.com/reyanshgupta/yaade/llms.txt Use this tool to verify the operational status, version, and configuration of the Yaade server. ```python # MCP tool call via Claude Desktop/Claude Code # Natural language: "Check the memory server health" # Response format: { "status": "healthy", "version": "0.1.0", "total_memories": 42, "embedding_model": "all-MiniLM-L6-v2", "data_directory": "/Users/username/.yaade" } # Unhealthy response: { "status": "unhealthy", "error": "Server not initialized" } ``` -------------------------------- ### mcp__yaade__add_memory Source: https://github.com/reyanshgupta/yaade/blob/main/setup/claude-code-skill/SKILL.md Stores a new piece of information in the semantic memory system. ```APIDOC ## mcp__yaade__add_memory ### Description Stores a self-contained fact or information into the Yaade memory system. ### Parameters #### Request Body - **content** (string) - Required - The information to store. - **memory_type** (string) - Optional - Type of memory: "text", "code", "conversation", or "document". - **source** (string) - Optional - The source of the memory (e.g., "claude"). - **tags** (array) - Optional - List of tags for categorization. - **importance** (number) - Optional - Importance score from 1.0 to 10.0. ``` -------------------------------- ### analyze_memory_cleanup Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Analyzes memory for duplicates or similar entries. ```APIDOC ## analyze_memory_cleanup ### Description Find duplicate/similar memories (non-destructive). ### Parameters - **similarity_threshold** (float) - Optional - Duplicate detection threshold (default: 0.85) - **consolidation_threshold** (float) - Optional - Consolidation threshold (default: 0.70) ``` -------------------------------- ### Search Memories API Source: https://context7.com/reyanshgupta/yaade/llms.txt Searches for memories using semantic similarity based on a query, returning ranked results with similarity scores. ```APIDOC ## search_memories ### Description Search for memories using semantic similarity. The query is converted to a vector embedding and compared against stored memories using cosine similarity. Returns ranked results with similarity scores. ### Method GET ### Endpoint /search_memories ### Parameters #### Query Parameters - **query** (string) - Required - The search query to find semantically similar memories. - **limit** (integer) - Optional - The maximum number of results to return (default: 10). - **filter_tags** (array of strings) - Optional - Tags to filter the search results. ### Response #### Success Response (200) - Returns an array of memory objects, each containing: - **memory_id** (string) - The unique identifier of the memory. - **content** (string) - The content of the memory. - **similarity_score** (float) - The semantic similarity score of the memory to the query. - **metadata** (object) - Metadata associated with the memory (type, source, tags, importance, created_at). ### Response Example ```json [ { "memory_id": "550e8400-e29b-41d4-a716-446655440000", "content": "User prefers TypeScript over JavaScript for new projects", "similarity_score": 0.89, "metadata": { "type": "text", "source": "claude", "tags": "preferences,programming,languages", "importance": 8.5, "created_at": "2024-01-15T10:30:00.123456" } }, { "memory_id": "660e8400-e29b-41d4-a716-446655440001", "content": "User uses VS Code as primary IDE", "similarity_score": 0.72, "metadata": { "type": "text", "source": "manual", "tags": "preferences,tools", "importance": 5.0, "created_at": "2024-01-14T09:15:00.000000" } } ] ``` ``` -------------------------------- ### add_memory Source: https://github.com/reyanshgupta/yaade/blob/main/README.md Stores new memory with semantic embedding. ```APIDOC ## add_memory ### Description Store new memory with semantic embedding. ### Parameters - **content** (string) - Required - Memory content to store - **memory_type** (string) - Optional - text, image, document, conversation, code - **source** (string) - Optional - claude, chatgpt, cursor, browser, api, manual - **tags** (list) - Optional - Categorization tags - **importance** (float) - Optional - Score from 0.0 to 10.0 - **metadata** (dict) - Optional - Additional metadata ``` -------------------------------- ### Retrieve specific memory Source: https://context7.com/reyanshgupta/yaade/llms.txt Fetch the full details of a memory, including its metadata and embedding vector, using its unique ID. ```python # MCP tool call parameters get_memory(memory_id="550e8400-e29b-41d4-a716-446655440000") # Response: { "id": "550e8400-e29b-41d4-a716-446655440000", "content": "User prefers TypeScript over JavaScript for new projects", "metadata": { "type": "text", "source": "claude", "tags": "preferences,programming,languages", "importance": 8.5, "created_at": "2024-01-15T10:30:00.123456" }, "embedding": [0.0234, -0.0567, 0.1234, ...] # 384-dimensional vector } # Not found response: null ``` -------------------------------- ### mcp__yaade__get_memory Source: https://github.com/reyanshgupta/yaade/blob/main/setup/claude-code-skill/SKILL.md Retrieves the full details of a specific memory by its ID. ```APIDOC ## mcp__yaade__get_memory ### Description Fetches the complete content and metadata for a specific memory entry. ### Parameters #### Request Body - **memory_id** (string) - Required - The unique identifier of the memory. ``` -------------------------------- ### Clean Up Memory Data Source: https://context7.com/reyanshgupta/yaade/llms.txt Identify and consolidate duplicate or related memories using the MemoryCleanupService. ```python from app.services.memory_cleanup import MemoryCleanupService from app.storage.vector_store import VectorStore # Initialize vector_store = VectorStore("/path/to/.yaade/chroma") cleanup_service = MemoryCleanupService(vector_store) # Analyze memories for cleanup opportunities analysis = await cleanup_service.analyze_memories_for_cleanup( similarity_threshold=0.85, # For near-duplicate detection consolidation_threshold=0.70 # For consolidation grouping ) # Returns analysis with exact_duplicates, near_duplicates, consolidation_groups # Execute cleanup based on analysis results = await cleanup_service.execute_cleanup( analysis_result=analysis, actions_to_execute=["exact_duplicates", "near_duplicates"] ) # Returns: {"executed_actions": [...], "results": {...}, "errors": [...]} ``` -------------------------------- ### mcp__yaade__health_check Source: https://github.com/reyanshgupta/yaade/blob/main/setup/claude-code-skill/SKILL.md Checks the status of the Yaade memory server. ```APIDOC ## mcp__yaade__health_check ### Description Verifies if the memory server is operational and returns system status. ``` -------------------------------- ### Add memory to Yaade Source: https://context7.com/reyanshgupta/yaade/llms.txt Store new content with automatic embedding generation. Supports categorization, source tracking, and importance scoring. ```python # MCP tool call parameters add_memory( content="User prefers TypeScript over JavaScript for new projects", memory_type="text", # text, image, document, conversation, code source="claude", # claude, chatgpt, cursor, browser, api, manual tags=["preferences", "programming", "languages"], importance=8.5, # 0.0 to 10.0 scale metadata={"context": "discussed during project setup"} ) # Response: { "memory_id": "550e8400-e29b-41d4-a716-446655440000", "status": "added", "timestamp": "2024-01-15T10:30:00.123456" } # Error response: { "error": "Failed to generate embedding: Model not loaded", "status": "failed" } ``` -------------------------------- ### Delete memory Source: https://context7.com/reyanshgupta/yaade/llms.txt Permanently remove a memory from the storage system. ```python # MCP tool call parameters delete_memory(memory_id="550e8400-e29b-41d4-a716-446655440000") # Success response: { "memory_id": "550e8400-e29b-41d4-a716-446655440000", "status": "deleted", "timestamp": "2024-01-15T11:00:00.000000" } ``` -------------------------------- ### mcp__yaade__search_memories Source: https://github.com/reyanshgupta/yaade/blob/main/setup/claude-code-skill/SKILL.md Searches for memories based on semantic meaning. ```APIDOC ## mcp__yaade__search_memories ### Description Performs a semantic search across stored memories to retrieve relevant information. ### Parameters #### Request Body - **query** (string) - Required - Natural language search query. - **limit** (integer) - Optional - Maximum number of results to return. - **filter_tags** (array) - Optional - Tags to filter the search results. ``` -------------------------------- ### mcp__yaade__delete_memory Source: https://github.com/reyanshgupta/yaade/blob/main/setup/claude-code-skill/SKILL.md Deletes a specific memory entry. ```APIDOC ## mcp__yaade__delete_memory ### Description Removes a memory from the storage. Always confirm with the user before calling this. ### Parameters #### Request Body - **memory_id** (string) - Required - The unique identifier of the memory to delete. ``` -------------------------------- ### Delete Memory API Source: https://context7.com/reyanshgupta/yaade/llms.txt Removes a memory from storage permanently using its unique identifier. ```APIDOC ## delete_memory ### Description Remove a memory from storage permanently. Returns status indicating whether the deletion succeeded, failed, or the memory was not found. ### Method DELETE ### Endpoint /delete_memory/{memory_id} ### Parameters #### Path Parameters - **memory_id** (string) - Required - The unique identifier of the memory to delete. ### Response #### Success Response (200) - **memory_id** (string) - The unique identifier of the deleted memory. - **status** (string) - Indicates the result of the deletion (e.g., "deleted"). - **timestamp** (string) - The date and time when the deletion occurred. ### Response Example ```json { "memory_id": "550e8400-e29b-41d4-a716-446655440000", "status": "deleted", "timestamp": "2024-01-15T11:00:00.000000" } ``` ``` -------------------------------- ### Health Check API Source: https://context7.com/reyanshgupta/yaade/llms.txt Checks the health and status of the Yaade server, returning operational details and version information. ```APIDOC ## health_check ### Description Check server health and status including total memory count, embedding model in use, and data directory location. Returns server version and operational status for monitoring and diagnostics. ### Method GET ### Endpoint /health_check ### Response #### Success Response (200) - **status** (string) - Operational status of the server (e.g., "healthy"). - **version** (string) - The current version of the Yaade server. - **total_memories** (integer) - The total number of memories stored. - **embedding_model** (string) - The name of the embedding model currently in use. - **data_directory** (string) - The path to the directory where data is stored. #### Unhealthy Response - **status** (string) - "unhealthy". - **error** (string) - Description of the error (e.g., "Server not initialized"). ### Response Example ```json { "status": "healthy", "version": "0.1.0", "total_memories": 42, "embedding_model": "all-MiniLM-L6-v2", "data_directory": "/Users/username/.yaade" } ``` ### Error Response Example ```json { "status": "unhealthy", "error": "Server not initialized" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.