This is a full-stack task management application that features an AI agent to help you manage your tasks. You can create, update, list, and delete tasks by chatting with the AI agent in a real-time interface.
This project is built with a modern tech stack, featuring a Python backend and a Next.js frontend.
- Backend: Python, FastAPI, LangGraph, SQLAlchemy, PostgreSQL
- Frontend: Next.js, TypeScript, TailwindCSS, Socket.IO
- AI: Google Gemini
Before you begin, ensure you have the following installed on your local machine:
- Python (3.9 or later)
- Node.js (18.x or later)
- PostgreSQL
Follow these steps to get the project up and running on your local machine.
git clone https://github.com/vignesh1683/agentic-task-management.git
cd agentic-task-management-
Navigate to the backend directory:
cd backend -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up the database:
- Log in to your PostgreSQL server and create a new database.
CREATE DATABASE taskmanager;
- Log in to your PostgreSQL server and create a new database.
-
Configure the environment variables:
- Create a
.envfile in thebackenddirectory by copying the example file:cp .env.example .env
- Open the
.envfile and update the following variables with your own credentials:DATABASE_URL=postgresql+asyncpg://user:password@localhost:5432/taskmanager GEMINI_API_KEY=your_gemini_api_key
- Create a
-
Navigate to the frontend directory:
cd ../client -
Install the required dependencies:
npm install
-
Start the backend server:
- In the
backenddirectory, run the following command:uvicorn app.main:app --reload
- The backend will be running at
http://localhost:8000.
- In the
-
Start the frontend server:
- In the
clientdirectory, run the following command:npm run dev
- The frontend will be running at
http://localhost:3000.
- In the
.
├── backend
│ ├── app
│ │ ├── agent # AI agent logic with LangGraph
│ │ ├── database # Database connection and models
│ │ ├── websocket # WebSocket connection manager
│ │ └── main.py # FastAPI application entrypoint
│ ├── .env.example # Example environment variables
│ └── requirements.txt # Python dependencies
├── client
│ ├── src
│ │ ├── app # Next.js application pages
│ │ ├── components # React components
│ │ ├── lib # Helper functions and hooks
│ │ └── types # TypeScript type definitions
│ ├── package.json # Node.js dependencies
│ └── next.config.ts # Next.js configuration
└── README.md
In the client directory, you can run the following scripts:
| Script | Description |
|---|---|
dev |
Runs the app in development mode. |
build |
Builds the app for production. |
start |
Starts the production server. |
lint |
Runs the linter to check for code quality. |
The backend exposes the following endpoints:
-
GET /health- Returns a status of "healthy" to indicate that the server is running.
-
WS /ws/chat- The main WebSocket endpoint for real-time communication between the client and the AI agent.
- Client to Server: Send a JSON message with a
messagekey containing the user's input.{ "message": "Create a new task to buy groceries" } - Server to Client: The server sends various message types, including
agent_response,task_update, anderror.
Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.