How samugit83/ai-superagent works
Project type and purpose
• This is a full-stack Next.js web application that integrates Generative AI.
• Purpose: build an AI super-agent that scrapes the web, uploads files to S3, trains a personal model, streams chat responses via WebSockets, and calls Amazon Bedrock foundation models (e.g., Claude 3 Sonnet, Amazon Titan).
File structure
• app/ – Next.js (app router) React components and pages: chat UI (chat_comp.jsx, training_window.jsx), layout.js, page.js, global CSS.
• redux/ – client state management: store.js, appslice.js.
• server_actions/ – Next.js server actions for fetching and S3 multipart uploads.
• websocket_server/ – a Socket.io / WebSocket server (websocket.js, bedrock_agent_runtime.js) for real-time streaming.
• lambda-repo/ – AWS Lambda microservices, each in its own subfolder (ActionGroupGenericQuestionToModel, SmartAgentPreprocessParser, webdiscoveryActionGroup), plus a Node.js bedrock_api module.
• bedrock-workflow/ – PDF documenting the AI workflow.
• Config files: next.config.mjs, jsconfig.json, .eslintrc.json.
README for additional insights
• Highlights features: web scraping (Python + Beautiful Soup), S3 multipart uploads, streaming chat division into chunks, Amazon Bedrock usage, multiple FM integration, Socket.io real-time comms.
• Mentions AWS Lambda and OpenSearch (though OpenSearch isn’t in the file tree, you may integrate it similarly).