Skip to content

Hayredin950/SYNAPSE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

121 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SYNAPSE Logo

πŸš€ SYNAPSE

FAANG-Grade Tech Intelligence & RAG Platform

GitHub license GitHub stars GitHub forks Python Django LangChain


✨ Key Features

🧠 AI Agent System

  • ReAct Pattern: Reasoning + Acting loop with full transparency
  • 5 Specialized Agents: Research, Document, Trend, Project, and Scheduler agents
  • Tool Registry: Search, document generation, trend analysis, project scaffolding, and more
  • Memory Systems: 4-layer memory (buffer, summary, vector, entity)

πŸ” RAG & Knowledge Management

  • pgvector Integration: Semantic search with PostgreSQL
  • Document Loaders: PDF, web, GitHub, and more
  • Source Citation: Full reference tracking for all generated content
  • Text Splitting: Smart chunking with 200-character overlap

πŸ“Š Trend & Intelligence

  • arXiv Integration: Academic paper search and analysis
  • GitHub API: Real-time repository trend data
  • Google Trends: Technology adoption tracking
  • Hacker News & Medium: News and article aggregation

πŸ“ Document Generation

  • PDF Reports: ReportLab-based with tables, charts, images
  • PowerPoint Presentations: Multiple layout support
  • Word Documents: Professional formatting with TOC
  • Markdown Generation: Documentation and guides

πŸ› οΈ Project Scaffolding

  • Django REST API: Complete backend templates
  • FastAPI Microservices: Modern async setup
  • Next.js & React: Frontend applications
  • Data Science Projects: Jupyter notebook templates

πŸ”’ Security & Safety

  • Tool Validation: Input schema checks
  • Rate Limiting: Per-user request limits
  • Cost Tracking: Token and budget management
  • Output Sanitization: Redaction of sensitive data

πŸ› οΈ Tech Stack

Layer Technologies
Backend Django REST Framework, PostgreSQL, pgvector
AI/ML LangChain, OpenAI GPT-3.5/4, tiktoken
Vector Store pgvector (PostgreSQL extension)
Task Queue Celery
Frontend Next.js, React, Tailwind CSS
Document Gen ReportLab, python-pptx, python-docx
Testing pytest
CI/CD GitHub Actions

πŸš€ Quick Start

Prerequisites

  • Python 3.9+
  • PostgreSQL 15+ with pgvector
  • Node.js 18+ (for frontend)

Installation

# Clone the repository
git clone https://github.com/Hayredin950/SYNAPSE.git
cd SYNAPSE

# Set up backend
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

# Set up PostgreSQL
# Make sure pgvector extension is installed
# Update DATABASE_URL in .env

# Run migrations
python manage.py migrate

# Start the backend
python manage.py runserver

# Set up frontend (in new terminal)
cd frontend
npm install
npm run dev

Configuration

Create a .env file:

# OpenAI
OPENAI_API_KEY=your_openai_api_key

# Database
DATABASE_URL=postgresql://user:password@localhost:5432/synapse

# API Keys
GITHUB_API_KEY=your_github_api_key
GOOGLE_API_KEY=your_google_api_key

# Celery
CELERY_BROKER_URL=redis://localhost:6379/0

πŸ“‚ Project Structure

SYNAPSE/
β”œβ”€β”€ ai_engine/              # AI and agent systems
β”‚   β”œβ”€β”€ agents/            # Research, document, trend agents
β”‚   β”œβ”€β”€ embeddings/        # Embedding generation
β”‚   β”œβ”€β”€ middleware/        # Safety, rate limiting, moderation
β”‚   β”œβ”€β”€ nlp/               # NLP processing pipelines
β”‚   └── rag/               # RAG and vector store logic
β”œβ”€β”€ backend/               # Django backend
β”‚   β”œβ”€β”€ apps/              # Core, articles, agents, automation, billing, documents
β”‚   └── ...
β”œβ”€β”€ frontend/              # Next.js frontend
β”‚   β”œβ”€β”€ src/
β”‚   └── ...
β”œβ”€β”€ scraper/               # Web scrapers for data collection
β”‚   β”œβ”€β”€ spiders/           # arXiv, GitHub, HackerNews, Twitter, YouTube
β”‚   └── ...
β”œβ”€β”€ docs/                  # Project documentation
β”‚   └── ...
β”œβ”€β”€ tests/                 # Test suite
└── ...

🎯 Usage Examples

Research Agent

from ai_engine.agents.research_agent import ResearchAgent

agent = ResearchAgent()
result = agent.execute({
    "task": "Analyze the current state of AI agent frameworks",
    "user_id": "user_123"
})
print(result["final_answer"])

RAG Query

from ai_engine.rag.pipeline import RAGPipeline

pipeline = RAGPipeline()
result = pipeline.query("What are the best practices for LLM safety?")
print(f"Answer: {result['answer']}")
print("\nSources:")
for source in result['sources']:
    print(f"  {source['source']}: {source['excerpt']}")

πŸ“Š Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Frontend   β”‚    β”‚  Backend API  β”‚    β”‚   PostgreSQL   β”‚
β”‚  (Next.js)  │────│  (Django)     │────│ (with pgvector)β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
                          β–Ό
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚  AI Engine    β”‚
                  β”‚ (LangChain)   β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β–Ό               β–Ό               β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚ Research β”‚    β”‚ Document β”‚    β”‚  Trend   β”‚
    β”‚  Agent   β”‚    β”‚  Agent   β”‚    β”‚  Agent   β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“š Documentation

  • DOCUMENTATION_SUMMARY.md: Complete AI agent and RAG documentation
  • WHATS_NEW.md: Release notes and change history
  • DEPLOYMENT.md: Production deployment guide
  • TASKS.md: Project task list and milestones

🌟 Highlights

  • Production-Grade: FAANG-level architecture and code quality
  • Full-Stack: Complete backend + frontend implementation
  • AI-First: Built around LangChain and OpenAI
  • Open-Source: MIT licensed, community-driven
  • Well-Documented: Comprehensive technical and user guides

πŸ“„ License

MIT Β© Hayredin950

πŸ“ž Contact


Made with ❀️ by Hayredin950

About

🧠 FAANG-style technology intelligence platform leveraging autonomous AI agents and semantic search.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors