Skip to content

Repository files navigation

🧠 PlanSmart: Enterprise RAG & Knowledge Engine

Executive Summary: A production-grade, containerized Retrieval-Augmented Generation (RAG) backend API built as the centralized "AI Brain" for PlanSmart Agency. It autonomously ingests, vectorizes, and retrieves proprietary business frameworks, internal documentation, and client histories to augment Claude's reasoning capabilities.


🏗️ System Architecture

Built on Domain-Driven Design (DDD), this headless API strictly separates data ingestion, vector retrieval, and agentic reasoning.

graph TD
    subgraph Data Layer
        A[Raw Business Documents] -->|Ingestion Pipeline| B(Text Splitter & Embeddings)
        B -->|Store| C[(ChromaDB Vector Store)]
    end
    
    subgraph API & Reasoning Layer
        D[Client / MCP Server] -->|REST /query| E[FastAPI Engine]
        E -->|Semantic Search| C
        C -->|Context| E
        E -->|Augmented Prompt| F[Anthropic Claude 3.5 API]
        F -->|Verified Answer| E
        E -->|JSON Response| D
    end
Loading

💼 The Business Case & ROI

This repository is not a proof-of-concept; it is the infrastructure designed to power daily operations, solving key bottlenecks:

  • Zero-Friction Knowledge Transfer: Eliminates information silos. New team members or AI agents can instantly query historical client data and Standard Operating Procedures (SOPs) via API.

  • Hallucination-Free AI: By strictly grounding Claude's responses in our localized ChromaDB vector store, we ensure all generated strategies are 100% aligned with PlanSmart's business standards.

  • Scalable Architecture: Dockerized deployment ensures the system can be scaled horizontally behind a load balancer, reducing research time from hours to milliseconds.

⚙️ Core Engineering Principles

  • Headless API-First Design: Exposed entirely via FastAPI. The system is decoupled from any specific frontend, allowing integration into Slack bots, internal dashboards, or Model Context Protocol (MCP) clients.

  • Evaluation-Ready (Eval): The architecture is designed to support RAG evaluation frameworks (like Ragas) to quantitatively measure retrieval precision and hallucination rates.

  • Containerized Portability: Fully managed via Docker and docker-compose, ensuring deterministic builds across development, staging, and production environments.

🚀 Quick Start & Deployment

1. Clone and configure:

git clone <repo-url>
cd enterprise-rag
cp .env.example .env    # Add your ANTHROPIC_API_KEY

2. Run via Docker (Recommended for Production):

docker-compose up --build -d

The API will be available at http://localhost:8000. Access the interactive Swagger documentation at http://localhost:8000/docs.

3. Run Locally (Development):

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn src.api.main:app --reload

📂 Project Structure

src/api/        # FastAPI application, routing, and Pydantic schemas

src/agents/     # Claude reasoning logic and prompt templates

src/ingestion/  # Document loaders and chunking strategies

src/retrieval/  # ChromaDB vector store communication layer

src/tools/      # Extended capabilities (e.g., live web research)

tests/          # Unit tests and RAG Evaluation (Eval) scripts

docker-compose.yml # Container orchestration

Dockerfile      # App image definition

License: Proprietary — PlanSmart. All rights reserved.

About

Enterprise-grade RAG and Agentic Framework powering PlanSmart Agency. Features strict SSRF defense, FinOps cost-optimization, and Claude orchestration via MCP.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages