-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Arya Pratap Singh <[email protected]>
- Loading branch information
1 parent
9199a45
commit dea23fb
Showing
15 changed files
with
571 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,209 @@ | ||
# CoAgents Starter | ||
|
||
This example contains a simple starter project. | ||
# Learn Coding with CopilotKit, CoAgents, and LangGraphs 🚀 | ||
|
||
**These instructions assume you are in the `coagents-starter/` directory** | ||
[![CopilotKit](https://img.shields.io/badge/Powered%20By-CopilotKit-brightgreen)](https://github.com/copilotkit) | ||
[![Frontend: Next.js](https://img.shields.io/badge/Frontend-Next.js-orange)](https://nextjs.org/) | ||
[![Demo Video](https://img.shields.io/badge/Watch-Demo%20Video-red)](https://youtu.be/E1q67IDcdMU) | ||
[![Website](https://img.shields.io/badge/Website-Live-brightgreen)](https://learn-coding-with-copilotkit.vercel.app/) | ||
|
||
## Running the Agent | ||
--- | ||
|
||
First, install the dependencies: | ||
## 📖 **About** | ||
|
||
```sh | ||
cd agent | ||
poetry install | ||
``` | ||
**Not everyone can code, but everyone can learn.** | ||
|
||
Then, create a `.env` file inside `./agent` with the following: | ||
This project is an AI-powered **DSA/Competitive Programming Helper** with an inbuilt editor to help you: | ||
- Prepare for **coding interviews** | ||
- Start learning how to code from scratch | ||
- **Visualize everything** with intuitive representations | ||
|
||
``` | ||
GROQ_API_KEY=... | ||
``` | ||
**Experience the future of coding education!** | ||
|
||
IMPORTANT: | ||
Make sure the OpenAI API Key you provide, supports gpt-4o. | ||
🌐 Live Demo: [learn-coding-with-copilotkit.vercel.app](https://learn-coding-with-copilotkit.vercel.app/) | ||
|
||
Then, run the demo: | ||
--- | ||
|
||
```sh | ||
poetry run demo | ||
``` | ||
## 🌟 **Why CopilotKit?** | ||
|
||
## Running the UI | ||
- **Seamless Integration**: Build AI copilots that enhance user experiences effortlessly. | ||
- **Open Source**: Join a thriving community of developers using and contributing to CopilotKit. | ||
- **Future-Ready**: Perfect for in-app AI agents, context-aware chatbots, shared state and beyond! | ||
|
||
First, install the dependencies: | ||
Learn more about [CopilotKit](https://github.com/copilotkit). | ||
|
||
```sh | ||
cd ./ui | ||
pnpm i | ||
``` | ||
--- | ||
|
||
Then, create a `.env` file inside `./ui` with the following: | ||
|
||
``` | ||
GROQ_API_KEY=... | ||
``` | ||
## 🛠️ **Project Description** | ||
|
||
Then, run the Next.js project: | ||
Learn coding in a revolutionary way using **CopilotKit**, **CoAgents**, and **LangGraphs**! This project showcases how cutting-edge tools can simplify coding education through interactive UI and AI-driven technologies. | ||
|
||
```sh | ||
pnpm run dev | ||
``` | ||
### Key Features: | ||
- **🌐 CopilotKit**: Effortlessly integrate AI copilots into your apps, enabling in-app chatbots, context-aware interactions, and more. | ||
- **🤖 CoAgents**: A robust infrastructure for connecting LangGraph agents to humans in the loop, enabling seamless collaboration. | ||
- **📊 LangGraphs**: Visual representations of programming languages to simplify understanding of their structure and syntax. | ||
- **🖥️ Inbuilt Editor**: A powerful coding editor designed to boost productivity and learning. | ||
|
||
## Usage | ||
--- | ||
|
||
Navigate to [http://localhost:3000](http://localhost:3000). | ||
|
||
# LangGraph Studio | ||
## Screenshots | ||
|
||
Run LangGraph studio, then load the `./agent` folder into it. | ||
<details> | ||
<summary>View Achieved Accuracy</summary> | ||
|
||
<div align="center"> | ||
<img src="screenshots/codechef-one.png" alt="Screenshot 1" width="800px"/> | ||
<img src="screenshots/codechef-one-diagram.png" alt="Screenshot 2" width="800px"/> | ||
<img src="screenshots/codechef-two.png" alt="Screenshot 3" width="800px"/> | ||
<img src="screenshots/codechef-two-diagram.png" alt="Screenshot 4" width="800px"/> | ||
</div> | ||
|
||
Make sure to create teh `.env` mentioned above first! | ||
</details> | ||
|
||
# Troubleshooting | ||
|
||
A few things to try if you are running into trouble: | ||
## 🏗️ **Tech Stack** | ||
|
||
### Frontend: | ||
- [Next.js](https://nextjs.org/) | ||
- [ShadCN UI](https://shadcn.dev/) | ||
- [Tailwind CSS](https://tailwindcss.com/) | ||
- [CopilotKit-UI](https://github.com/copilotkit) | ||
|
||
### Backend: | ||
- [Python](https://www.python.org/) | ||
- [FastAPI](https://fastapi.tiangolo.com/) | ||
- [LangGraphs](https://langgraphs.example) | ||
- [CopilotKit](https://github.com/copilotkit) | ||
|
||
### APIs: | ||
- [Groq](https://groq.com/) | ||
- [Llama-70B](https://example.com/) | ||
|
||
--- | ||
|
||
## 📚 **Topics Covered** | ||
|
||
- **TypeScript** | ||
- **Next.js** | ||
- **Competitive Programming** | ||
- **Tailwind CSS** | ||
- **Render Deployment** | ||
- **Koyeb API** | ||
- **ShadCN-UI** | ||
- **Llama-70B** | ||
- **Groq AI** | ||
- **CopilotKit** | ||
- **LangGraph (Python)** | ||
- **CoAgents** | ||
|
||
--- | ||
|
||
## ⚙️ **Installation** | ||
|
||
Clone the repository: | ||
|
||
```bash | ||
git clone https://github.com/<your-repo-name>.git | ||
``` | ||
|
||
--- | ||
|
||
### 🧩 **Configuration** | ||
|
||
1. Install the dependencies for the backend: | ||
|
||
```bash | ||
cd agent | ||
poetry install | ||
``` | ||
|
||
2. Create a `.env` file in the `./agent` directory: | ||
|
||
```plaintext | ||
GROQ_API_KEY=your_groq_api_key_here | ||
``` | ||
|
||
3. Run the demo: | ||
|
||
```bash | ||
poetry run demo | ||
``` | ||
|
||
--- | ||
|
||
### 🖥️ **Running the UI** | ||
|
||
1. Install the dependencies for the frontend: | ||
|
||
```bash | ||
cd ./frontend-interface | ||
npm i --legacy-peer-deps | ||
``` | ||
|
||
2. Create a `.env` file in the `./frontend-interface` directory: | ||
|
||
```plaintext | ||
GROQ_API_KEY=your_groq_api_key_here | ||
``` | ||
|
||
3. Run the Next.js project: | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
4. Navigate to [http://localhost:3000](http://localhost:3000). | ||
|
||
--- | ||
|
||
### 🖥️ **Running the Backend** | ||
|
||
1. Install the dependencies for the backend: | ||
|
||
```bash | ||
cd ./backend | ||
pip install -r -requirements.txt | ||
``` | ||
|
||
2. Create a `.env` file in the `./frontend-interface` directory: | ||
|
||
```plaintext | ||
GROQ_API_KEY=your_groq_api_key_here | ||
``` | ||
|
||
3. Run the FAST API server: | ||
|
||
```bash | ||
python run_agent.py | ||
``` | ||
|
||
--- | ||
|
||
|
||
## 🧑💻 **Usage** | ||
|
||
1. **Launch LangGraph Studio**: | ||
Run LangGraph Studio and load the `./agent` folder into it. | ||
|
||
2. **Ensure proper configuration**: Make sure the `.env` file is properly configured as mentioned in the setup steps. | ||
|
||
--- | ||
|
||
## 🔧 **Troubleshooting** | ||
|
||
If you encounter any issues, try the following: | ||
|
||
1. Ensure no other application is running on port `8000`. | ||
2. In `/agent/dsa_agent/demo.py`, change `0.0.0.0` to `127.0.0.1` or `localhost`. | ||
|
||
--- | ||
|
||
## 📜 **License** | ||
|
||
This project is [UN Licensed](LICENSE). | ||
|
||
--- | ||
|
||
Give CopilotKit a ⭐ on [GitHub](https://github.com/copilotkit) if you love it! | ||
|
||
1. Make sure there is no other local application server running on the 8000 port. | ||
2. Under `/agent/my_agent/demo.py`, change `0.0.0.0` to `127.0.0.1` or to `localhost` |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.