# AgentBuilder **Repository Path**: z4rek/agent-builder ## Basic Information - **Project Name**: AgentBuilder - **Description**: No description available - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-06 - **Last Updated**: 2026-07-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Agent Builder An AI-powered RAG (Retrieval-Augmented Generation) application built with FastAPI, featuring a modular pipeline architecture for building intelligent question-answering systems. ## Overview Agent Builder is a comprehensive framework for building RAG-based applications. It implements a complete pipeline from data ingestion to agent-based generation, organized into five distinct stages: - **Stage 01: Ingestion** - Data loading, cleaning, splitting, and storage - **Stage 02: Retrieval** - Hybrid, keyword, and vector search with reranking - **Stage 03: Augmentation** - Context building, citation, and query rewriting - **Stage 04: Generation** - LLM integration with streaming support - **Stage 05: Agent** - Memory, planning, ReAct, and reflection mechanisms ## Features - **FastAPI-based REST API** - High-performance async web service - **Modular Architecture** - Each stage is separated into independent modules - **In-Memory RAG Service** - Built-in TF-IDF vector search with cosine similarity - **Complete RAG Pipeline** - From document ingestion to answer generation - **Health Monitoring** - Built-in health check endpoints - **Structured Logging** - Request tracing with trace IDs ## Installation ```bash pip install -r requirements.txt ``` ## Running the Application ### Windows ```bash start.bat ``` ### Manual Start ```bash uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload ``` ## API Endpoints | Method | Endpoint | Description | |--------|----------|--------------| | GET | `/health` | Health check | | POST | `/documents` | Add a new document | | GET | `/documents` | List all documents | | DELETE | `/documents` | Clear all documents | | POST | `/search` | Search documents by query | | POST | `/ask` | Ask a question (RAG QA) | ## Usage Example ### Add a Document ```bash curl -X POST "http://localhost:8000/documents" \ -H "Content-Type: application/json" \ -d '{"content": "Your document text here", "metadata": {"source": "example"}}' ``` ### Search Documents ```bash curl -X POST "http://localhost:8000/search" \ -H "Content-Type: application/json" \ -d '{"query": "your search query", "top_k": 5}' ``` ### Ask a Question ```bash curl -X POST "http://localhost:8000/ask" \ -H "Content-Type: application/json" \ -d '{"query": "What is the main topic?", "top_k": 5}' ``` ## Project Structure ``` app/ ├── config/ # Configuration and settings │ ├── config.py # Application settings │ └── logging_config.py ├── main.py # FastAPI application entry point └── testRAG/ # RAG implementation ├── router.py # API routes ├── schemas.py # Pydantic models ├── service.py # RAG service logic ├── stage_01_ingestion/ # Data ingestion ├── stage_02_retrieval/ # Retrieval ├── stage_03_augmentation/ # Augmentation ├── stage_04_generation/ # Generation └── stage_05_agent/ # Agent ``` ## Configuration Configuration is managed through the `Settings` class in `app/config/config.py`. The application uses environment-based configuration with caching for optimal performance. ## License See project repository for license information.