An open-source AI task agent built with Python that helps you manage and organize your tasks efficiently through an interactive command-line interface powered by artificial intelligence.
- ✅ Task Management — Add, view, and organize tasks easily
- 🤖 AI Integration — Powered by OpenAI's API for intelligent task handling
- 💻 CLI Interface — Simple and intuitive command-line interaction
- 🔧 Extensible — Easy to extend with new features and capabilities
- 📝 Lightweight — Minimal dependencies, fast and efficient
- 🆓 Open Source — MIT licensed, contributions welcome
Before you begin, ensure you have:
- Python 3.7 or higher installed
- An OpenAI API key (get one at platform.openai.com)
-
Clone the repository:
git clone https://github.com/Sapna700/TaskPilot-AI.git cd TaskPilot-AI -
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
cp .env.example .env
-
Add your OpenAI API key: Edit the
.envfile and replaceyour_api_key_herewith your actual OpenAI API key:OPENAI_API_KEY=sk-your-actual-api-key-here
Run the application:
python src/main.pyYou'll see an interactive prompt. Here are the available commands:
| Command | Description | Example |
|---|---|---|
add <task> |
Add a new task | add Buy groceries |
tasks |
Display all tasks | tasks |
complete <number> |
Mark a task as complete | complete 1 |
ai <question> |
Ask AI a question | ai How should I prioritize my tasks? |
exit |
Exit the application | exit |
Welcome to TaskPilot AI!
Commands:
add <task>
tasks
complete <number>
ai <your question>
exit
You: add Complete project proposal
Task added: Complete project proposal
You: add Review pull requests
Task added: Review pull requests
You: tasks
1. Complete project proposal
2. Review pull requests
You: ai What should I do first?
TaskPilot AI:
Based on your tasks, I recommend starting with the project proposal as it's often time-sensitive...
You: complete 1
Task completed: Complete project proposal
You: exit
Goodbye!
TaskPilot-AI/
├── src/
│ ├── agent.py # TaskPilot agent class with task management and AI logic
│ └── main.py # CLI entry point and interactive loop
├── requirements.txt # Python dependencies
├── .env.example # Example environment configuration
├── CONTRIBUTING.md # Contribution guidelines
├── LICENSE # MIT License
└── README.md # This file
-
Agent Class (
src/agent.py) — Manages task storage and AI interactionsadd_task(task)— Adds a new task to the listview_tasks()— Displays all stored taskscomplete_task(task_number)— Marks a task as completeask_ai(user_message)— Sends questions to OpenAI API for intelligent responses
-
Main CLI (
src/main.py) — Provides user interaction- Accepts user commands in an interactive loop
- Routes commands to the appropriate agent methods
- Displays AI responses and task updates
- Provides user-friendly feedback
- Python 3 — Core programming language
- OpenAI API — AI-powered task intelligence and suggestions
- python-dotenv — Environment variable management
We welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
- Fork this repository
- Create a new branch (
git checkout -b feature/your-feature) - Make your changes and test them
- Commit your changes (
git commit -m 'Add your feature') - Push to your branch (
git push origin feature/your-feature) - Open a Pull Request
See CONTRIBUTING.md for more details.
- Basic task management (add, view, complete)
- OpenAI API integration
- Task persistence (save to database/file)
- Task prioritization levels
- Due date support
- Task categorization/tagging
- Advanced AI features (task suggestions, auto-completion)
- Web UI interface
- API server mode
- Task scheduling and reminders
This project is licensed under the MIT License — see the LICENSE file for details.
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Include your Python version and error messages
Happy task management! 🚀