Back to Projects

AI Agent Prototype

Local DeepSeek Coding Agent

A local DeepSeek-powered coding agent MVP built as a learning project. It connects a CLI, a tool-calling loop, workspace-aware file tools, shell/test execution, git diff inspection, and a Rich terminal UI, with local safety checks around file writes and risky commands.

Period

Jun 2026

Tools / Tech

PythonDeepSeekTyperRichTool CallingPytest

Why I built it

I built this to understand the mechanics behind coding agents: how tasks become tool calls, how observations feed back into the loop, how workspace context is reset, and how local automation can be kept under control.

Links

What it includes

  • Implements a basic tool-calling loop where the model can plan, call tools, receive observations, edit files, run tests, check diffs, and summarize results.
  • Provides workspace-aware tools for listing, reading, writing, editing, and searching files, plus shell/test execution and git diff output.
  • Includes a Rich terminal UI and Typer CLI commands for run, ui, chat, diff, and test workflows.
  • Supports configurable modes such as fast, balanced, smart, max, and custom to experiment with speed and loop-budget tradeoffs.
  • Adds practical safety checks for workspace-only writes, sensitive-file refusal, dangerous command blocking, confirmations for destructive commands, timeouts, output limits, and repeated-tool limits.

What I worked on

  • Organized the agent prototype across CLI dispatch, terminal UI, configuration loading, LLM client/tool schemas, tool execution, patch application, and safety policy.
  • Implemented local tools for filesystem operations, unified-diff patch application, shell/test execution with command checks, and git diff inspection.
  • Documented the build path in docs/AGENT_BUILD_GUIDE.md so the project can also serve as a learning artifact for coding-agent internals.
  • Added tests around agent behavior, configuration, filesystem tools, LLM handling, entry points, patch parsing, safety policy, shell tools, and UI behavior.

What I Learned

  • Learned that even a small coding agent depends heavily on clear tool limits, useful observations, context reset, safety checks, and understandable error handling.
  • Practiced designing local automation with explicit workspace limits instead of allowing broad file or shell access.
  • Built a clearer understanding of the gap between a chat wrapper and a tool-using coding assistant.