A simple coding agent from scratch. The agent should be able to:
- Change existing code
- Write new code
- Run commands (servers, scripts, etc.)
- Understand the codebase
The goal is to keep the agent unopinionated — it decides how to approach problems using the tools you give it.
A coding agent runs in a loop, repeatedly interacting with its environment. Each iteration:
-
The agent decides what action to take - Not you. This is very important.
You should not assume the agent goes through a specific process to do tasks.
Instead, the agent should just have access to some tool / tools that it calls however it likes.
-
It performs that action (e.g., running a command, reading a file)
-
It receives the output of the action.
-
It uses that feedback along with previous context to decide the next action
This continues until the agent decides the task has been completed.
To install dependencies:
bun installTo run the agent test:
bun testTo clean up test runs:
bun run cleanThis project was created using bun init in bun v1.3.4. Bun is a fast all-in-one JavaScript runtime.