Welcome to the official project repository for the "Conflict Resolution with the Help of AI" hackathon challenge!
This is a web-based chatbot simulation that lets two AI agents (with configurable personality traits) engage in a conflict resolution conversation. After a few turns, a human participant takes over one of the agents and continues the conversation in character.
Whether you're from Computer Science, Physics, or even Humanities — don't worry. This guide assumes minimal prior experience.
This React + Node.js application demonstrates how AI can simulate and possibly assist in resolving conflicts.
- Configure character traits (e.g., empathy, assertiveness).
- Choose a scenario (e.g., workplace disagreement).
- Watch two AI agents talk.
- After 6 messages, take control of one agent and respond like them.
- The base app uses OpenAI GPT-4o under the hood.
You need:
- Node.js (v18 or above)
- A terminal / command prompt
- An internet connection
- OpenAI API Key (You will receive one when the hackathon starts)
If you don’t have Git set up already, follow these quick steps:
- Go to: https://git-scm.com/downloads
- Download and install Git for your operating system.
- Restart your terminal after installation.
git config --global user.name "Your Name"
git config --global user.email "[email protected]"Clone the repo:
git clone [email protected]:ahmdthr/conflict-resolution-ai.git
cd conflict-resolution-aiRename .env.sample file in the root of the project to .env:
Then paste the following line into it (you’ll get your API key at the hackathon):
OPENAI_API_KEY=your_key_goes_hereIn one terminal window:
npm install
node server.jsThe server will start on http://localhost:3001
Open another terminal window:
npm run devThis will start the frontend on http://localhost:5173
- Fill in conversation setting and conversation scenario.
- Fill in names and traits for Agent A and Agent B.
- Click Start Chat.
- Watch the agents talk (3 turns each).
- Take over as any agent — reply as if you’re them.
- Ask another AI agent to mediate.
- Introduce a new conflicting scenario during the conversation.
- Try to resolve the challenges.
- 🧠 OpenAI GPT-4o
- ⚛️ React (with Vite)
- 💅 Material-UI (MUI)
- 🌐 Express.js
- 🔐 dotenv
| Problem | Fix |
|---|---|
fetch failed / no response |
Make sure server is running (node server.js) |
OPENAI_API_KEY not set |
Double check your .env file |
| CORS issue in browser console | Restart both server and frontend if URLs changed |
| Page doesn't load | Try npm install again in both client/ and server/ folders |
Feel free to explore the code, modify traits, and see how AI handles different personalities and scenarios.
Good luck, and may the best team resolve conflicts with style! ✨