You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We welcome contributions to enhance Devika's capabilities and improve its performance. To contribute, please follow these steps:
1
+
# Welcome Contributors
2
+
We welcome contributions to enhance Devika's capabilities and improve its performance. To report bugs, create a [GitHub issue](https://github.com/stitionai/devika/issues).
3
+
4
+
> Before contributing, read through the existing issues and pull requests to see if someone else is already working on something similar. That way you can avoid duplicating efforts.
5
+
6
+
To contribute, please follow these steps:
2
7
3
8
1. Fork the Devika repository on GitHub.
4
9
2. Create a new branch for your feature or bug fix.
5
10
3. Make your changes and ensure that the code passes all tests.
6
11
4. Submit a pull request describing your changes and their benefits.
7
12
13
+
14
+
### Pull Request Guidelines
15
+
When submitting a pull request, please follow these guidelines:
16
+
17
+
1.**Title**: please include following prefixes:
18
+
-`Feature:` for new features
19
+
-`Fix:` for bug fixes
20
+
-`Docs:` for documentation changes
21
+
-`Refactor:` for code refactoring
22
+
-`Improve:` for performance improvements
23
+
-`Other:` for other changes
24
+
25
+
for example:
26
+
-`Feature: added new feature to the code`
27
+
-`Fix: fixed the bug in the code`
28
+
29
+
2.**Description**: Provide a clear and detailed description of your changes in the pull request. Explain the problem you are solving, the approach you took, and any potential side effects or limitations of your changes.
30
+
3.**Documentation**: Update the relevant documentation to reflect your changes. This includes the README file, code comments, and any other relevant documentation.
31
+
4.**Dependencies**: If your changes require new dependencies, ensure that they are properly documented and added to the `requirements.txt` or `package.json` files.
32
+
5. if the pull request does not meet the above guidelines, it may be closed without merging.
33
+
34
+
35
+
**Note**: Please ensure that you have the latest version of the code before creating a pull request. If you have an existing fork, just sync your fork with the latest version of the Devika repository.
36
+
37
+
8
38
Please adhere to the coding conventions, maintain clear documentation, and provide thorough testing for your contributions.
Devika's system architecture consists of the following key components:
53
+
Read [**README.md**](docs/architecture) for the detailed documentation.
58
54
59
-
1.**User Interface**: A web-based chat interface for interacting with Devika, viewing project files, and monitoring the agent's state.
60
-
2.**Agent Core**: The central component that orchestrates the AI planning, reasoning, and execution process. It communicates with various sub-agents and modules to accomplish tasks.
61
-
3.**Large Language Models**: Devika leverages state-of-the-art language models like **Claude**, **GPT-4**, and **Local LLMs via Ollama** for natural language understanding, generation, and reasoning.
62
-
4.**Planning and Reasoning Engine**: Responsible for breaking down high-level objectives into actionable steps and making decisions based on the current context.
63
-
5.**Research Module**: Utilizes keyword extraction and web browsing capabilities to gather relevant information for the task at hand.
64
-
6.**Code Writing Module**: Generates code based on the plan, research findings, and user requirements. Supports multiple programming languages.
65
-
7.**Browser Interaction Module**: Enables Devika to navigate websites, extract information, and interact with web elements as needed.
66
-
8.**Knowledge Base**: Stores and retrieves project-specific information, code snippets, and learned knowledge for efficient access.
67
-
9.**Database**: Persists project data, agent states, and configuration settings.
68
55
69
-
Read [**ARCHITECTURE.md**](https://github.com/stitionai/devika/blob/main/ARCHITECTURE.md) for the detailed documentation.
3. Install and setup `Ollama` (https://ollama.com/) (if you don't want to use the local models then you can skip this step)
78
-
79
-
For ollama you need to install the [models](https://ollama.com/models)<br>
80
-
For API models, configure the API keys via setting page in UI. <br><br>
81
-
82
-
Then execute the following set of command:
56
+
## Getting Started
83
57
58
+
### Requirements
84
59
```
85
-
ollama serve
86
-
git clone https://github.com/stitionai/devika.git
87
-
cd devika/
88
-
uv venv
89
-
source .venv/bin/activate
90
-
uv pip install -r requirements.txt
91
-
playwright install --with-deps
92
-
cd ui/
93
-
bun install
94
-
bun run dev
95
-
cd ..
96
-
python3 devika.py
60
+
- Linux, MacOS, or Windows
61
+
- Python >= 3.9 and < 3.12
62
+
- NodeJs >= 18
63
+
- bun
97
64
```
98
65
99
-
Docker images will be released soon. :raised_hands:
100
-
101
-
## Installation
102
-
Devika requires the following things as dependencies:
103
-
- Ollama (follow the instructions here to install it: [https://ollama.com/](https://ollama.com/))
104
-
- Bun (follow the instructions here to install it: [https://bun.sh/](https://bun.sh/))
66
+
### Installation
105
67
106
68
To install Devika, follow these steps:
107
69
@@ -113,36 +75,39 @@ To install Devika, follow these steps:
113
75
```bash
114
76
cd devika
115
77
```
116
-
3. Create a virtual environment and install the required dependencies:
78
+
3. Create a virtual environment and install the required dependencies (you can use any virtual environment manager):
117
79
```bash
118
80
uv venv
119
81
uv pip install -r requirements.txt
120
82
```
121
-
4. Install the required dependencies:
83
+
4. Install the playwright for browsering capabilities:
122
84
```bash
123
-
pip install -r requirements.txt
124
85
playwright install --with-deps # installs browsers in playwright (and their deps) if required
125
86
```
126
-
5.Set up the necessary API keys and [Configuration](#configuration)
127
-
6. Start the Devika server:
87
+
5.(optional step) for setting up the ollama, you can follow the [ollama setup guide](docs/Installation/ollama.md)
88
+
5. Start the Devika server:
128
89
```bash
129
90
python devika.py
130
91
```
131
-
7. Compile and run the UI server:
92
+
6. if everything is working fine, you see the following output:
93
+
```bash
94
+
root: INFO : Devika is up and running!
95
+
```
96
+
6. Now, for frontend, open a new terminal and navigate to the `ui` directory:
132
97
```bash
133
98
cd ui/
134
99
bun install
135
100
bun run dev
136
101
```
137
-
8. Access the Devika web interface by opening a browser and navigating to `http://127.0.0.1:3000`.
102
+
8. Access the Devika web interface by opening a browser and navigating to `http://127.0.0.1:3000`
138
103
139
-
##Getting Started
104
+
### how to use
140
105
141
106
To start using Devika, follow these steps:
142
107
143
108
1. Open the Devika web interface in your browser.
144
-
2.Create a new project by clicking on the "New Project" button and providing a name for your project.
145
-
3. Select the desired programming language and model configuration for your project.
109
+
2.for creating a project, click on 'select project' and then click on 'new project'.
110
+
3. Select the search engine and model configuration for your project.
146
111
4. In the chat interface, provide a high-level objective or task description for Devika to work on.
147
112
5. Devika will process your request, break it down into steps, and start working on the task.
148
113
6. Monitor Devika's progress, view generated code, and provide additional guidance or feedback as needed.
@@ -155,15 +120,6 @@ Devika requires certain configuration settings and API keys to function properly
155
120
156
121
when you first time run Devika, it will create a `config.toml` file for you in the root directory. You can configure the following settings in the settings page via UI:
157
122
158
-
- STORAGE
159
-
-`SQLITE_DB`: The path to the SQLite database file for storing Devika's data.
160
-
-`SCREENSHOTS_DIR`: The directory where screenshots captured by Devika will be stored.
161
-
-`PDFS_DIR`: The directory where PDF files processed by Devika will be stored.
162
-
-`PROJECTS_DIR`: The directory where Devika's projects will be stored.
163
-
-`LOGS_DIR`: The directory where Devika's logs will be stored.
164
-
-`REPOS_DIR`: The directory where Git repositories cloned by Devika will be stored.
165
-
-`WEB_SEARCH`: This determines the default web search method for browsing the web. Accepted values are: google, bing, or ddgs.
166
-
167
123
- API KEYS
168
124
-`BING`: Your Bing Search API key for web searching capabilities.
169
125
-`GOOGLE_SEARCH`: Your Google Search API key for web searching capabilities.
@@ -174,77 +130,25 @@ when you first time run Devika, it will create a `config.toml` file for you in t
174
130
-`MISTRAL`: Your Mistral API key for accessing Mistral models.
175
131
-`GROQ`: Your Groq API key for accessing Groq models.
176
132
-`NETLIFY`: Your Netlify API key for deploying and managing web projects.
177
-
178
-
Make sure to keep your API keys secure and do not share them publicly.
179
-
180
-
### Configuring web search method
181
-
182
-
Devika currently supports Bing, Google, and DuckDuckGo for web searches. You can configure the web search method via UI.
183
-
184
-
## Under The Hood
185
-
186
-
Let's dive deeper into some of the key components and techniques used in Devika:
187
-
188
-
### AI Planning and Reasoning
189
133
190
-
Devika employs advanced AI planning and reasoning algorithms to break down high-level objectives into actionable steps. The planning process involves the following stages:
134
+
- API_ENDPOINTS
135
+
-`BING`: The Bing API endpoint for web searching.
136
+
-`GOOGLE`: The Google API endpoint for web searching.
137
+
-`OLLAMA`: The Ollama API endpoint for accessing Local LLMs.
191
138
192
-
1.**Objective Understanding**: Devika analyzes the given objective or task description to understand the user's intent and requirements.
193
-
2.**Context Gathering**: Relevant context is collected from the conversation history, project files, and knowledge base to inform the planning process.
194
-
3.**Step Generation**: Based on the objective and context, Devika generates a sequence of high-level steps to accomplish the task.
195
-
4.**Refinement and Validation**: The generated steps are refined and validated to ensure their feasibility and alignment with the objective.
196
-
5.**Execution**: Devika executes each step in the plan, utilizing various sub-agents and modules as needed.
197
139
198
-
The reasoning engine constantly evaluates the progress and makes adjustments to the plan based on new information or feedback received during execution.
140
+
Make sure to keep your API keys secure and do not share them publicly. For setting up the Bing and Google search API keys, follow the instructions in the [search engine setup](docs/Installation/search_engine.md)
199
141
200
-
### Keyword Extraction
201
142
202
-
To enable focused research and information gathering, Devika employs keyword extraction techniques. The process involves the following steps:
203
-
204
-
1.**Preprocessing**: The input text (objective, conversation history, or project files) is preprocessed by removing stop words, tokenizing, and normalizing the text.
205
-
2.**Keyword Identification**: Devika uses the BERT (Bidirectional Encoder Representations from Transformers) model to identify important keywords and phrases from the preprocessed text. BERT's pre-training on a large corpus allows it to capture semantic relationships and understand the significance of words in the given context.
206
-
3.**Keyword Ranking**: The identified keywords are ranked based on their relevance and importance to the task at hand. Techniques like TF-IDF (Term Frequency-Inverse Document Frequency) and TextRank are used to assign scores to each keyword.
207
-
4.**Keyword Selection**: The top-ranked keywords are selected as the most relevant and informative for the current context. These keywords are used to guide the research and information gathering process.
208
-
209
-
By extracting contextually relevant keywords, Devika can focus its research efforts and retrieve pertinent information to assist in the task completion.
210
-
211
-
### Browser Interaction
212
-
213
-
Devika incorporates browser interaction capabilities to navigate websites, extract information, and interact with web elements. The browser interaction module leverages the Playwright library to automate web interactions. The process involves the following steps:
214
-
215
-
1.**Navigation**: Devika uses Playwright to navigate to specific URLs or perform searches based on the keywords or requirements provided.
216
-
2.**Element Interaction**: Playwright allows Devika to interact with web elements such as clicking buttons, filling forms, and extracting text from specific elements.
217
-
3.**Page Parsing**: Devika parses the HTML structure of the web pages visited to extract relevant information. It uses techniques like CSS selectors and XPath to locate and extract specific data points.
218
-
4.**JavaScript Execution**: Playwright enables Devika to execute JavaScript code within the browser context, allowing for dynamic interactions and data retrieval.
219
-
5.**Screenshot Capture**: Devika can capture screenshots of the web pages visited, which can be useful for visual reference or debugging purposes.
220
-
221
-
The browser interaction module empowers Devika to gather information from the web, interact with online resources, and incorporate real-time data into its decision-making and code generation processes.
222
-
223
-
### Code Writing
224
-
225
-
Devika's code writing module generates code based on the plan, research findings, and user requirements. The process involves the following steps:
226
-
227
-
1.**Language Selection**: Devika identifies the programming language specified by the user or infers it based on the project context.
228
-
2.**Code Structure Generation**: Based on the plan and language-specific patterns, Devika generates the high-level structure of the code, including classes, functions, and modules.
229
-
3.**Code Population**: Devika fills in the code structure with specific logic, algorithms, and data manipulation statements. It leverages the research findings, code snippets from the knowledge base, and its own understanding of programming concepts to generate meaningful code.
230
-
4.**Code Formatting**: The generated code is formatted according to the language-specific conventions and best practices to ensure readability and maintainability.
231
-
5.**Code Review and Refinement**: Devika reviews the generated code for syntax errors, logical inconsistencies, and potential improvements. It iteratively refines the code based on its own analysis and any feedback provided by the user.
232
-
233
-
Devika's code writing capabilities enable it to generate functional and efficient code in various programming languages, taking into account the specific requirements and context of each project.
234
-
235
-
# Community Discord Server
236
-
237
-
We have a Discord server for the Devika community, where you can connect with other users, share your experiences, ask questions, and collaborate on the project. To join the server, please follow these guidelines:
143
+
## Contributing
238
144
239
-
- Be respectful: Treat all members of the community with kindness and respect. Harassment, hate speech, and other forms of inappropriate behavior will not be tolerated.
240
-
- Contribute positively: Share your ideas, insights, and feedback to help improve Devika. Offer assistance to other community members when possible.
241
-
- Maintain privacy: Respect the privacy of others and do not share personal information without their consent.
145
+
We welcome contributions to enhance Devika's capabilities and improve its performance. To contribute, please see the [`CONTRIBUTING.md`](CONTRIBUTING.md) file for steps.
242
146
243
-
To join the Devika community Discord server, [click here](https://discord.gg/CYRp43878y).
147
+
## Help and Support
244
148
245
-
## Contributing
149
+
If you have any questions, feedback, or suggestions, please feel free to reach out to us. you can raise an issue in the [issue tracker](https://github.com/stitionai/devika/issues) or join the [discussions](https://github.com/stitionai/devika/discussions) for general discussions.
246
150
247
-
We welcome contributions to enhance Devika's capabilities and improve its performance. To contribute, please see the [`CONTRIBUTING.md`](CONTRIBUTING.md) file for steps.
151
+
We also have a Discord server for the Devika community, where you can connect with other users, share your experiences, ask questions, and collaborate on the project. To join the Devika community Discord server, [click here](https://discord.gg/CYRp43878y).
0 commit comments