{
  "markdown": "<img align=\"center\" src=\"ragstack_banner_resized.png\" alt=\"RAGStack-Lambda-app icon\">\n\n<p align=\"center\">\n<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>\n<a href=\"https://www.python.org/\"><img src=\"https://img.shields.io/badge/Python-3.13-3776AB\" alt=\"Python 3.13\" /></a>\n<a href=\"https://react.dev\"><img src=\"https://img.shields.io/badge/React-19-61DAFB\" alt=\"React 19\" /></a>\n</p>\n\n<p align=\"center\">\n<a href=\"https://aws.amazon.com/lambda/\"><img src=\"https://img.shields.io/badge/AWS-Lambda-FF9900\" alt=\"AWS Lambda\" /></a>\n<a href=\"https://aws.amazon.com/bedrock/\"><img src=\"https://img.shields.io/badge/AWS-Bedrock-232F3E\" alt=\"AWS Bedrock\" /></a>\n<a href=\"https://aws.amazon.com/transcribe/\"><img src=\"https://img.shields.io/badge/AWS-Transcribe-527FFF\" alt=\"AWS Transcribe\" /></a>\n<a href=\"https://aws.amazon.com/s3/\"><img src=\"https://img.shields.io/badge/AWS-S3-569A31\" alt=\"AWS S3\" /></a>\n<a href=\"https://aws.amazon.com/dynamodb/\"><img src=\"https://img.shields.io/badge/AWS-DynamoDB-4053D6\" alt=\"AWS DynamoDB\" /></a>\n<a href=\"https://aws.amazon.com/cognito/\"><img src=\"https://img.shields.io/badge/AWS-Cognito-DD344C\" alt=\"AWS Cognito\" /></a>\n</p>\n\nServerless 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.\n\n<p align=\"center\">\n  <b>QUESTIONS?</b>\n  <a href=\"https://deepwiki.com/HatmanStack/RAGStack-Lambda/\">\n    <sub><img src=\"https://deepwiki.com/badge.svg\" alt=\"Deep WIKI\" height=\"20\" /></sub>\n  </a>\n</p>\n\n## Features\n\n- ☁️ Fully serverless architecture (Lambda, Step Functions, S3, DynamoDB)\n- 🧠 **NEW** Amazon Nova multimodal embeddings for text and image vectorization\n- 📄 Document processing & vectorization (PDF, images, Office docs, HTML, CSV, JSON, XML, EML, EPUB) → stored in managed knowledge base\n- 🎬 **NEW** Video/audio processing - transcribe speech with AWS Transcribe, searchable by timestamp\n- 💬 AI chat with retrieval-augmented context and source attribution\n- 📎 Collapsible source citations with optional document downloads\n- ⏱️ **NEW** Media sources with timestamp links - click to play at exact position\n- 🔍 Metadata filtering - auto-discover document metadata and filter search results\n- 🎯 Relevancy boost for filtered results - prioritize matches from metadata filters\n- 🔄 Knowledge Base reindex - regenerate metadata for existing documents with updated settings\n- 🗑️ Document management - reprocess, reindex, or delete documents from the dashboard\n- 🌐 Web component for any framework (React, Vue, Angular, Svelte)\n- 🚀 One-click deploy\n- 💰 $7-10/month (1000 docs, Textract + Haiku)\n\n## Live Demo\n\n| Environment | URL | Credentials |\n|-------------|-----|-------------|\n| **Base Pipeline** | [dhrmkxyt1t9pb.cloudfront.net](https://dhrmkxyt1t9pb.cloudfront.net/) | `guest@hatstack.fun` / `Guest@123` |\n| **Project Showcase** | [showcase-htt.hatstack.fun](https://showcase-htt.hatstack.fun) | Login as guest |\n\n> **Base Pipeline**: The core document processing tool - upload, OCR, and query documents.\n>\n> **Project Showcase**: See RAGStack powering a real application.\n\n## Quick Start\n\n### Option 1: One-Click Deploy (AWS Marketplace)\n\n**REPO IS IN ACTIVE DEVELOPMENT AND WILL CHANGE OFTEN**\n\nDeploy directly from the AWS Console - no local setup required:\n\n1. [Subscribe to RAGStack on AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-5afdiw2zrht6o) (free, not required - If subscribed Lambda roles auto-accept Bedrock model agreements on first invocation)\n2. [Click here to deploy](https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?templateURL=https://ragstack-quicklaunch-public.s3.us-east-1.amazonaws.com/ragstack-template.yaml&stackName=my-docs)\n3. Enter a stack name (**lowercase only**, e.g., \"my-docs\") and your admin email\n4. Click **Create Stack** (deployment takes ~10 minutes)\n\n**After deployment:**\n- Check your email for the temporary password (from Cognito)\n- Go to CloudFormation → your stack → **Outputs** tab to find the Dashboard URL (`UIUrl`)\n\n### Option 2: Deploy from Source\n\nFor customization or development:\n\n**Prerequisites:**\n- AWS Account with admin access\n- Python 3.13+, Node.js 24+\n- [uv](https://docs.astral.sh/uv/) (Python package manager)\n- AWS CLI, SAM CLI (configured)\n- Docker (for Lambda layer builds)\n\n```bash\ngit clone https://github.com/HatmanStack/RAGStack-Lambda.git\ncd RAGStack-Lambda\n\n# Install dependencies\nuv sync\n\n# Deploy (defaults to us-east-1 for Nova Multimodal Embeddings)\npython publish.py \\\n  --stack-name my-docs \\\n  --admin-email admin@example.com\n```\n\n### Option 3: Nested Stack Deployment\n\nDeploy RAGStack as part of a larger CloudFormation stack. See [Nested Stack Deployment Guide](docs/NESTED_STACK_DEPLOYMENT.md) for details.\n\n**Quick example:**\n```yaml\nResources:\n  RAGStack:\n    Type: AWS::CloudFormation::Stack\n    Properties:\n      TemplateURL: https://ragstack-quicklaunch-public.s3.us-east-1.amazonaws.com/ragstack-template.yaml\n      Parameters:\n        StackPrefix: 'my-app-ragstack'  # Required: lowercase prefix\n        AdminEmail: admin@example.com\n```\n\n## Web Component Integration\n\nSee [RAGSTACK_CHAT.md](docs/RAGSTACK_CHAT.md) for web component integration guide.\n\n## API Access\n\n**Server-side integrations** use API key authentication. Get your key from Dashboard → Settings.\n\n```bash\ncurl -X POST 'YOUR_GRAPHQL_ENDPOINT' \\\n  -H 'x-api-key: YOUR_API_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"query\": \"query { searchKnowledgeBase(query: \\\"...\\\") { results { content } } }\"}'\n```\n\n**Web component** uses IAM auth (no API key needed - handled automatically).\n\nEach UI tab shows server-side API examples in an expandable section.\n\n## MCP Server (AI Assistant Integration)\n\nUse your knowledge base directly in Claude Desktop, Cursor, VS Code, Amazon Q CLI, and other MCP-compatible tools.\n\n```bash\n# Install (or use uvx for zero-install)\npip install ragstack-mcp\n```\n\nAdd to your AI assistant's MCP config:\n\n```json\n{\n  \"ragstack-kb\": {\n    \"command\": \"uvx\",\n    \"args\": [\"ragstack-mcp\"],\n    \"env\": {\n      \"RAGSTACK_GRAPHQL_ENDPOINT\": \"YOUR_ENDPOINT\",\n      \"RAGSTACK_API_KEY\": \"YOUR_API_KEY\"\n    }\n  }\n}\n```\n\nThen ask naturally: *\"Search my knowledge base for authentication docs\"*\n\nSee [MCP Server docs](src/ragstack-mcp/README.md) for full setup instructions.\n\n## Architecture\n\n```\nUpload → OCR → Embeddings → Bedrock KB\n                                ↓\n Web UI (Dashboard + Chat) ←→ GraphQL API\n                                ↓\n Web Component ←→ AI Chat with Sources\n```\n\n## Usage\n\n### Documents\nUpload documents in various formats. Auto-detection routes to optimal processor:\n\n| Type | Formats | Processing |\n|------|---------|------------|\n| **Text** | HTML, TXT, CSV, JSON, XML, EML, EPUB, DOCX, XLSX | Direct extraction with smart analysis |\n| **OCR** | PDF, JPG, PNG, TIFF, GIF, BMP, WebP, AVIF | Textract or Bedrock vision OCR (WebP/AVIF require Bedrock) |\n| **Media** | MP4, WebM, MP3, WAV, M4A, OGG, FLAC | AWS Transcribe → 30s segments → searchable with timestamps |\n| **Passthrough** | Markdown (.md) | Direct copy |\n\nProcessing time: UPLOADED → PROCESSING → INDEXED (typically 1-5 min for text, 2-15 min for OCR, 5-20 min for media)\n\n### Images\nUpload JPG, PNG, GIF, WebP with captions. Both visual content and caption text are searchable.\n\n### Web Scraping\nScrape websites into the knowledge base. See [Web Scraping](docs/WEB_SCRAPING.md).\n\n### Video & Audio\nUpload 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.\n\n**Features:**\n- Speaker diarization (identify who said what)\n- Configurable language (30+ languages supported)\n- Timestamp-linked sources in chat responses\n\nSee [Configuration](docs/CONFIGURATION.md#media-processing-videoaudio) for language and speaker settings.\n\n### Chat\nAsk questions about your content. Sources show where answers came from.\n\n## Documentation\n\n- [Configuration](docs/CONFIGURATION.md) - Settings, quotas, API keys & document management\n- [Nested Stack Deployment](docs/NESTED_STACK_DEPLOYMENT.md) - Deploy as part of larger CloudFormation stack\n- [Image Upload](docs/IMAGE_UPLOAD.md) - Image upload and captioning\n- [Web Scraping](docs/WEB_SCRAPING.md) - Scrape websites\n- [Metadata Filtering](docs/METADATA_FILTERING.md) - Auto-discover metadata and filter results\n- [Chat Component](docs/RAGSTACK_CHAT.md) - Embed chat anywhere\n- [API Reference](docs/API_REFERENCE.md) - GraphQL API documentation\n- [Architecture](docs/ARCHITECTURE.md) - System design & API reference\n- [Development](docs/DEVELOPMENT.md) - Local dev\n- [Migration](docs/MIGRATION.md) - Version migration guide\n- [Troubleshooting](docs/TROUBLESHOOTING.md) - Common issues\n- [Library Reference](docs/LIBRARY_REFERENCE.md) - Public API for lib/ragstack_common\n\n## Development\n\n```bash\nnpm run check  # Lint + test all (backend + frontend)\n```\n\n## Deployment Options\n\n### Direct Deployment\n\n```bash\n# Full deployment (defaults to us-east-1)\npython publish.py --stack-name myapp --admin-email admin@example.com\n\n# Skip dashboard build (still builds web component)\npython publish.py --stack-name myapp --admin-email admin@example.com --skip-ui\n\n# Skip ALL UI builds (dashboard and web component)\npython publish.py --stack-name myapp --admin-email admin@example.com --skip-ui-all\n\n# Enable demo mode (rate limits: 5 uploads/day, 30 chats/day; disables reindex/reprocess/delete)\npython publish.py --stack-name myapp --admin-email admin@example.com --demo-mode\n```\n\n### Publish to AWS Marketplace (Maintainers)\n\nTo update the one-click deploy template:\n\n```bash\npython publish.py --publish-marketplace\n```\n\nThis packages the application and uploads to S3 for one-click deployment.\n\n> **Note:** Currently requires us-east-1 (Nova Multimodal Embeddings). When available in other regions, use `--region <region>`.\n\n## Acknowledgments\n\nThis project was inspired by:\n\n- [Accelerated Intelligent Document Processing on AWS](https://github.com/aws-solutions-library-samples/accelerated-intelligent-document-processing-on-aws) - AWS Solutions Library reference architecture\n- [docs-mcp-server](https://github.com/arabold/docs-mcp-server) - MCP server for documentation search\n",
  "bytes": 10583,
  "sha": "eb392981feb77a597f7c051e5b7e7aa474b32a139afeba979807cc64aa0c5689",
  "repo_slug": "hatmanstack/ragstack-lambda",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_hatmanstack_ragstack_07c96fc2/readme"
}