This is a hands-on example workflow for using mini-coding-agent with Ollama on a small Python project.
The flow is:
- create a fresh repo
- launch the agent
- implement
binary_search.py - edit the implementation
- add
pytesttests - run tests
- fix anything that fails
This example assumes:
ollama serveis already running- you already pulled a model such as
qwen3.5:4b(e.g., viaollama pull qwen3.5:4b) - you already cloned or forked
rasbt/mini-coding-agent - you already ran
uv syncin your localmini-coding-agentfolder
If you have sufficient memory, consider using a larger Qwen 3.5 model instead:
cd mini-coding-agent
mkdir -p ./tmp/binary-search-repo
cd ./tmp/binary-search-repo
git initAt this point the repo is basically empty:
ls -la
Open the agent from your mini-coding-agent clone, but point it at the new repo:
cd mini-coding-agent
uv run mini-coding-agent \
--cwd ./tmp/binary-search-repo \
--model "qwen3.5:4b"
At the mini-coding-agent> prompt, paste:
Inspect this repository and create a minimal binary_search.py file. Implement an iterative binary_search(nums, target) function for a sorted list of integers. Return the index if the target exists and -1 if it does not. Keep the code very small.
After the agent finishes, inspect the result in another terminal or code editor. The contents are shown below:
Now make a small follow-up change. Back in the agent REPL, paste:
Update binary_search.py so it raises ValueError if the input list is not sorted in ascending order. Keep the implementation simple.
Check the file again:
Back in the REPL, paste:
Create test_binary_search.py with pytest tests for found, missing, empty list, first element, last element, and unsorted input raising ValueError. Keep the tests small and readable.
Inspect the new test file:
Back in the REPL, paste:
Run pytest for this repo. If any test fails, fix the code or tests and rerun until everything passes.
You can also verify manually in a different terminal window:
uv run pytest tmp/binary-search-repo
Check what changed:
cd mini-coding-agent
cd ./tmp/binary-search-repo
git status --shortYou should now have:
README.mdbinary_search.pytest_binary_search.py
While the agent is running, these commands are available:
/helpshows the available slash commands and what each one does./memoryprints the agent's distilled working memory for the current session./sessionshows the path to the saved session JSON file on disk./resetclears the current conversation history and working memory./exitleaves the interactive agent.



