Run an agent for a while and the messages array balloons: token cost explodes, it gets slow, and eventually it overflows the context window. Not a small issue — the #1 engineering problem in production agents. 6 fixes + runnable code.
The model doesn't call your functions — it only outputs a structured 'call this tool with these args', and your code runs it. One diagram + 30 lines to make function calling click.
The annoying part of running a blog isn't writing — it's choosing topics. So I wrote a minimal agent that runs on GitHub Actions, reads my existing posts weekly, and proposes 5 new topics. It's still just the loop: ask the model → run the tool → feed the result back. Reusable template included.
After a few days learning agents, my conclusion: it's essentially 'client development + one LLM API call.' If you've done Android/frontend/desktop clients, add MCP and a few LLM concepts and you can interview for agent roles directly — don't be scared by the word 'AI'.
MCP mostly uses stdio not because pipes are superior, but because most current scenarios are the sweet spot for pipes: local, single client, one-shot, light and stateless. Once it becomes multi-client/always-on/stateful, switch to a socket.
MCP isn't magic: it's a JSON-RPC protocol that turns last post's hardcoded cat tool into a standalone process any LLM app can use. 30 lines of runnable server + client.