Smol Developer is an AI tool that can code for you. It is still under progress, but it has already learnt to create code in a number of languages. Smol Developer may be used to write basic scripts as well as complex programs. It may also be used to debug programs and find errors.
Table of Contents
What is Smol Developer?
Smol Developer is a prototype of a “junior developer” agent or tool designed to help developers by frameworks a full codebase based on a specified product specification. Its goal is to provide a quicker way for producing code templates without using specialized, inflexible starts such as create-react-app
or create-nextjs-app.
Smol Developer strives to be human-centric, coherent, and transparent. It aims to be helpful, harmless, and honest while keeping the codebase basic and safe (less than 200 lines of Python and prompts). The goal is to construct an AI tool that is simple to understand and adapt to varied development needs.
Developers may use Smol Developer to create a tight loop with the AI, constantly refining and iterating on the framework prompt until the desired codebase structure is reached. The objective is to give developers a flexible tool to assist in code development while still assuring simplicity and maintainability.
It is important to note that Smol Developer does not want to achieve Artificial General Intelligence (AGI) or the power to destroy the planet. Instead, it focuses on giving engineers with useful assistance by automating repetitive and time-consuming codebase frameworks tasks.
Prompts: Human-Centric Code Generation Workflow
Engineering a procedure that uses prompts to communicate with AI help. This method highlights the importance of the human developer in directing the code creation process while employing AI capabilities to automate certain jobs. It enables developers to tweak and improve the codebase repeatedly depending on their understanding and requirements.
This workflow offers several advantages:
- Human-centric: The method centers on the human developer, allowing them to offer high-level instructions and continually shape code production through prompts.
- Incremental specification: Developers can start with a simple prompt and gradually add additional information and requirements when they identify underspecified sections of the code. This iterative method guarantees that the development process is collaborative and dynamic.
- Manual code review and error handling: The developer can manually inspect and test the produced code. Any errors or difficulties that occur during runtime may be handled simply copying the error into the prompt, allowing for simple debugging and improvement.
- Optional AI assistance: As previously stated, Debugger.py provides additional assistance by evaluating the whole codebase and offering particular code modification recommendations. This tool boosts productivity by making specific recommendations for improvement.
potential evolution in programming, where developers can rely on AI-powered tools to scaffold the codebase while still maintaining technical involvement. It allows developers to focus on higher-level design and problem-solving rather than getting caught up in every implementation detail.
Arch Diagram

Installation
To install the project, follow these steps:
1. Clone the repository:
git clone https://github.com/smol-ai/developer
2. Copy the .example.env
file to .env
and fill in your API keys.
3. Note that the project requires access to certain private beta APIs. If you have access to Modal.com, install the modal-client
package with: pip install modal-client
. If not, follow the alternative instructions below.
4. If you don’t have access to Modal.com, install the project dependencies: pip install -r requirements.txt
.
5. Run the project without Modal:
python main_no_modal.py YOUR_PROMPT_HERE.
For the example Chrome extension:
- Go to “Manage Extensions” in Chrome.
- Load the unpacked extension.
- Locate the relevant folder in your file system and load it.
- Visit a content-heavy website.
- Click on the cute bird icon.
- See the extension in action.
Note that the Chrome extension provided is generated based on the prompt in prompt.md
, with additional words added iteratively over time.
Please adapt the code on a fork if you intend to use it with different infrastructure. Feel free to open issues or pull requests, and the project maintainer will gladly highlight your fork.
Smol dev
1. Run the following command to execute Smol Dev with a prompt directly in the terminal:
modal run main.py --prompt
"a Chrome extension that, when clicked, opens a small window with a page where you can enter a prompt for reading the currently open page and generating some response from OpenAI"
2. As you add more details to your prompt over time, you can extract your prompt to a separate file. Make sure your prompt ends with a .md extension, and Smol Dev will automatically locate and use that file:
modal run main.py --prompt prompt.md
3. When running Smol Dev, note that the generated directory will be deleted each time (except for images), and all files will be rewritten from scratch. This ensures a clean and consistent codebase:
modal run main.py --prompt prompt.md
4. If you make a tweak to the prompt and only want it to affect a specific file while keeping the rest of the files intact, you can specify the file
parameter. For example, to update only the popup.js
file:
modal run main.py --prompt prompt.md --file popup.js
Additionally, you’ll find a shared_dependencies.md
file that acts as a helper file, ensuring coherence between the various files in the generated codebase.
Also, Read Prompt Engineering guide.
Smol debugger
Smol Debugger is a tool that utilizes the entire contents of the generated directory to provide debugging assistance. By feeding an error into the tool, you can obtain a response that takes advantage of longer context (ranging from 32k to 100k tokens), eliminating the need for source embedding.
To use Smol Debugger, follow these instructions:
- Run the following command to execute Smol Debugger with an error prompt in the terminal:
modal run debugger.py --prompt
"Uncaught (in promise) TypeError: Cannot destructure property 'pageTitle' of '(intermediate value)' as it is undefined. at init (popup.js:59:11)"
If you are using GPT-4 (assuming it is available), you can specify the model using the --model
parameter:
modal run debugger.py --prompt "your_error msg_here" --model=gpt-4
Smol PM (Product Manager) is a tool that uses the complete contents of the created directory as context and gives a prompt for synthesis of the entire program. It basically reverses the Smol Dev process by producing a prompt based on the current codebase.
Smol PM (Product Manager)
Smol PM (Product Manager) is a tool that uses the complete contents of the created directory as context and gives a prompt for synthesis of the entire program. It basically reverses the Smol Dev process by producing a prompt based on the current codebase.
To use Smol PM, follow these instructions:
1. Run the following command to execute Smol PM and generate a prompt in the terminal:
modal run code2prompt.py
2. If you want to use GPT-4 (assuming it is available), you can specify the model using the --model
parameter:
modal run code2prompt.py --model=gpt-4
When you run the command, it will provide a prompt that can be used to generate the full program based on the contents of the generated directory.
To try code2prompt2code, follow these steps:
- Add a prompt using the
--prompt
parameter. This may require a few iterations to get the prompt right, capturing the necessary instructions and specifications for the program generation. For example:
modal run code2prompt.py --prompt
"make sure all the id's of the DOM elements, and the data structure of the page content (stored with {pageTitle, pageContent}) , referenced/shared by the js files match up exactly. Take note to only use Chrome Manifest V3 APIs. Rename the extension to code2prompt2code" --model=gpt-4
- Running the command will result in the creation of a semi-functional Chrome extension based solely on the model-generated description of a separate codebase.
To dig further deeper, run: to utilize the created prompt with Smol Dev.
modal run main.py --prompt code2prompt-gpt4.md --directory code2prompt2code
The social and technological implications of multilayer generative deep-frying of codebases are still being researched and considered.
Experiment with Smol PM and its ability to generate programs from existing codebases, and feel free to investigate the possible consequences of such generative techniques.
This article is to help you learn Smol Developer. We trust that it has been helpful to you. Please feel free to share your thoughts and feedback in the comment section below.