Nexia is a multilingual virtual assistant (Portuguese, Spanish, English) that helps users to:
- Discover available healthcare services
- Schedule medical appointments
- Modify or cancel existing appointments
- 📅 Schedule appointments with available professionals
- 🔄 Modify scheduled times
- 🗑️ Cancel appointments
- 📱 Multilingual chat interface (Portuguese by default)
- 🧠 Conversational memory for a better experience
- 📅 Google Calendar integration
- 🔄 Professional availability checking
Nexia is implemented as a ReAct agent (Reason + Act), which works as follows:
- 📥 Receives a user query as input
- 🤔 Reasons about the query and decides the appropriate action
- 🛠️ Executes the chosen action using available tools (e.g., calendar, list of services)
- 👀 Observes the result of the action
- 🔁 Repeats steps 2-4 until it can provide a suitable final answer to the user
- Python 3.8+
- OpenAI API Key
- Google Calendar API Credentials
- Clone the repository:
git clone [REPOSITORY_URL]
cd nexia- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env.example .env
# Edit the .env file with your credentials- Start the server:
make run-streamlit- Access the application in your browser:
http://localhost:8501
- Start the Telegram bot:
make run-bot- Interact with the bot on Telegram: @NexiaAIBot.
The assistant can be integrated via API:
from app.agent import agent
response = agent.chat("I want to schedule a psychology appointment")
print(response)To run unit tests:
make testnexia/
├── app/
│ ├── agent.py # Main assistant logic
│ ├── calendar.py # Google Calendar integration
│ ├── fallback.py # Fallback and clarification logic
│ ├── memory.py # Conversational memory management
│ ├── prompts.py # Prompts and multilingual messages
│ ├── scheduler.py # Scheduling management
│ └── services.py # Service management
├── config/
│ └── services.yaml # Services configuration
├── frontend/
│ ├── streamlit_app.py # Web interface with Streamlit
│ └── telegram_app.py # Telegram interface with Aiogram
├── tests/
│ └── test_nexia.py # Unit tests
├── requirements.txt # Project dependencies
└── README.md # Documentation
- Fork the project
- Create a branch for your feature (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for more details.