How prateek1217/knabit-coding-agent works
This is a local AI coding assistant. A user enters a request in the agent’s command-line loop; its LangGraph chat node prepares conversation context, calls Gemini with discovered MCP tools, and executes any requested tools through the MCP server before displaying the response. The agent also summarizes older turns and checkpoints graph state in SQLite. The server exposes file editing, project search/navigation, shell execution, and Git operations. Relationships follow the README and shown source; the MCP transport is documented, but individual tool-to-server dispatch details are not expanded beyond the shown calls.
Main entry points: server.py FastMCP tool server · agent.py LangGraph chat flow
Components 17
User interaction
- Command-line loop
agent.py
Agent reasoning
- LangGraph chat flow
agent.py - Windowed context
agent.py - Turn summarization
agent.py - SQLite checkpoint
agent.py
MCP tool bridge
- MCP client setup
agent.py - Tool invocation
agent.py - FastMCP tool server
server.py
Project capabilities
- File operations
server.py - Project search
server.py - Shell execution
server.py - Git operations
server.py
Other components
- User
- Gemini model
- Project files
- Host shell
- Git repository
Connections 19
- User → Command-line loop: enters request
agent.py - Command-line loop → LangGraph chat flow: invokes graph
agent.py - LangGraph chat flow → Windowed context: prepares context
agent.py - Windowed context → Turn summarization: summarizes old turns
agent.py - Turn summarization → Gemini model: requests summary
agent.py - Windowed context → Gemini model: sends conversation
agent.py - LangGraph chat flow → SQLite checkpoint: checkpoints state
agent.py - MCP client setup → FastMCP tool server: opens stdio session
agent.py - MCP client setup → Tool invocation: loads tools
agent.py - LangGraph chat flow → Tool invocation: invokes requested tools
agent.py - Tool invocation → FastMCP tool server: dispatches tools
README.md - FastMCP tool server → File operations: registers tools
server.py - FastMCP tool server → Project search: registers tools
server.py - FastMCP tool server → Shell execution: registers tool
server.py - FastMCP tool server → Git operations: registers tools
server.py - File operations → Project files: reads and edits
server.py - Project search → Project files: searches files
server.py - Shell execution → Host shell: runs commands
server.py - Git operations → Git repository: runs Git commands
server.py