Skip to content

Dutchthenomad/rag-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RAG Framework πŸš€

Build Status Docker License: MIT

Production-ready containerized RAG (Retrieval-Augmented Generation) framework combining LangGraph multi-agent orchestration, Mem0 persistent memory, and GPTme tool execution for autonomous AI workflows.

πŸ—οΈ Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ GPTme β”‚ β”‚ LangGraph β”‚ β”‚ Mem0 β”‚ β”‚ :8090 │◄──►│ :8080 │◄──►│ :8000 β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ Tool β”‚ β”‚ Multi-Agent β”‚ β”‚ Vector β”‚ β”‚ Execution β”‚ β”‚ Orchestrator β”‚ β”‚ Memory β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🧩 Core Components

  • πŸ”§ GPTme - Advanced tool execution engine with shell access, file operations, and code execution
  • πŸ€– LangGraph - Multi-agent workflow orchestration with state management and decision routing
  • 🧠 Mem0 - Persistent memory layer with vector storage and contextual retrieval
  • 🐳 Docker - Containerized deployment with service mesh networking

Current Status

Workflow Overview β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ LangGraph β”‚ β”‚ Mem0 β”‚ β”‚ GPTme β”‚ β”‚ Orchestrator │◄──►│ Memory Layer │◄──►│ Tool Executor β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β–Ό β–Ό β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Workflow β”‚ β”‚ Context & β”‚ β”‚ Git Commands β”‚ β”‚ Planning β”‚ β”‚ History β”‚ β”‚ File Analysis β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Component Responsibilities LangGraph (Orchestration Layer) Role: Workflow coordination and decision making

Project Analysis: Scan codebase for changes and determine commit scope Quality Gates: Verify changes meet standards before committing Approval Workflows: Human-in-the-loop for sensitive operations Error Recovery: Handle git conflicts and operational failures

Mem0 (Memory Layer) Role: Historical context and pattern recognition

Change Patterns: Remember successful commit strategies and messaging patterns Project Knowledge: Maintain understanding of project structure and goals Decision History: Track what worked and what didn't for continuous improvement Context Preservation: Maintain development narrative across sessions

GPTme (Execution Layer) Role: File system operations and git command execution

File Analysis: Read, analyze, and categorize code changes Git Operations: Execute commits, pushes, branching with safety checks Documentation Generation: Create and update README, changelogs, documentation Safety Verification: Validate operations before execution

πŸš€ Quick Start

Prerequisites

  • Docker & Docker Compose (v3.8+)
  • OpenRouter API Key (Get yours here)
  • Git for version control

1️⃣ Clone & Configure

bash git clone https://github.com/Dutchthenomad/rag-framework.git cd rag-framework

Copy environment template and configure API key

cp .env.template .env

Edit .env and add your OPENROUTER_API_KEY

2️⃣ Launch Services

bash

Build and start all services

docker-compose up -d

Verify all services are healthy

docker-compose ps

3️⃣ Verify Health

bash curl http://localhost:8000/health # Mem0 curl http://localhost:8080/health # LangGraph
curl http://localhost:8090/health # GPTme

πŸ“Š Service Endpoints

Service Port Health Check API Documentation
Mem0 8000 /health API Docs
LangGraph 8080 /health API Docs
GPTme 8090 /health API Docs

πŸ› οΈ Development

Environment Setup

bash

Development environment with hot reload

docker-compose -f docker-compose.dev.yml up

Run tests

./scripts/testing/run-tests.sh

Check service health

./scripts/testing/health-check.sh

Project Structure

rag-framework/ β”œβ”€β”€ services/ # Containerized services β”‚ β”œβ”€β”€ gptme/ # Tool execution service β”‚ β”œβ”€β”€ langgraph/ # Multi-agent orchestrator
β”‚ β”œβ”€β”€ mem0/ # Memory persistence layer β”‚ └── shared/ # Common configurations β”œβ”€β”€ tests/ # Comprehensive test suite β”œβ”€β”€ docs/ # Architecture & API documentation β”œβ”€β”€ scripts/ # Automation utilities └── .github/ # CI/CD workflows

πŸ§ͺ Testing

bash

Unit tests

pytest tests/unit/

Integration tests

pytest tests/integration/

End-to-end tests

pytest tests/integration/test_end_to_end.py

All tests with coverage

pytest --cov=services tests/

πŸ“š Documentation

πŸ”§ Configuration

Environment Variables

Variable Description Required Default
OPENROUTER_API_KEY OpenRouter API key for LLM access βœ… -
GPTME_WORKSPACE GPTme workspace directory ❌ /workspace
TOOL_ALLOWLIST Allowed GPTme tools (security) ❌ save,append,patch,ipython,shell,browser
DEBUG Enable debug logging ❌ false

Service Configuration

Each service includes detailed configuration options:

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“Š Monitoring & Observability

  • Health Checks - All services expose /health endpoints
  • Logging - Structured logging with configurable levels
  • Metrics - Service metrics and performance monitoring
  • Tracing - Request tracing across service boundaries

πŸ”’ Security

  • API Key Management - Environment-based configuration with templates
  • Tool Restrictions - Configurable GPTme tool allowlists
  • Network Isolation - Services communicate via dedicated Docker network
  • Dependency Scanning - Automated vulnerability detection

πŸ“ˆ Performance

  • Containerized Deployment - Optimized Docker images with multi-stage builds
  • Service Mesh - Efficient inter-service communication
  • Persistent Storage - Data persistence across container restarts
  • Health Monitoring - Automated health checks and restart policies

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™‹β€β™‚οΈ Support


About

Foundational Infrastructure for hybrid local automation systems. Using LangChain, LangGraph, GPTme, Mem0, Khoj, and other open source systems. The vision is laying the groundwork for a Jarvis or Star Trek Computer Type ultra automations system.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors