$ show rasbt/mini-coding-agent
This repository contains a minimal coding agent designed to work with local Ollama models. The agent operates in a loop, processing user requests by inspecting and modifying the workspace through a set of structured tools (file operations, shell commands, etc.). It implements six core components: live repo context collection, prompt shaping with cache reuse, structured tools with validation and permissions, context reduction and output management, transcript and memory persistence, and bounded delegation to subagents. The agent is implemented in a single Python file (`mini_coding_agent.py`) and is intended to be run via a CLI entry point. It requires an Ollama server running with a compatible model (default: qwen3.5:4b). The code is clean, well-structured, and demonstrates thoughtful agent design patterns, making it a useful reference for building similar agents.
The LLM identified 2 files worth highlighting for reuse:
The WorkspaceContext class collects essential workspace information including git status, branch, recent commits, and key project documents (README, AGENTS.md, etc.). It is self-contained, depends only on the standard library, and could be reused in any tool that needs to inspect a git repository and read configuration files.
The SessionStore class provides a simple mechanism for saving and loading session data as JSON files in a directory. It is generic, decoupled from the agent logic, and could be reused in any application requiring persistent session state with minimal modification.