API Reference Ragex v#0.11.0
View SourceModules
Ragex - Hybrid Retrieval-Augmented Generation for multi-language codebases.
Defines the behaviour for AI provider implementations.
AI response cache for reducing costs and improving performance.
Manages AI provider configuration.
Feature-aware wrapper around Ragex.AI.Cache.
Configuration management for AI-enhanced features.
Context building helpers for AI-enhanced features.
Anthropic API provider implementation.
DeepSeek R1 API provider implementation.
Ollama provider for running local LLMs.
OpenAI API provider implementation.
Registry for AI providers.
Convenience wrapper for AI provider registry operations.
Tracks AI provider usage including requests, tokens, and estimated costs.
Main entry point for Ragex Agent operations.
ReAct (Reasoning + Acting) execution loop for agent operations.
ETS-based conversation memory for agent sessions.
Represents an agent conversation session.
Report generation utilities for agent analysis.
Consumes a provider stream and accumulates a response compatible with generate/3.
Converts MCP tool definitions to AI provider tool formats.
Business logic analysis using Metastatic analyzers.
Persistence layer for code analysis results (issues).
Dead code detection for identifying unused functions and code.
AI-powered refinement of dead code confidence scores.
Dependency analysis for module and function relationships.
AI-powered context-aware insights for dependency analysis.
Code duplication detection using two complementary approaches.
AI-powered semantic analysis for code duplication detection.
Change impact analysis using graph traversal and metrics.
Enriches analysis results with accurate location information from the knowledge graph.
Preserves location metadata through Metastatic analysis.
Bridge to Metastatic analysis capabilities.
High-level API for code quality analysis.
Stores and queries code quality metrics in the knowledge graph.
Security vulnerability analysis using Metastatic.
Semantic code analysis using Metastatic's OpKind metadata system.
Code smell detection using Metastatic.Analysis.Smells.
Automated refactoring suggestion engine.
Generates actionable refactoring plans for suggestions.
Pattern detection for common refactoring opportunities.
RAG-powered advice generation for refactoring suggestions.
Priority ranking system for refactoring suggestions.
Defines the behaviour for language-specific code analyzers.
Analyzes entire directories recursively, detecting and analyzing files based on their extensions.
Analyzes Elixir code to extract modules, functions, calls, and dependencies.
Analyzes Erlang code to extract modules, functions, calls, and dependencies.
Analyzes JavaScript code to extract modules, functions, calls, and dependencies.
Language-agnostic entity extraction from Metastatic MetaAST.
Language-agnostic analyzer using Metastatic MetaAST.
Analyzes Python code to extract modules, functions, calls, and dependencies.
Analyzes Ruby code to extract modules, functions, calls, and dependencies.
Interactive terminal chat UI for codebase Q&A using the Ragex agent.
ANSI color helpers for CLI output.
Rich output formatting utilities for tables, lists, and structured data.
Progress bar and spinner utilities for CLI operations.
Interactive prompt utilities for CLI input.
Backup management for file editing operations.
Conflict detection for refactoring operations.
Core editing functionality with atomic operations and validation.
Diff generation and formatting for refactoring operations.
Automatic code formatting integration.
Preview mode for refactoring operations.
Semantic refactoring operations that leverage the knowledge graph.
AI-enhanced refactoring preview commentary.
Elixir-specific AST manipulation for semantic refactoring.
Language-agnostic refactoring operations via Metastatic MetaAST.
Report generation for refactoring operations.
Multi-file atomic edit transactions.
Common types and structs for the editor module.
Multi-level undo/redo stack for refactoring operations.
AI-enhanced validation error explanation and fix suggestions.
Validation pipeline orchestration for code editing.
Elixir code validator.
Erlang code validator.
JavaScript/TypeScript code validator.
Python code validator.
Ruby code validator.
Visualization utilities for refactoring operations.
Behavior for embedding generators.
Embedding adapter using Bumblebee with configurable models.
Tracks file metadata to enable incremental embedding updates.
Helper functions to generate and store embeddings for analyzed code entities.
Persistence layer for embedding vectors.
Registry of available embedding models with metadata.
Generates embeddable text descriptions from code entities.
Graph algorithms for analyzing code structure and relationships.
Persistence layer for the knowledge graph (nodes and edges).
Knowledge graph storage using ETS tables.
Shared language detection, adapter resolution, and parsing utilities.
Helper functions for debugging MCP protocol issues.
Handles MCP prompt-related requests.
Handles MCP resource-related requests.
Handles MCP tool-related requests (tools/list and tools/call).
Implements the Model Context Protocol (MCP) JSON-RPC 2.0 protocol.
MCP Server implementation that communicates via stdio.
Handles a single MCP request from stdin and exits.
Unix socket server for MCP protocol.
Formats retrieved code for AI consumption.
Orchestrates the RAG pipeline: Retrieval → Augmentation → Generation.
Manages prompt engineering templates.
Cross-language semantic search using MetaAST equivalence.
Hybrid retrieval combining symbolic graph queries with semantic similarity search.
Enhances retrieval ranking using MetaAST metadata from Metastatic.
Query expansion using MetaAST semantic features.
Vector similarity search for code embeddings.
Watches directories for file changes and automatically re-analyzes modified files.
Mix Tasks
Clear AI response cache.
Display AI response cache statistics.
Display AI provider usage statistics and costs.
Performs comprehensive analysis on a directory.
Generates an AI-powered code audit report.
Clears cached embeddings.
Refreshes the embeddings cache for the current project.
Displays statistics about cached embeddings.
Interactive chat session for codebase Q&A using RAG.
Install shell completion scripts for Ragex.
Interactive configuration wizard for Ragex setup.
Live monitoring dashboard for Ragex metrics.
Migrates embeddings when changing embedding models.
Install Ragex man pages.
Downloads and caches Bumblebee embedding models for offline use.
Interactive refactoring wizard with operation selection and preview.