├── requirements.txt ├── agent ├── ai_researcher │ ├── __init__.py │ ├── __pycache__ │ │ ├── demo.cpython-312.pyc │ │ ├── agent.cpython-312.pyc │ │ ├── model.cpython-312.pyc │ │ ├── search.cpython-312.pyc │ │ ├── state.cpython-312.pyc │ │ ├── steps.cpython-312.pyc │ │ ├── __init__.cpython-312.pyc │ │ ├── extract.cpython-312.pyc │ │ └── summarize.cpython-312.pyc │ ├── model.py │ ├── demo.py │ ├── state.py │ ├── agent.py │ ├── search.py │ ├── summarize.py │ ├── extract.py │ └── steps.py ├── .gitignore ├── langgraph.json └── pyproject.toml ├── .eslintrc.json ├── public ├── cv.png ├── dp.jpg ├── robot.png ├── chat-app.png ├── reading.png ├── workflow.png ├── youtube.png ├── accounting.png ├── event-list.png ├── frequency.png ├── leadership.png ├── product-release.png ├── link.svg ├── twit.svg └── git.svg ├── structure.txt ├── src ├── app │ ├── favicon.ico │ ├── loading.tsx │ ├── page.tsx │ ├── study-buddy │ │ ├── page.tsx │ │ └── instructions.ts │ ├── api │ │ └── copilotkit │ │ │ └── route.ts │ ├── chat │ │ ├── instructions.ts │ │ └── page.tsx │ ├── expensetracker │ │ └── instructions.ts │ ├── todo │ │ └── page.tsx │ ├── layout.tsx │ ├── spreadsheet │ │ ├── instructions.ts │ │ └── page.tsx │ └── globals.css ├── lib │ ├── utils.ts │ ├── tasks.types.ts │ ├── default-tasks.ts │ ├── research-provider.tsx │ └── hooks │ │ └── use-tasks.tsx ├── components │ ├── Spreadsheet │ │ ├── type.ts │ │ ├── canonicalSpreadsheetData.ts │ │ ├── Sidebar.tsx │ │ ├── PreviewSpreadsheetChanges.tsx │ │ └── SingleSpreadsheet.tsx │ ├── StudyBuddy │ │ ├── AnswerMarkdown.tsx │ │ ├── SkeletonLoader.tsx │ │ ├── ResearchWrapper.tsx │ │ ├── Progress.tsx │ │ ├── ResultsView.tsx │ │ └── HomeView.tsx │ ├── ui │ │ ├── skeleton.tsx │ │ ├── label.tsx │ │ ├── textarea.tsx │ │ ├── input.tsx │ │ ├── meteors.tsx │ │ ├── checkbox.tsx │ │ ├── Spotlight.tsx │ │ ├── button.tsx │ │ ├── card.tsx │ │ ├── accordion.tsx │ │ ├── background-gradient.tsx │ │ ├── flip-words.tsx │ │ ├── moving-border.tsx │ │ ├── dialog.tsx │ │ ├── multi-step-loader.tsx │ │ ├── use-toast.ts │ │ ├── typewriter-effect.tsx │ │ ├── toast.tsx │ │ ├── floating-dock.tsx │ │ ├── background-beams-with-collision.tsx │ │ ├── placeholders-and-vanish-input.tsx │ │ └── background-beams.tsx │ ├── Home │ │ ├── FAQ.tsx │ │ ├── Footer.tsx │ │ ├── Header.tsx │ │ ├── Features.tsx │ │ ├── FloatingDock.tsx │ │ ├── Hero.tsx │ │ └── Feedback.tsx │ └── Todo │ │ ├── AddTodo.tsx │ │ ├── TasksList.tsx │ │ └── Task.tsx └── data │ └── index.ts ├── next.config.mjs ├── postcss.config.mjs ├── .vscode └── cspell.json ├── .gitignore ├── tsconfig.json ├── LICENSE ├── package.json ├── tailwind.config.ts ├── CONTRIBUTING.md ├── CODE_OF_CONDUCT.md └── README.md /requirements.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /agent/ai_researcher/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /agent/.gitignore: -------------------------------------------------------------------------------- 1 | venv/ 2 | __pycache__/ 3 | *.pyc 4 | .env 5 | .vercel 6 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/core-web-vitals", "next/typescript"] 3 | } 4 | -------------------------------------------------------------------------------- /public/cv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/public/cv.png -------------------------------------------------------------------------------- /public/dp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/public/dp.jpg -------------------------------------------------------------------------------- /structure.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/structure.txt -------------------------------------------------------------------------------- /public/robot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/public/robot.png -------------------------------------------------------------------------------- /public/chat-app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/public/chat-app.png -------------------------------------------------------------------------------- /public/reading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/public/reading.png -------------------------------------------------------------------------------- /public/workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/public/workflow.png -------------------------------------------------------------------------------- /public/youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/public/youtube.png -------------------------------------------------------------------------------- /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/src/app/favicon.ico -------------------------------------------------------------------------------- /public/accounting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/public/accounting.png -------------------------------------------------------------------------------- /public/event-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/public/event-list.png -------------------------------------------------------------------------------- /public/frequency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/public/frequency.png -------------------------------------------------------------------------------- /public/leadership.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/public/leadership.png -------------------------------------------------------------------------------- /public/product-release.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/public/product-release.png -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /agent/ai_researcher/__pycache__/demo.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/agent/ai_researcher/__pycache__/demo.cpython-312.pyc -------------------------------------------------------------------------------- /agent/ai_researcher/__pycache__/agent.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/agent/ai_researcher/__pycache__/agent.cpython-312.pyc -------------------------------------------------------------------------------- /agent/ai_researcher/__pycache__/model.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/agent/ai_researcher/__pycache__/model.cpython-312.pyc -------------------------------------------------------------------------------- /agent/ai_researcher/__pycache__/search.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/agent/ai_researcher/__pycache__/search.cpython-312.pyc -------------------------------------------------------------------------------- /agent/ai_researcher/__pycache__/state.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/agent/ai_researcher/__pycache__/state.cpython-312.pyc -------------------------------------------------------------------------------- /agent/ai_researcher/__pycache__/steps.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/agent/ai_researcher/__pycache__/steps.cpython-312.pyc -------------------------------------------------------------------------------- /agent/ai_researcher/__pycache__/__init__.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/agent/ai_researcher/__pycache__/__init__.cpython-312.pyc -------------------------------------------------------------------------------- /agent/ai_researcher/__pycache__/extract.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/agent/ai_researcher/__pycache__/extract.cpython-312.pyc -------------------------------------------------------------------------------- /agent/ai_researcher/__pycache__/summarize.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AkashJana18/copilotmate/HEAD/agent/ai_researcher/__pycache__/summarize.cpython-312.pyc -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /agent/langgraph.json: -------------------------------------------------------------------------------- 1 | { 2 | "python_version": "3.12", 3 | "dockerfile_lines": [], 4 | "dependencies": ["."], 5 | "graphs": { 6 | "ai_researcher": "./ai_researcher/agent.py:graph" 7 | }, 8 | "env": ".env" 9 | } 10 | -------------------------------------------------------------------------------- /src/components/Spreadsheet/type.ts: -------------------------------------------------------------------------------- 1 | export interface Cell { 2 | value: string; 3 | } 4 | 5 | export type SpreadsheetRow = Cell[]; 6 | 7 | export interface SpreadsheetData { 8 | title: string; 9 | rows: SpreadsheetRow[]; 10 | } -------------------------------------------------------------------------------- /src/app/loading.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | import { MultiStepLoader as Loader } from "@/components/ui/multi-step-loader"; 3 | import { loadingStates } from "@/data"; 4 | 5 | export default function Loading() { 6 | return( 7 | 8 | ) 9 | } -------------------------------------------------------------------------------- /src/components/StudyBuddy/AnswerMarkdown.tsx: -------------------------------------------------------------------------------- 1 | import Markdown from "react-markdown"; 2 | 3 | export function AnswerMarkdown({ markdown }: { markdown: string }) { 4 | return ( 5 |
6 | {markdown} 7 |
8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /.vscode/cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2", 3 | "language": "en", 4 | "words": [ 5 | "langgraph", 6 | "langchain", 7 | "perplexity", 8 | "ainvoke", 9 | "pydantic", 10 | "tavily", 11 | "copilotkit", 12 | "fastapi", 13 | "uvicorn", 14 | "checkpointer" 15 | ] 16 | } -------------------------------------------------------------------------------- /src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
12 | ) 13 | } 14 | 15 | export { Skeleton } 16 | -------------------------------------------------------------------------------- /src/lib/tasks.types.ts: -------------------------------------------------------------------------------- 1 | export type Task = { 2 | id: number; 3 | title: string; 4 | status: TaskStatus; 5 | priority: TaskPriority; // Add priority field 6 | }; 7 | 8 | export enum TaskStatus { 9 | todo = "todo", 10 | completed = "completed", 11 | } 12 | 13 | export enum TaskPriority { 14 | low = "low", 15 | medium = "medium", 16 | high = "high", 17 | } 18 | 19 | -------------------------------------------------------------------------------- /src/app/page.tsx: -------------------------------------------------------------------------------- 1 | 2 | import FAQ from "@/components/Home/Faq"; 3 | import Features from "@/components/Home/Features"; 4 | import FeedbackSection from "@/components/Home/Feedback"; 5 | import Hero from "@/components/Home/Hero"; 6 | 7 | 8 | export default function Home() { 9 | return ( 10 |
11 | 12 | 13 | 14 | 15 |
16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | .env 31 | 32 | # vercel 33 | .vercel 34 | 35 | # typescript 36 | *.tsbuildinfo 37 | next-env.d.ts 38 | -------------------------------------------------------------------------------- /src/app/study-buddy/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { ResearchWrapper } from "@/components/StudyBuddy/ResearchWrapper"; 4 | import { ResearchProvider } from "@/lib/research-provider"; 5 | import { CopilotKit } from "@copilotkit/react-core"; 6 | 7 | export default function Home() { 8 | return ( 9 | 10 |
11 | 12 | 13 | 14 |
15 |
16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /agent/ai_researcher/model.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module provides a function to get a model based on the configuration. 3 | """ 4 | import os 5 | import getpass 6 | from langchain_groq import ChatGroq 7 | 8 | 9 | def get_model(): 10 | """ 11 | Get a model based on the environment variable. 12 | """ 13 | 14 | if "GROQ_API_KEY" not in os.environ: 15 | os.environ["GROQ_API_KEY"] = getpass.getpass("Enter your Groq API key: ") 16 | model = ChatGroq( 17 | model="llama3-groq-8b-8192-tool-use-preview", 18 | temperature=0, 19 | ) 20 | 21 | if model: 22 | return model 23 | raise ValueError("Invalid model specified") 24 | -------------------------------------------------------------------------------- /src/lib/default-tasks.ts: -------------------------------------------------------------------------------- 1 | import { Task, TaskStatus } from "./tasks.types"; 2 | 3 | export const defaultTasks: Task[] = [ 4 | { 5 | id: 1, 6 | title: "Vote this project on Quira.", 7 | status: TaskStatus.todo, 8 | }, 9 | { 10 | id: 2, 11 | title: "Solve 3 DSA questions", 12 | status: TaskStatus.completed, 13 | }, 14 | { 15 | id: 3, 16 | title: "Study for upcoming test.", 17 | status: TaskStatus.todo, 18 | }, 19 | { 20 | id: 4, 21 | title: "Prepare youtube video for quira submission.", 22 | status: TaskStatus.todo, 23 | }, 24 | { 25 | id: 5, 26 | title: "Give a star on this repo.", 27 | status: TaskStatus.todo, 28 | }, 29 | ]; -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve", 14 | "incremental": true, 15 | "plugins": [ 16 | { 17 | "name": "next" 18 | } 19 | ], 20 | "paths": { 21 | "@/*": ["./src/*"] 22 | } 23 | }, 24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 25 | "exclude": ["node_modules"] 26 | } 27 | -------------------------------------------------------------------------------- /src/components/Spreadsheet/canonicalSpreadsheetData.ts: -------------------------------------------------------------------------------- 1 | import { SpreadsheetRow } from "./type"; 2 | 3 | export interface RowLike { 4 | cells: CellLike[] | undefined; 5 | } 6 | 7 | export interface CellLike { 8 | value: string; 9 | } 10 | 11 | export function canonicalSpreadsheetData( 12 | rows: RowLike[] | undefined 13 | ): SpreadsheetRow[] { 14 | const canonicalRows: SpreadsheetRow[] = []; 15 | 16 | for (const row of rows || []) { 17 | const canonicalRow: SpreadsheetRow = []; 18 | for (const cell of row.cells || []) { 19 | canonicalRow.push({value: cell.value}); 20 | } 21 | canonicalRows.push(canonicalRow); 22 | } 23 | 24 | return canonicalRows; 25 | } -------------------------------------------------------------------------------- /agent/ai_researcher/demo.py: -------------------------------------------------------------------------------- 1 | """Demo""" 2 | 3 | from dotenv import load_dotenv 4 | load_dotenv() 5 | 6 | from fastapi import FastAPI 7 | import uvicorn 8 | from copilotkit.integrations.fastapi import add_fastapi_endpoint 9 | from copilotkit import CopilotKitSDK, LangGraphAgent 10 | from ai_researcher.agent import graph 11 | 12 | app = FastAPI() 13 | sdk = CopilotKitSDK( 14 | agents=[ 15 | LangGraphAgent( 16 | name="studybuddy_agent", 17 | description="Study Search agent.", 18 | agent=graph, 19 | ) 20 | ], 21 | ) 22 | 23 | add_fastapi_endpoint(app, sdk, "/copilotkit") 24 | 25 | def main(): 26 | """Run the uvicorn server.""" 27 | uvicorn.run("ai_researcher.demo:app", host="127.0.0.1", port=8000, reload=True) 28 | -------------------------------------------------------------------------------- /agent/ai_researcher/state.py: -------------------------------------------------------------------------------- 1 | """ 2 | This is the state definition for the AI. 3 | It defines the state of the agent and the state of the conversation. 4 | """ 5 | 6 | from typing import List, TypedDict, Optional 7 | from langgraph.graph import MessagesState 8 | 9 | class Step(TypedDict): 10 | """ 11 | Represents a step taken in the research process. 12 | """ 13 | id: str 14 | description: str 15 | status: str 16 | type: str 17 | description: str 18 | search_result: Optional[str] 19 | result: Optional[str] 20 | updates: Optional[List[str]] 21 | 22 | class AgentState(MessagesState): 23 | """ 24 | This is the state of the agent. 25 | It is a subclass of the MessagesState class from langgraph. 26 | """ 27 | steps: List[Step] 28 | answer: Optional[str] 29 | -------------------------------------------------------------------------------- /src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as LabelPrimitive from "@radix-ui/react-label" 5 | import { cva, type VariantProps } from "class-variance-authority" 6 | 7 | import { cn } from "@/lib/utils" 8 | 9 | const labelVariants = cva( 10 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 11 | ) 12 | 13 | const Label = React.forwardRef< 14 | React.ElementRef, 15 | React.ComponentPropsWithoutRef & 16 | VariantProps 17 | >(({ className, ...props }, ref) => ( 18 | 23 | )) 24 | Label.displayName = LabelPrimitive.Root.displayName 25 | 26 | export { Label } 27 | -------------------------------------------------------------------------------- /src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | export interface TextareaProps 6 | extends React.TextareaHTMLAttributes {} 7 | 8 | const Textarea = React.forwardRef( 9 | ({ className, ...props }, ref) => { 10 | return ( 11 |