Nanobot Study
Master AI Agent Assistant in 3 Days. A guided study plan using nanobot (~3k lines of Python) and your own AI Socratic Tutor. Learn Architecture, Skills, and Deployment.
Install
git clone https://github.com/WangyiNTU/nanobot-studyInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →_ __ __ _ _ __ ___ | |__ ___ | |_ | '_ \ / ` | ' \ / _ | '_ \ / _ | | | | | | (| | | | | () | |) | () | |_ || ||_,|| ||_/|./ _/ _| nanobot: 3-day Study Repository
🇨🇳 中文文档 (Chinese)
🐈 nanobot is an ultra-lightweight personal AI assistant designed to be learned, dissected, and mastered.
Unlike bloated frameworks that hide their logic, nanobot delivers core agent functionality in just ~3,500 lines of code. It's the perfect "textbook" implementation of a modern LLM agent.
💡 Basic Idea
An AI Agent is not just a chatbot. It is a system that can:
- Perceive: Read files, search the web, see the terminal output.
- Think: Use an LLM (Large Language Model) to reason about what to do next.
- Act: Execute tools (Shell, File I/O, API calls) to affect the environment.
- Loop: Observe the result of its action and decide the next step.
nanobot implements this Perceive-Think-Act-Loop in its purest form in agent/loop.py. By studying this repository, you aren't just learning a tool; you are learning the fundamental anatomy of Agentic AI.
[!TIP] Using an AI Coding Assistant? (Cursor, Claude Code, GitHub Copilot)
You can turn your AI assistant into a Personal Nanobot Tutor!
- Open
AI_COPILOT.md.- Copy its content or ask your AI to "Read AI_COPILOT.md and act as my tutor".
- The AI will now guide you through the 3-Day Plan using the Socratic method, helping you understand the code instead of just writing it for you.
📅 3-Day Mastery Plan
Follow this guided path to go from "User" to "AI Engineer" in just one weekend (2-3 hours/day).
Day 1: The Soul (Architecture)
Objective: Understand how an LLM becomes an Agent.
- Read (
30 min):agent/loop.py: This is the heart. Read how_process_messagehandles theLLM -> Tool -> LLMcycle.config/: See how we manage prompts and model settings.
- Action (
1 hour):- Run
nanobot onboardto initialize. - Chat:
nanobot agent -m "Calculate 128 * 455". - Trace: Open
~/.nanobot/workspaceand find the log file. Follow the execution path you just read inloop.py.
- Run
- Challenge (
1 hour):- Modify
agent/prompts.py(or equivalent) to give the bot a "Pirate" personality. - Restart and verify:
nanobot agent -m "Who are you?".
- Modify
Day 2: The Hands (Skills & Tools)
Objective: Teach the AI to interact with the real world.
- Read (
30 min):agent/tools/: Look atweb.pyto see how we define tools.skills/: Understand how to bundle tools into skills.
- Action (
1 hour):- Create a simple python script
my_tool.pythat prints "Hello from tool!". - Register it in the agent configuration.
- Create a simple python script
- Challenge (
1.5 hours):- Build a "Daily Briefing" Skill:
- Write a tool that fetches top Hacker News headlines (use an API or scraping).
- Combine it with the existing
weathertool. - Ask nanobot: "Give me my daily briefing."
- Build a "Daily Briefing" Skill:
Similar plugs
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…
Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
Production-grade engineering skills for AI coding agents.
The 1st Collaborative AI Design Agent Workspace. Local-first and open source. Create prototypes, websites, apps, dashboards, presentations, images, and videos with your team…