Content
<div align="center">
# Tool List

> Record growth, understand yourself, and become a better you
</div>
RelaMind is an AI-based personal growth trajectory analysis system that helps users better understand themselves and achieve continuous growth by recording life, reviewing history, and analyzing patterns.
[](https://star-history.com/#El-12stu/RelaMind&type=Date)
## 📸 Effect Display
### Homepage

*The homepage displays three core functions: intelligent dialogue, growth diary, and task assistant, using a modern gradient design and animation effects*
### Intelligent Dialogue - Intelligent Routing Function
The intelligent dialogue system supports automatic identification of user intentions and intelligent routing to the most appropriate processing method:
#### Ordinary Chat Mode

*Daily companion chat, emotional support, and guided recording*
#### RAG Historical Query Mode

*Automatically retrieve historical records and answer questions like "What did I write in my diary at this time last year?"*
#### Tool Call Mode

*Automatically call tools such as search, download, and file generation to complete tasks*
### Intelligent Routing Recognition Process
The system will automatically identify user intentions and route to the corresponding mode:
#### Ordinary Chat Routing

*The system identifies as ordinary chat intention and uses daily companion mode*
#### RAG Query Routing

*The system identifies as historical query intention and automatically uses RAG retrieval mode*
#### Tool Call Routing

*The system identifies as tool call intention and automatically calls the corresponding tool*
### Growth Diary

*Growth diary recording interface, supporting mood selection, tag management, content recording, and automatic storage to vector database*
### Manus Task Assistant 🤖
Manus is an advanced intelligent agent of RelaMind, based on ReAct (Reasoning and Acting) mode, which can independently plan complex tasks and execute multi-step operations.
#### Task Execution Process Display
**Step 1: Task Analysis and Planning**

*Manus analyzes user needs, formulates an execution plan, and displays the thinking process and tools called*
**Step 2: Information Collection and Processing**

*Manus automatically calls tools such as search and web crawling to collect information and display execution progress in real-time*
**Step 3: Content Generation and File Creation**

*Manus organizes information and generates files, supporting txt, PDF and other formats, and provides download links*
**Step 4: Task Completion and Result Display**

*After the task is completed, Manus displays the final result and generated file, and the user can directly download*
**Core Features**:
- **Streaming Output**: Immediately display after each execution step, real-time feedback task progress
- **Visualized Thinking Process**: Clearly display AI's thinking content and decision-making process
- **Transparent Tool Calling**: Display the name of the tool called, hiding technical details
- **Automatic File Generation**: Support generating txt, PDF and other format files, and provide download links
- **Multi-Step Collaboration**: Automatically coordinate multiple tools to complete complex tasks
### Sensitive Word Detection 🛡️
The system has built-in sensitive word detection function to ensure content safety and compliance.

*When the user input contains sensitive words, the system will immediately intercept and prompt, without calling large model API, to protect system safety*
**Technical Features**:
- **Trie Tree Algorithm**: Based on prefix tree to achieve efficient sensitive word matching
- **Zero API Calls**: Directly intercept when detecting sensitive words, without consuming large model API resources
- **Real-Time Detection**: Detect in real-time before sending the request to the large model
- **Configurable Word Library**: Support loading sensitive word library from configuration file
## ✨ Product Positioning
RelaMind is positioned as "your AI growth partner" to help users:
- **Daily Companion**: Listen to user voice, give emotional support and understanding
- **Guided Recording**: Encourage users to record life bits and pieces, develop recording habits
- **Growth Analysis**: Analyze growth patterns based on historical records, provide personalized insights
- **Active Care**: Remember user's important information, actively care in time
## 🎯 Core Functions
### 1. Intelligent Dialogue 💬
**Function Features**:
- **Intelligent Routing**: Automatically identify user intentions (ordinary chat / historical query / tool call), choose the most appropriate processing method
- **Daily Companion**: Multi-round dialogue, emotional support, guided recording
- **Historical Retrieval**: Based on RAG technology to retrieve historical records, answer questions like "What was I doing at this time last year?"
- **Tool Calls**: Automatically call tools such as search, download, and file generation
- **Dialogue Memory**: Store dialogue history based on Cassandra, realize long-term memory
**Usage Scenarios**:
- Daily chat: "Today's mood is good"
- Historical query: "What was I doing at this time last year?"
- Tool calls: "Help me search for today's weather"
### 2. Growth Diary 📝
**Function Features**:
- **Mood Recording**: 8 mood options (happy, excited, calm, tired, sad, anxious, angry, confused)
- **Tag Management**: Custom tags + common tags, easy to classify and retrieve
- **RAG Storage**: Automatically store to vector database, support semantic retrieval
- **Metadata Enrichment**: Automatically record date, time, mood, tags and other information
**Usage Scenarios**:
- Record daily thoughts and feelings
- Build personal growth knowledge base
- Provide data source for subsequent RAG retrieval
### 3. Manus Task Assistant 🤖
**Function Features**:
- **Autonomous Planning**: Based on ReAct (Reasoning and Acting) mode, autonomous reasoning and action
- **Multi-Tool Collaboration**: Automatically call multiple tools to complete complex tasks (search, crawling, file generation, etc.)
- **Multi-Step Execution**: Support complex multi-step task planning, up to 10 steps
- **Streaming Output**: Immediately display after each execution step, real-time feedback task progress
- **Visualized Thinking**: Clearly display AI's thinking process and decision-making logic
- **File Generation**: Automatically generate txt, PDF and other format files, and provide download links
- **Transparent Tool Calling**: Display the name of the tool called, hiding technical details
**Usage Scenarios**:
- Develop a complete plan (e.g., "Help me develop a weekend plan")
- Information collection and organization (e.g., "Help me search for fitness suggestions and return in PDF format")
- Tasks that require multi-step operations (e.g., "Help me search for today's news and organize into a document")
- Complex information processing (e.g., "Help me analyze a topic and generate a report")
**Execution Process**:
1. **Thinking Stage**: Analyze user needs, formulate execution plan
2. **Action Stage**: Call corresponding tools (search, crawling, file operation, etc.)
3. **Iterative Execution**: Continue thinking and executing next step based on results
4. **Task Completion**: Generate final result and file, provide download link
### 4. Intelligent Intention Identification 🧠
**Technical Features**:
- **LLM-Based Classification**: Use structured output for intention classification, improve accuracy
- **Rule Matching**: Fast rule matching (default), can switch to LLM classification
- **Confidence Mechanism**: When recognition confidence is low, actively ask user to confirm
- **Continuous Optimization**: Record recognition accuracy, continuously optimize model
### 5. Sensitive Word Detection 🛡️
**Function Features**:
- **Trie Tree Algorithm**: Based on prefix tree to achieve efficient sensitive word matching, time complexity O(n)
- **Zero API Calls**: Directly intercept when detecting sensitive words, without consuming large model API resources
- **Real-Time Detection**: Detect in real-time before sending the request to the large model
- **Configurable Word Library**: Support loading sensitive word library from `sensitive_words.txt` configuration file
- **Advisor Interception**: Through Spring AI Advisor mechanism, intercept in the early stage of call chain
**Technical Implementation**:
- Use `SensitiveWordAdvisor` as the highest priority Advisor (order = -100)
- Based on Trie tree multi-pattern matching algorithm
- Support Chinese and English sensitive word detection
- Automatically load and initialize sensitive word library
**Usage Scenarios**:
- Prevent users from inputting improper content
- Protect system safety, avoid malicious requests
- Save API call cost
### 6. Tool Call Capability 🔧
- **Internet Search**: Real-time search for the latest information
- **File Operation**: Save, read user files
- **Web Crawling**: Extract web content
- **Resource Download**: Download pictures, documents and other resources
- **PDF Generation**: Generate personalized reports
- **Terminal Operation**: Execute code scripts
### 7. MCP Service Integration 🌐
- **Map Service**: Find nearby locations, plan routes
- **Picture Search**: Search for pictures from specific websites
- **Extended Capability**: Support custom MCP service
## 🛠️ Technical Stack
### Backend Technology
- **Java 21** + **Spring Boot 3**
- **Spring AI**: AI application development framework
- **LangChain4j**: AI application development tool library
- **Cassandra**: Dialogue memory persistence storage
- **PgVector**: Vector database for RAG retrieval
- **Spring AI ChatClient**: Multi-round dialogue, Advisor, ChatMemory
- **Spring AI RAG**: Knowledge base retrieval enhancement generation
- **Spring AI Tool Calling**: Tool call capability
- **Spring AI MCP**: Model context protocol support
### AI Capability
- **Large Model Access**: Support multiple AI large models (Tongyi Qianwen, GPT, etc.)
- **Prompt Engineering**: Optimized prompt word design
- **Structured Output**: Use Entity for structured data extraction
- **Streaming Response**: SSE streaming transmission, improve user experience
- **Multi-Modal Support**: Support text, pictures and other multi-modal input
### Tools and Libraries
- **Kryo**: High-performance serialization
- **Jsoup**: Web crawling
- **iText**: PDF generation
- **Knife4j**: API document generation
### Frontend Technology
- **Vue 3**: Frontend framework
- **Vite**: Build tool
- **SSE**: Server push event, realize streaming response
### Deployment
- **Docker**: Containerized deployment
- **Serverless**: Support Serverless deployment
## 📁 Project Structure
```
RelaMind/
├── src/main/java/io/el12stu/RelaMind/
│ ├── app/ # Core application logic
│ │ └── RelaMindApp.java # Intelligent routing, RAG, tool calls
│ ├── agent/ # AI intelligent agent
│ │ ├── Manus.java # Autonomous planning intelligent agent
│ │ └── ReActAgent.java # ReAct mode intelligent agent
│ ├── advisor/ # Spring AI Advisor
│ │ ├── SensitiveWordAdvisor.java
│ │ ├── IntentDetectionService.java
│ │ └── ...
│ ├── chatmemory/ # Dialogue memory
│ │ └── CassandraBasedChatMemory.java
│ ├── rag/ # RAG related
│ │ ├── RelaMindAppDocumentLoader.java
│ │ ├── QueryRewriter.java
│ │ └── ...
│ ├── service/ # Business service
│ │ ├── IntentDetectionService.java # Intention identification
│ │ ├── DiaryService.java # Diary storage service
│ │ └── SensitiveWordService.java
│ ├── tools/ # Tool definition
│ │ ├── WebSearchTool.java
│ │ ├── FileOperationTool.java
│ │ ├── PDFGenerationTool.java
│ │ └── ...
│ └── controller/ # API interface
│ ├── AiController.java # Intelligent dialogue interface
│ └── DiaryController.java # Diary record interface
├── src/main/resources/
│ ├── application.yml # Configuration file
│ └── document/ # Knowledge base document
└── ai-agent-frontend/ # Frontend project
└── src/
├── views/
│ ├── Home.vue # Homepage (three functional cards)
│ ├── RelaMind.vue # Intelligent dialogue page
│ ├── Diary.vue # Growth diary page
│ └── SuperAgent.vue # Task assistant page
├── components/
│ └── ChatRoom.vue # Chat room component
└── api/
└── index.js # API call encapsulation
```
## 🚀 Quick Start
### Environment Requirements
- JDK 21+
- Maven 3.6+
- PostgreSQL (support PgVector)
- Cassandra (optional, for dialogue memory)
### Configuration Description
1. Configure AI large model API Key (in `application.yml`)
2. Configure database connection (PostgreSQL, Cassandra)
3. Configure vector database (PgVector)
### Run Project
#### Method 1: Local Development and Operation
```bash
# Backend
mvn spring-boot:run
# Frontend
cd ai-agent-frontend
npm install
npm run dev
```
#### Method 2: Docker Deployment (Recommended) 🐳
**Difficulty Assessment**: ⭐⭐☆☆☆ (simple to medium)
Dockerization has been completed, supporting two deployment methods: use pre-built images (recommended) or local construction.
**Prerequisites**:
- Install Docker and Docker Compose
- Configure AI large model API Key
---
### 🚀 Method A: Use Pre-Built Images (Recommended, Simplest)
**Advantages**: No need to build environment, directly pull and use, quick start
```bash
# 1. Clone repository
git clone https://github.com/your-username/RelaMind.git
cd RelaMind
# 2. Create configuration file
cp env.example .env
# 3. Edit .env file, configure the following:
# - DASHSCOPE_API_KEY (required): Your Alibaba Cloud DashScope API Key
# - GITHUB_USER (required): Your GitHub username
# - GITHUB_REPO (required): Repository name (usually RelaMind)
# - POSTGRES_PASSWORD (optional, recommended modification): Database password
# - CASSANDRA_PASSWORD (optional, recommended modification): Cassandra password
# 4. Modify docker-compose.yml image address
# Replace your-username with your GitHub username
# For example: ghcr.io/your-username/RelaMind/backend:latest
# 5. Start all services
docker-compose -f docker-compose.yml up -d
# 6. View service status
docker-compose -f docker-compose.yml ps
# 7. View logs
docker-compose -f docker-compose.yml logs -f backend
```
**Access Application**:
- Frontend: http://localhost
- Backend API: http://localhost:8123/api
- Swagger documentation: http://localhost:8123/api/swagger-ui.html
---
### 🔨 Method B: Local Build Image
**Advantages**: Can customize build parameters, suitable for development and debugging
```bash
# 1. Create .env file (optional, used to configure sensitive information)
cp env.example .env
# Edit .env file, configure at least DASHSCOPE_API_KEY
# 2. Use development configuration to start (will automatically build image)
docker-compose up -d --build
# 3. View service status
docker-compose ps
# 4. View logs
docker-compose logs -f backend
# 4. Restart service
docker-compose restart backend
# 1. Modify .env file
# 2. Restart service
docker-compose restart backend
```
---
### 📋 Configuration Description
All configurations are injected through environment variables, **images do not contain any sensitive information**.
**Required Configuration**:
- `DASHSCOPE_API_KEY`: Alibaba Cloud DashScope API Key
**Optional Configuration** (default value):
- `POSTGRES_USER`: default `relamind`
- `POSTGRES_PASSWORD`: default `relamind123` (️ Production environment recommended modification)
- `CASSANDRA_USERNAME`: default `cassandra`
- `CASSANDRA_PASSWORD`: default `cassandra` (️ Production environment recommended modification)
For detailed configuration description, please see [CONFIGURATION.md](CONFIGURATION.md)
---
### 🛠️ Common Commands
```bash
# Start service
docker-compose -f docker-compose.yml up -d
# Stop service
docker-compose -f docker-compose.yml down
# Stop and delete data volume (⚠️ Will delete all data)
docker-compose -f docker-compose.yml down -v
# View logs
docker-compose -f docker-compose.yml logs -f backend
# Restart service
docker-compose -f docker-compose.yml restart backend
# Modify configuration and restart
# 1. Modify .env file
# 2. Restart service
docker-compose -f docker-compose.yml restart backend
```
### 📦 Docker File Description
- `Dockerfile`: Backend application image (multi-stage construction, optimize image size)
- `docker-compose.yml`: Development environment configuration (local build image)
- `docker-compose.prod.yml`: Production environment configuration (use pre-built images)
- `.dockerignore`: Optimize construction speed, exclude unnecessary files
---
### ⚠️ Notes
1. **First-time use of pre-built image**:
- Need to modify the image address in `docker-compose.prod.yml`
- Replace `your-username` with your GitHub username
- Ensure the image has been published to GitHub Container Registry
2. **Port occupancy**:
- Ensure ports 80, 8123, 5432, and 9042 are not occupied
3. **Data persistence**:
- Data is stored in Docker volumes
- Deleting containers will not lose data
- Using `docker-compose down -v` will delete all data
4. **Configuration modification**:
- After modifying the `.env` file, restart the service to take effect
- No need to rebuild the image
---
### 📚 More Documentation
- [CONFIGURATION.md](CONFIGURATION.md) - Detailed configuration instructions
- [DEPLOYMENT.md](DEPLOYMENT.md) - Complete deployment guide
## 📝 Usage Examples
### Intelligent Conversation Example
**Ordinary Chat**:
```
User: I'm feeling good today
AI: Great! Can you share what's making you feel so good? Do you want to record it so you can look back on these happy moments later?
```
**History Record Query (Automatic use of RAG)**:
```
User: What was I doing this time last year?
AI: Based on your records from March 2023, you were preparing for an important project and also recorded some thoughts about work pressure...
```
**Tool Call (Automatic tool invocation)**:
```
User: Help me search for today's weather
AI: [Automatically invoke search tool] According to the search results, today's weather is sunny, with a temperature of...
```
### Growth Diary Example
Users can record through the interface:
- Select mood: 😊 Happy
- Add tags: work, thinking
- Input content: I completed an important project today and feel a great sense of accomplishment...
After saving, these records will be automatically stored in the vector database, and can be retrieved through intelligent conversation later.
### Manus Task Assistant Example
**Example 1: Generate a learning suggestion document**
```
User: I want to learn about fitness, give me some suggestions in txt format.
Manus Execution Process:
━━━ Step 1 ━━━
💭 Thinking: The user wants to learn about fitness and get some suggestions, finally returned in txt format. Need to collect effective suggestions for learning fitness, then generate a txt file.
🔧 Tools called: searchWeb
━━━ Step 2 ━━━
💭 Thinking: Search results have been obtained, need to grab relevant webpage content for detailed information.
🔧 Tools called: scrapeWebPage
━━━ Step 3 ━━━
💭 Thinking: Enough information has been collected, now need to organize and generate a txt file.
🔧 Tools called: writeFile
━━━ Step 4 ━━━
💭 Thinking: The file has been successfully generated, task completed.
✅ Task completed, tools called: doTerminate
📁 Generated file:
1. Fitness Suggestions.txt [Click to download]
```
**Example 2: Generate a PDF report**
```
User: Help me search for today's news and organize it into a PDF format.
Manus Execution Process:
1. Search for news → 2. Grab webpage content → 3. Organize information → 4. Generate PDF → 5. Task completed
📁 Generated file: Today's News.pdf [Click to download]
```
### Sensitive Word Detection Example
```
User input: Content with sensitive words
System response: [System security prompt]: Your input contains sensitive content, and the request has been intercepted.
Features:
- Zero API calls: Direct interception, no consumption of large model resources
- Real-time response: Millisecond-level detection speed
- Safe and reliable: Protect the system from improper content
```
## 🎨 Product Features
1. **Intelligent Routing**: Automatically identify user intent, no need for user selection, and the system automatically chooses the most appropriate processing method
2. **Long-term Memory**: Based on vector databases to achieve long-term memory, truly understand the user's growth trajectory
3. **Personalization**: Provide personalized suggestions based on user historical data, rather than general talk
4. **Integrated Experience**: Intelligent conversation, growth diary, and task assistant functions are seamlessly connected
5. **Continuous Optimization**: Record accuracy and continuously optimize intent recognition models
## 🔄 Functional Process
### Complete Usage Process
1. **Recording Stage**: Users record thoughts and moods in the "Growth Diary"
2. **Storage Stage**: Diary automatically stored in vector database (RAG)
3. **Conversation Stage**: Users communicate with AI in "Intelligent Conversation"
4. **Retrieval Stage**: When users ask about history, the system automatically retrieves relevant records through RAG
5. **Analysis Stage**: AI provides personalized analysis and suggestions based on historical data
### Intelligent Routing Process
```
User input
↓
Intent recognition (rules/LLM)
↓
┌─────────┬──────────┬──────────┐
│ Ordinary Chat │ RAG Query │ Tool Calls │
└─────────┴──────────┴──────────┘
↓
Intelligent reply
```
## 📄 License
This project is licensed under the [MIT License](LICENSE).
**RelaMind** - Record growth, understand yourself, and become a better you
Connection Info
You Might Also Like
awesome-mcp-servers
A collection of MCP servers.
git
A Model Context Protocol server for Git automation and interaction.
Appwrite
Build like a team of hundreds
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.