An open API service indexing awesome lists of open source software.

https://github.com/vastavikadi/midnight-thoughts

This repository contains the code for a mental companion application that uses a combination of a thinker agent and a listener agent to generate responses to user inputs. The thinker agent provides logical insights, while the listener agent maintains an emotional tone in the responses.
https://github.com/vastavikadi/midnight-thoughts

ai-agents fastapi huggingface multi-agent-systems python smolagents

Last synced: about 2 months ago
JSON representation

This repository contains the code for a mental companion application that uses a combination of a thinker agent and a listener agent to generate responses to user inputs. The thinker agent provides logical insights, while the listener agent maintains an emotional tone in the responses.

Awesome Lists containing this project

README

          

# Mental Companion
This repository contains the code for a mental companion application that uses a combination of a thinker agent and a listener agent to generate responses to user inputs. The thinker agent provides logical insights, while the listener agent maintains an emotional tone in the responses. The final response is synthesized by a synthesizer agent that combines the outputs of both agents.

## Setup Instructions
1. Clone the repository:
```bash
git clone
```
2. Navigate to the project directory:
```bash
cd mental_companion
```
3. Install the required dependencies:
```bash
pip install -r requirements.txt
```
4. Run the application:
```bash
uvicorn app.main:app --reload
```
## API Endpoint
- **POST /input**: Accepts a JSON payload with the user input and returns a
response generated by the mental companion.

## Example Request
```bash
curl -X POST "http://localhost:8000/input" -H "Content-Type: application/json" -d '{"input": "I am feeling stressed about my upcoming exams."}'
```
## Example Response
```json
{
"message": "Response generated successfully",
"status_code": 200,
"response": {
"response": "It's understandable to feel stressed about exams. Remember to take breaks, stay organized, and reach out for support if needed. You've got this!"
},
"error": null
}
```

## Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue if you have any suggestions or improvements.

## What can be improved?
- Enhance the memory retrieval mechanism to provide more relevant context for generating responses.
- Implement more advanced prompt engineering techniques to improve the quality of responses from the thinker and listener agents
- Add more tools and capabilities to the agents, such as sentiment analysis or external knowledge retrieval.
- Optimize the response synthesis process to create more coherent and contextually appropriate final responses.
- Implement user authentication and personalized memory storage for a more tailored experience.
- Add support for multiple languages and cultural contexts to make the mental companion more inclusive.
- Interface the application with a frontend to provide a more user-friendly experience.

### Made with ❤️ by Vastavikadi