GitHub Repo: https://github.com/primaprashant/alduin
This should help in getting a better understanding of what goes on inside the coding agents. You will iteratively implement the core agent loop present in all coding agents like Claude Code and Codex starting from a skeleton repo with a basic input loop and no LLM. Over 7 phases, you will add the Anthropic API and implement tools (read file, edit file, bash). Each phase has hints and a reference implementation if you get stuck.
Should take ~3-5 hours and in the end, you'll have your own coding agent which you can use on other project and codebases as well.
Feedback and PRs welcome. Happy to answer any questions.
umairnadeem123•1h ago
one thing worth adding as a phase 8 or bonus: context window management. the naive approach of appending every tool result to the conversation history blows up fast when the agent reads large files. implementing summarization or truncation strategies is where most real-world agent engineering time goes.