A terminal coding agent in Python — streaming agentic loop, 13 built-in tools, MCP servers, subagents, context compaction, and a configurable approval layer for shell and file operations.
A terminal coding agent in Python — streaming agentic loop, 12 built-in tools, MCP servers, subagents, context compaction, and a configurable approval layer for shell and file operations.
AshCode reads and writes files, runs shell commands, searches the web, and delegates work to scoped subagents — driven by any OpenAI-compatible model endpoint. Built from scratch to understand what actually goes into a coding agent: not just the tool-calling loop, but context management under a finite window, safety gating on destructive operations, and recovery when the model gets stuck.
Single-shot mode. One prompt, one answer — the agent picks its own tools and exits. python main.py "list the files in this directory"
Video demos: ▶ reading through a codebase · ▶ creating and deleting a file
- Why this exists - Features - Architecture - Install - Usage - Configuration - Extending - Engineering notes - Testing - Project layout
Wrapping a chat completion in a while loop gets you a demo. The gap between that and a usable agent is made of unglamorous problems, and this project is an attempt to solve them properly rather than skip them:
- The context window fills up. A real session blows past the limit in twenty minutes. AshCode compacts history into a structured summary at 80% capacity and separately clears stale tool outputs, so long sessions degrade gracefully instead of erroring. - Models get stuck. They will call the same failing tool forever. A signature-based loop detector catches exact repeats and short cycles, then injects a corrective prompt. - Agents r
From the project README.
Add the radar badge to your README — it shows your project was picked up by MCP Radar and links to this page:
[](https://mcp.liqiwa.com/s/AuthRan--AshCode.html)
Turn scattered notes, docs and transcripts into a queryable Markdown wiki — an LLM knowledge-base compiler with MCP access, no embeddings, self-hosted.
alxgntv/substack-api-mcpMCP server for Substack posts (FastMCP + substack-api-client)
sm18lr88/STT-MCPFast, local speech-to-text MCP server
simonw/mcp-explorerCLI tool for exploring an MCP server
sandeepbazar/ocm-mcp-serverAn MCP server that lets AI agents operate a multi-cluster Kubernetes fleet through an Open Cluster Management hub, with policy, approval, and audit between the model and your clusters.
Vladimir-Human/ru-marketplace-mcpДевять российских маркетплейсов и китайский Taobao как MCP-серверы: Wildberries, Ozon, Яндекс Маркет, Детский мир, Авито, Мегамаркет, Lamoda, DNS, Ситилинк. Плюс сравнение цен по всем сразу. Только чт
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.