This project is a terminal-based AI assistant built using:
- LangChain for managing prompts and tools
- LangGraph for agent orchestration
- OpenAI API as the backend LLM
- Python for development
The assistant can:
- 🔢 Perform basic arithmetic (calculator)
- 📏 Convert meters to feet
- ⏰ Tell the current time and date
- 📝 Summarize short text
- 😂 Tell random programming jokes
- 🙋 Greet the user by name
You: Add 10 and 25
Assistant: The result of adding 10.0 and 25.0 is 35.0
You: Convert 5 meters to feet
Assistant: 5.0 meters is equal to 16.40 feet
You: What’s the current time?
Assistant: Current date and time: 2025-08-03 00:30:00
You: Summarize this: LangChain is a framework for developing LLM-based applications...
Assistant: Summary: LangChain is a framework for developing LLM-b...
You: Tell me a joke
Assistant: Why do programmers prefer dark mode? Because light attracts bugs!
You: Greet Arsh
Assistant: Hello Arsh! I'm happy to assist you today 😊
git clone https://github.com/Arsh-pixel-cmd/ai-assistant-langchain.git
cd ai-assistant-langchain
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
uv pip install -r pyproject.toml
.env
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
python main.py
. ├── main.py # Main assistant logic ├── pyproject.toml # Dependency and project metadata ├── .gitignore # Ignored files and folders ├── .env # Contains your OpenAI API Key (excluded from Git) ├── .venv/ # Virtual environment (excluded) ├── .mypy_cache/ # Cache (excluded) └── README.md # You're reading this!
This project is licensed under the MIT License.