YYHDBL/MyCodeAgent

241 stars · Last commit 2026-07-02

Claude Code like agent for study.

README preview

# MyCodeAgent

MyCodeAgent is a local-first coding agent runtime written in Python. It is not a model demo or a thin ReAct wrapper. The project focuses on the engineering harness around an LLM: tool execution, permission checks, context projection, traceability, completion verification, durable memory, subagent isolation, and experimental skill evolution.

The core question is:

> How do we make a coding agent controllable, recoverable, observable, and testable when the model itself is probabilistic?

This repository grew out of the lessons summarized in [Agent应用开发实践踩坑与经验分享](https://github.com/datawhalechina/hello-agents/blob/main/Extra-Chapter/Extra09-Agent%E5%BA%94%E7%94%A8%E5%BC%80%E5%8F%91%E5%AE%9E%E8%B7%B5%E8%B8%A9%E5%9D%91%E4%B8%8E%E7%BB%8F%E9%AA%8C%E5%88%86%E4%BA%AB.md): start with the shortest working loop, make every failure diagnosable, and only add machinery after a real runtime need appears.

## Highlights

- **Runtime-controlled agent loop**: the model proposes actions, but the harness owns state transitions, retries, terminal conditions, and completion gates.
- **Tool harness**: centralized tool registry, permission decisions, orchestration, result budgeting, and safer command execution.
- **Context engineering**: history is durable; the model sees a projected view with compaction, memory injection, and traceable prompt assembly.
- **Trace-first debugging**: JSONL trace events expose model calls, tool calls, permission decisions, context compaction, state transitions, and terminal reasons.
- **Durable memory**: transcript resume, session memory, and long-term memory are separated by lifecycle.
- **Skills and MCP**: runtime-extensible skill loading, overlay support, and MCP tool integration.
- **Experimental Skill Evolution**: an opt-in framework that observes traces, proposes skill patches, evaluates candidates, and writes evolved skills to an overlay instead of modifying source skills.

View full repository on GitHub →