A 7-day tutorial on building an Agent from scratch, writing the simplest possible Agent/Harness in TypeScript. Day 16 wraps capabilities into standalone plugins: drop a subdirectory with a plugin.ts into plugins/ and the main program loads it automatically at startup — commands, tools, and HTTP services all become plug-and-play.
A 7-day tutorial on building an Agent from scratch, writing the simplest possible Agent/Harness in TypeScript. Day 15 integrates MCP: servers are declared in a config file, JSON-RPC runs over stdio at startup, and tools provided by external processes land straight in the model's tool list.
A 7-day tutorial on building an Agent from scratch, writing the simplest possible Agent/Harness in TypeScript. Day 14 reuses Day 13's chunking and BM25 search to build a lightweight knowledge base that collects web pages and files and returns the relevant passages for a question.
A 7-day tutorial on building an Agent from scratch, writing the simplest possible Agent/Harness in TypeScript. Day 13 cuts long-term memory into small chunks, finds the relevant ones with BM25, and automatically places them into the context before every turn.
A 7-day tutorial on building an Agent from scratch, writing the simplest possible Agent/Harness in TypeScript. Day 12 adds `search` and `fetch`: one searches the repository by content, the other reads a web page and converts it to plain text.
A 7-day tutorial on building an Agent from scratch, writing the simplest possible Agent/Harness in TypeScript. Day 11 packages task instructions and tools into skills that can be loaded and unloaded on demand, controlling which tools the model can see at any moment.
A 7-day tutorial on building an Agent from scratch, writing the simplest possible Agent/Harness in TypeScript. Day 10 adds two kinds of cross-session information: AGENTS.md stores project rules, and memory stores know-how accumulated while running, so a freshly created session's model knows the project rules and remembers previously confirmed preferences.
A 7-day tutorial on building an Agent from scratch, writing the simplest possible Agent/Harness in TypeScript. Day 9 makes the Agent list a plan before acting: add a TODO table maintained by the model, plus a subagent that isolates context. The main Agent arranges the order, the subagent handles small tasks with clear boundaries, and current progress always shows in the right-hand panel.
A 7-day tutorial on building an Agent from scratch, writing the simplest possible Agent/Harness in TypeScript. Day 8 draws boundaries for tools and leaves an escape hatch for writes: use .geekagent/GeekAgent.json to define permissions and directory boundaries, and save the most recent state before every file write—operations that shouldn't happen are blocked up front, and mistakes can be reverted with /undo.
A 7-day tutorial on building an Agent from scratch, writing the simplest possible Agent/Harness in TypeScript. Day 7 gives the terminal a new desk: the program temporarily takes over the whole screen, the message stream lives on the left, and a usage panel stays permanently on the right — per-turn / total tokens and context usage stay visible while you chat, and the original terminal content is restored on exit.
A 7-day tutorial on building an Agent from scratch, writing the simplest possible Agent/Harness in TypeScript. Day 6 does two things: let one process maintain several mutually independent sessions at once (/new, /sessions, /open), then persist the whole session collection together with the current ID to JSON in one shot (/save, /load, auto-save on exit) — "chat long" is upgraded to "split apart and kept around".
A 7-day tutorial on building an Agent from scratch, writing the simplest possible Agent/Harness in TypeScript. Day 5 tackles "chat long without forgetting": when the history array only grows and the conversation keeps getting longer, history compaction keeps the context size under control, so long conversations stay within the model's context window.
A 7-day from-scratch tutorial for building an Agent/Harness by hand in TypeScript. Day 4 splits both reads and writes out of the shell: reads go through confirmation-free dedicated tools (ls/read/glob), writes go through a dedicated channel that shows a diff before touching disk (write/patch), and the accumulated tools are unified into a single registry — the first time the model completes the full read → modify → verify loop.
A 7-day from-scratch tutorial for building an Agent/Harness by hand in TypeScript. Day 3 wires up the model's first tool that touches the real machine: running shell commands locally, with three guardrails — timeout, output truncation, and confirm-before-run — so the Agent can finally take real action.
A 7-day build-an-Agent-from-scratch tutorial: hand-write the simplest possible Agent/Harness in TypeScript. Day 2 builds the tool calling loop: the model can request get_current_time, the program executes it and hands the real time back to the model, laying the groundwork for the command and file tools to come.
A 7-day build-an-Agent-from-scratch tutorial: hand-write the simplest possible Agent/Harness in TypeScript/Node.js, implementing a REPL loop and streaming multi-turn conversation from zero. This post covers what a REPL is, why it makes the right foundation for an Agent, and how readline plus an OpenAI-compatible API gets the first step, "being able to chat," running in under 160 lines of code.