1 comment

[ 3.0 ms ] story [ 12.3 ms ] thread
Hi HN! Happy to share Keen Code, yet another CLI-based coding agent. I have been working on this solo since February as a side-project. While building this, I took the opportunity to experiment with context efficiency.

Here are three worth-mentioning things about Keen Code:

1. Built by agents

I built this whole thing from scratch using SoTA coding agents. My role was strictly a human orchestrator who created prompts and requirements, and reviewed designs and code written by agents. To remain fully transparent, the project has this ai-interactions folder that shares all the prompts and output docs. More details on this can be found here: https://mochow13.github.io/keen-code/TOUR.html.

2. Turn memory

To stop the context window from filling up during multi-turn loops, Keen completely discards raw tool inputs/outputs after a turn is completed. Instead, it distills lessons into a "turn memory" (a stupidly simple, deterministic Go struct) passed to the next turn. More: https://mochow13.github.io/keen-code/docs/turn-memory.html

3. Skills driven MCP servers

Instead of bloating the LLM context by loading massive Model Context Protocol (MCP) server schemas upfront, Keen abstracts them into local markdown "Skills." It lazily retrieves the exact JSON schema only when the LLM requests that specific tool at runtime. The approach is a little bit complex - details are here: https://mochow13.github.io/keen-code/docs/mcp-skills.html

I have been personally using Keen in developing Keen itself, and in my other projects. So far, I am quite satisfied with it. So I am looking forward to questions, feedback, suggestions and reviews. I am committed to this project for a long time and willing to enhance its usefulness.

Thanks in advance!