Skip to content

sarthakkapila/Kairos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kairos

Important

App works best when installed locally!

Getting Started

To get started with Kairos, follow these steps:

Tech Stack

  • Langchain
  • Streamlit
  • Gemini API
  • Jinja2 for prompt templating
  • Bs4 & googlesearch api for scraping
  • KeyBERT for keyword extraction
  • Streamlit share for deployment

Local Installation

  1. Clone the repository: git clone https://github.com/sarthakkapila/kairos.git
  2. Go to main dir: cd kairos
  3. Create virtual env: python -m venv kairos
  4. Activate virtual env: source kairos/bin/activate (for windows): kairos/Scripts/activate
  5. Install all dependencies: pip install -r requirements.txt

Product Demo

Important

Please reload the demo 1 or 2 times for it to work properly.

High level system design of the app

Workflow of kairos

The high level workflow is divided into different steps. The user selects a base model, for now Gemini-Pro. When provided with the api. The user is directed to workspace page where they input a prompt.

DecisonTaker

The input prompt given by the user is processed and the DecisionTaken agent determines the course of action. We have divided the DecisonTaker into 2 types of queries i.e.

  • Code-related
  • Non Code-related

Currently we have limited the non-code related queries.

Planner

Kairos generates a step-by-step plan using Planner agent, which is then presented visually, Step Formulation: Drawing from the objective and context, Kairos devises a series of broad steps to achieve the task.

Keyword-Extractor

The prompt's keywords are extracted as the name suggests. To extract the keywords we have employed BERT model which divides the prompt into nuances and find significance behind the words within. Working of bert: the Bert model is used to extract the keywords and rank them based on their relevance to the user's prompt. Kairos then pinpoints each part performs a research on it using Researcher Agent , retrieving information for task.

Researcher

Researcher agent maintain search queries, which expands its knowledge base. Based on the contextual keywords extracted above, Kairos creates helpful search queries that can be emplyed with the googlesearch-py. Then the requests module is used to fetch the web pages of the queries. Using the beautifulsoup library, we extract the content from the web pages for processing.

Browser

Then, Kairos conducts internet searches based on queries, The info is then present in JSON format (For now) in browser tab.

Coder Agent

The Coder agent then utilizes the plan and acquired information to write code. Then, the code generation module crafts code based on the planner, researcher, & taking in consider user prompts/specs. High level design -> Drawing from the planner, it constructs the foundational code, including classes fn etc. Then the rest of the code including algos, data etc are added which were extrated from research, the knowledge repo, thus code is produced.

Creator Agent

Finally, Kairos's Creator agent generates and executes Python code to create and organize project directory and & different files.

Following the code generation, Kairos initiates the creation of a Python script utilizing the os module. Then it begins organizing the project files and folders generated previously during the coding phase of the project.

Screenshots

Screenshot 2024-04-06 at 11 01 44 PM Screenshot 2024-04-06 at 11 02 08 PM Screenshot 2024-04-06 at 11 03 28 PM Screenshot 2024-04-06 at 11 09 06 PM Screenshot 2024-04-06 at 11 08 29 PM Screenshot 2024-04-06 at 11 08 41 PM Screenshot 2024-04-06 at 11 08 51 PM Screenshot 2024-04-06 at 11 09 28 PM Screenshot 2024-04-06 at 11 09 22 PM Screenshot 2024-04-06 at 7 25 20 AM Screenshot 2024-04-06 at 11 09 16 PM

About

SWE Agent (simplified Devin AI)🧠🤖

Resources

License

Stars

Watchers

Forks

Packages

No packages published