io.github.HatmanStack/ragstack

编码与调试

by hatmanstack

在 AWS 上搜索、对话、上传并抓取 serverless RAGStack 知识库,适合构建检索增强应用。

什么是 io.github.HatmanStack/ragstack

在 AWS 上搜索、对话、上传并抓取 serverless RAGStack 知识库,适合构建检索增强应用。

README

<img align="center" src="ragstack_banner_resized.png" alt="RAGStack-Lambda-app icon"> <p align="center"> <a href="https://www.apache.org/licenses/LICENSE-2.0.html"><img src="https://img.shields.io/badge/license-Apache2.0-blue" alt="Apache 2.0 License" /></a> <a href="https://www.python.org/"><img src="https://img.shields.io/badge/Python-3.13-3776AB" alt="Python 3.13" /></a> <a href="https://react.dev"><img src="https://img.shields.io/badge/React-19-61DAFB" alt="React 19" /></a> </p> <p align="center"> <a href="https://aws.amazon.com/lambda/"><img src="https://img.shields.io/badge/AWS-Lambda-FF9900" alt="AWS Lambda" /></a> <a href="https://aws.amazon.com/bedrock/"><img src="https://img.shields.io/badge/AWS-Bedrock-232F3E" alt="AWS Bedrock" /></a> <a href="https://aws.amazon.com/transcribe/"><img src="https://img.shields.io/badge/AWS-Transcribe-527FFF" alt="AWS Transcribe" /></a> <a href="https://aws.amazon.com/s3/"><img src="https://img.shields.io/badge/AWS-S3-569A31" alt="AWS S3" /></a> <a href="https://aws.amazon.com/dynamodb/"><img src="https://img.shields.io/badge/AWS-DynamoDB-4053D6" alt="AWS DynamoDB" /></a> <a href="https://aws.amazon.com/cognito/"><img src="https://img.shields.io/badge/AWS-Cognito-DD344C" alt="AWS Cognito" /></a> </p>

Serverless document and media processing with AI chat. Scale-to-zero architecture — no vector database fees, no idle costs. Upload documents, images, video, and audio — extract text with OCR or transcription — query using Amazon Bedrock or your AI assistant via MCP.

<p align="center"> <b>QUESTIONS?</b> <a href="https://deepwiki.com/HatmanStack/RAGStack-Lambda/"> <sub><img src="https://deepwiki.com/badge.svg" alt="Deep WIKI" height="20" /></sub> </a> </p>

Features

  • ☁️ Fully serverless architecture (Lambda, Step Functions, S3, DynamoDB)
  • 🧠 NEW Amazon Nova multimodal embeddings for text and image vectorization
  • 📄 Document processing & vectorization (PDF, images, Office docs, HTML, CSV, JSON, XML, EML, EPUB) → stored in managed knowledge base
  • 🎬 NEW Video/audio processing - transcribe speech with AWS Transcribe, searchable by timestamp
  • 💬 AI chat with retrieval-augmented context and source attribution
  • 📎 Collapsible source citations with optional document downloads
  • ⏱️ NEW Media sources with timestamp links - click to play at exact position
  • 🔍 Metadata filtering - auto-discover document metadata and filter search results
  • 🎯 Relevancy boost for filtered results - prioritize matches from metadata filters
  • 🔄 Knowledge Base reindex - regenerate metadata for existing documents with updated settings
  • 🗑️ Document management - reprocess, reindex, or delete documents from the dashboard
  • 🌐 Web component for any framework (React, Vue, Angular, Svelte)
  • 🚀 One-click deploy
  • 💰 $7-10/month (1000 docs, Textract + Haiku)

Live Demo

EnvironmentURLCredentials
Base Pipelinedhrmkxyt1t9pb.cloudfront.netguest@hatstack.fun / Guest@123
Project Showcaseshowcase-htt.hatstack.funLogin as guest

Base Pipeline: The core document processing tool - upload, OCR, and query documents.

Project Showcase: See RAGStack powering a real application.

Quick Start

Option 1: One-Click Deploy (AWS Marketplace)

REPO IS IN ACTIVE DEVELOPMENT AND WILL CHANGE OFTEN

Deploy directly from the AWS Console - no local setup required:

  1. Subscribe to RAGStack on AWS Marketplace (free, not required - If subscribed Lambda roles auto-accept Bedrock model agreements on first invocation)
  2. Click here to deploy
  3. Enter a stack name (lowercase only, e.g., "my-docs") and your admin email
  4. Click Create Stack (deployment takes ~10 minutes)

After deployment:

  • Check your email for the temporary password (from Cognito)
  • Go to CloudFormation → your stack → Outputs tab to find the Dashboard URL (UIUrl)

Option 2: Deploy from Source

For customization or development:

Prerequisites:

  • AWS Account with admin access
  • Python 3.13+, Node.js 24+
  • AWS CLI, SAM CLI (configured)
  • Docker (for Lambda layer builds)
