開源AI聊天機器人堆疊(代理、記憶體、前端)一鍵部署
本文介紹了一個開源、生產級的AI聊天機器人模板,整合了Dank AI代理和Weaviate以實現持久記憶體。該模板強調快速本地開發和無縫的一鍵生產部署。
Navigation Menu
Search code, repositories, users, issues, pull requests...
Provide feedback
We read every piece of feedback, and take your input very seriously.
Saved searches
Use saved searches to filter your results more quickly
To see all available qualifiers, see our documentation.
Uh oh!
There was an error while loading. Please reload this page.
Delta-Darkly/AI-Chatbot
Folders and files
Latest commit
History
Repository files navigation
🤖 AI Chatbot with Dank AI Agent + Weaviate Memory
A production-ready, full-stack template demonstrating how to build an AI chatbot with persistent memory using Dank AI agents and Weaviate vector database. Optimized for quick local development (one command) and seamless deployment to production.
📋 Table of Contents
What is This?
This repository is a complete, production-ready template for building AI chatbots with:
Perfect for:
What is Dank AI?
Dank AI is a framework that lets you build AI agents using JavaScript. Instead of complex Python setups or extensive infrastructure, you can:
Key Benefits:
Think of it as "Vercel for AI agents" - you write JavaScript, push to GitHub, and deploy with a single click.
Architecture Overview
Request Flow
Quick Start
Prerequisites
Before you begin, ensure you have:
First-Time Setup
Fork the repository
Option A: Fork from Dank Cloud (Recommended)
Option B: Fork directly from GitHub
Clone your forked repository
Why fork? Forking creates your own copy that you can modify and deploy to your own Dank Cloud project. If you clone the original repo directly, you won't be able to push changes or deploy to your own project.
Set up the agent environment
Edit .env and add your API key:
Note for deployment: If you plan to deploy to Dank Cloud, ensure the agent ID in dank.config.js is unique. Generate a new UUIDv4 if needed (see Deployment section for details).
Run everything with one command
This will:
Open your browser
Stop everything
What You Should See
Project Structure
How It Works
Component Breakdown
The Dank AI agent handles:
Key Files:
Weaviate provides:
Runs:
The React frontend provides:
Proxies:
Data Flow Example
Using as a Template
This project is designed to be forked and customized for your own use cases.
For Agent Development
Copy the agent directory (ai-chatbot-weaviate/) to start your own agent:
What to reuse:
For Frontend Integration
Copy the service files to integrate with your own frontend:
agentService.ts: Drop into your project to call the agent
weaviateService.ts: Drop into your project to manage conversations
Proxy patterns: Copy the proxy setup to avoid CORS issues
What to reuse:
Environment Configuration
Agent Environment (ai-chatbot-weaviate/.env)
Frontend Environment (chatbot-frontend/.env)
Environment Toggle Behavior
💡 Tip: You can mix and match! Test frontend against production agent/Weaviate by setting AGENT_ENV=prod or WEAVIATE_ENV=prod in the frontend .env while keeping the other local.
Deployment
⚠️ Important: Before deploying, ensure your agent ID in ai-chatbot-weaviate/dank.config.js is unique. Deployment will fail if you use an existing agent ID. Generate a new UUIDv4 using uuid.v4() (you can run node -e "console.log(require('uuid').v4())" in the ai-chatbot-weaviate directory).
Agent + Weaviate (Dank Cloud)
Push to GitHub
Create Project on Dank Cloud
Configure and Deploy Project
Create API Key for Weaviate
Enable Weaviate Service
Add Environment Variables
Rebuild and Deploy
Optional: Secure Agent Endpoint
Test Your Agent (Bonus)
Without API key:
With API key (if configured):
Frontend (Vercel)
Push to GitHub (if not already done)
Connect to Vercel
Set Environment Variables
Deploy
🎉 Done! Your chatbot is now live in production.
Troubleshooting
Common Issues
Error: Cannot connect to Docker daemon
Solution:
Error: Port 5173 (or 3000, 8080) is already in use
Solution:
Error: Agent returns 500 or timeout
Check:
Error: Cannot connect to Weaviate
Solution:
Error: CORS policy: No 'Access-Control-Allow-Origin' header
Solution:
Error: 404 Not Found when calling /api/agent/prompt
Solution:
Getting Help
Learn More
Detailed Documentation
Key Concepts
Next Steps
Built with ❤️ using Dank AI and Weaviate
About
Resources
Uh oh!
There was an error while loading. Please reload this page.
Stars
Watchers
Forks
Releases
Packages
0
Languages
Footer
Footer navigation
相關文章