Mini Agent banner
ljw1004 ljw1004

Mini Agent

AI community

Description

A mini AI agent CLI, similar to Claude Code and Gemini CLI

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Mini-agent

This is a minimal coding assistant with the same behavior as Claude Code. Minimal: just 280 loc for the agent, 400 loc for tools, 1200 lop for prompts. Intuitively it "runs an interactive coding agent":

$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt

$ export GEMINI_API_KEY=redacted
$ ./mini_agent.py --model gemini/gemini-2.5-pro

[MODEL: gemini/gemini-2.5-pro + gemini/gemini-2.5-flash]
[IMPLICIT --mcp builtin]
[TRANSCRIPT: /Users/ljw1004/.claude/projects/default/2025-09-01.jsonl]

> Please analyze the files in my current directory and tell me what they do.

  >> # CLAUDE.md (project instructions) ...
  >> Your TODO list is empty. Remember that the TodoWrite tool is a great
     way to stay on top of complex tasks.
[7193 input tokens, 202 response tokens]
  >> LS(...) -> "- /Users/ljw1004/code/mini_agent/\n  - CLAUDE.md\n  - LICENSE
[4042 cached input tokens, 3912 further input tokens, 204 response tokens]
  >> Read(...) -> "    1→# Mini-agent\n    2→\n    3→
  >> Read(...) -> "    1→#!/usr/bin/env python3\n    2→\n    3→from __future__
  >> Read(...) -> "    1→from __future__ import annotations\n    2→from path
  >> Read(...) -> "    1→from __future__ import annotations\n    2→from typi
[55145 input tokens, 5650 further input tokens, 194 response tokens]

< This project is a minimal coding assistant. Here's a breakdown of the key files:
*   `mini_agent.py`: The main script that runs the interactive agent loop.
    It takes user input, communicates with an LLM, and uses tools to perform tasks.
*   `core_tools.py`: Implements the core functionalities (tools) that the agent
    can use, such as reading/writing files (`Read`, `Write`, `Edit`), searching
    (`Grep`, `Glob`), and running commands (`Bash`).
*   `typedefs.py`: Defines the data structures and types used for messages, tools,
    and conversation history (transcripts).
*   `adapter.py`