bash
git clone https://github.com/HatmanStack/RAGStack-Lambda.git
cd RAGStack-Lambda

# Create virtual environment and install dependencies
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt

# Deploy (defaults to us-east-1 for Nova Multimodal Embeddings)
python publish.py \
  --project-name my-docs \
  --admin-email admin@example.com

Option 3: Nested Stack Deployment

Deploy RAGStack as part of a larger CloudFormation stack. See Nested Stack Deployment Guide for details.

Quick example:

yaml
Resources:
  RAGStack:
    Type: AWS::CloudFormation::Stack
    Properties:
      TemplateURL: https://ragstack-quicklaunch-public.s3.us-east-1.amazonaws.com/ragstack-template.yaml
      Parameters:
        StackPrefix: 'my-app-ragstack'  # Required: lowercase prefix
        AdminEmail: admin@example.com

Web Component Integration

See RAGSTACK_CHAT.md for web component integration guide.

API Access

Server-side integrations use API key authentication. Get your key from Dashboard → Settings.

bash
curl -X POST 'YOUR_GRAPHQL_ENDPOINT' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"query": "query { searchKnowledgeBase(query: \"...\") { results { content } } }"}'

Web component uses IAM auth (no API key needed - handled automatically).

Each UI tab shows server-side API examples in an expandable section.

MCP Server (AI Assistant Integration)

Use your knowledge base directly in Claude Desktop, Cursor, VS Code, Amazon Q CLI, and other MCP-compatible tools.

bash
# Install (or use uvx for zero-install)
pip install ragstack-mcp

Add to your AI assistant's MCP config:

json
{
  "ragstack-kb": {
    "command": "uvx",
    "args": ["ragstack-mcp"],
    "env": {
      "RAGSTACK_GRAPHQL_ENDPOINT": "YOUR_ENDPOINT",
      "RAGSTACK_API_KEY": "YOUR_API_KEY"
    }
  }
}

Then ask naturally: "Search my knowledge base for authentication docs"

See MCP Server docs for full setup instructions.

Architecture

code
Upload → OCR → Embeddings → Bedrock KB
                                ↓
 Web UI (Dashboard + Chat) ←→ GraphQL API
                                ↓
 Web Component ←→ AI Chat with Sources

Usage

Documents

Upload documents in various formats. Auto-detection routes to optimal processor:

TypeFormatsProcessing
TextHTML, TXT, CSV, JSON, XML, EML, EPUB, DOCX, XLSXDirect extraction with smart analysis
OCRPDF, JPG, PNG, TIFF, GIF, BMP, WebP, AVIFTextract or Bedrock vision OCR (WebP/AVIF require Bedrock)
MediaMP4, WebM, MP3, WAV, M4A, OGG, FLACAWS Transcribe → 30s segments → searchable with timestamps
PassthroughMarkdown (.md)Direct copy

Processing time: UPLOADED → PROCESSING → INDEXED (typically 1-5 min for text, 2-15 min for OCR, 5-20 min for media)

Images

Upload JPG, PNG, GIF, WebP with captions. Both visual content and caption text are searchable.

Web Scraping

Scrape websites into the knowledge base. See Web Scraping.

Video & Audio

Upload MP4, WebM, MP3, WAV, M4A, OGG, or FLAC files. Speech is transcribed using AWS Transcribe and segmented into 30-second chunks for search. Sources include timestamps (e.g., "1:30-2:00") with clickable links that play at the exact position.

Features:

  • Speaker diarization (identify who said what)
  • Configurable language (30+ languages supported)
  • Timestamp-linked sources in chat responses

See Configuration for language and speaker settings.

Chat

Ask questions about your content. Sources show where answers came from.

Documentation

Development

bash
npm run check  # Lint + test all (backend + frontend)

Deployment Options

Direct Deployment

bash
# Full deployment (defaults to us-east-1)
python publish.py --project-name myapp --admin-email admin@example.com

# Skip dashboard build (still builds web component)
python publish.py --project-name myapp --admin-email admin@example.com --skip-ui

# Skip ALL UI builds (dashboard and web component)
python publish.py --project-name myapp --admin-email admin@example.com --skip-ui-all

# Enable demo mode (rate limits: 5 uploads/day, 30 chats/day; disables reindex/reprocess/delete)
python publish.py --project-name myapp --admin-email admin@example.com --demo-mode

Publish to AWS Marketplace (Maintainers)

To update the one-click deploy template:

bash
python publish.py --publish-marketplace

This packages the application and uploads to S3 for one-click deployment.

Note: Currently requires us-east-1 (Nova Multimodal Embeddings). When available in other regions, use --region <region>.

Acknowledgments

This project was inspired by:

常见问题

io.github.HatmanStack/ragstack 是什么?

在 AWS 上搜索、对话、上传并抓取 serverless RAGStack 知识库,适合构建检索增强应用。

相关 Skills

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描111.8k

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描111.8k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描111.8k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
83.1k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
51.8k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.2k

评论