- An agent runs tools in a loop to achieve a goal.
- Agents are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks.
- Agents help decouple programming, the craft of physically typing code, from engineering, the architecture of your system, the goals, the “why” of what you’re building.
- Using LLMs for coding is unintuitive, requiring significant effort to master.
- Treat programming with agents as theory building. Maintain your own mental model of the system and evaluate agent output against it. Productivity comes from informed steering and rejection, not accepting more generated code.
- Before coding, make a plan with the model.
- You can use the same or a different model to critique the plan and iterate. If you are unsure, ask to “give a few options before making changes”.
- Progressive, iterative prototyping. Code is cheap. Redoing work is extremely cheap. Prioritize exploration over execution (at first). Iterate towards precision during the brainstorming phase. Start fresh once you know what and how to build it.
- The act of writing code (or doing something) surfaces decisions you hadn’t considered. When code is cheap, implement to learn.
- Failed attempts are cheap. If the plan fails and the result is bad, just delete everything and try again.
- You can have the agent interview you and challenge assumptions before coding!
- Low fidelity prototypes are better than walls of specs
- Divide the problem into smaller problems (functions, classes, …) and solve them one by one. Keep sessions short.
- Code is cheap, but maintenance, support, and security aren’t!
- Use all programming languages and technologies instead of just the ones you’re already familiar with.
- Software is still hard. It gets harder if you trick yourself into thinking the agents can take on the hard parts.
- Nuance tenst to lead to slop.
- Teach and tell the agents to use the same tool you’d use to run and debug code.
- You need quick and clear feedback loops (fast tool responses, clean logs, …).
- Give them the ability to interactively test the code they are writing too.
- Ask what passing checks prove and what they miss
- A test can repeat the same mistake as the implementation
- Use deterministic tools whenever you can. Linters, type checkers, auto-formatters, commit hooks, …
- Use quiet-success, loud-failure conventions for tool feedback.
- Build “partial autonomy” products where humans stay in the loop to verify output, rather than fully autonomous agents.
- Tools come in three flavors: context retrieval (finding information), feedback loops (verifying actions), and planning (structuring work over longer horizons).
- Choose tool interfaces with model training in mind.
- The way you wrap, feed, and observe a powerful model often matters more than fancy prompt tricks or extra bells and whistles on the model itself.
- Decomposing your agent into discrete steps improves reliability and efficiency. If there is a bit of work that happens often and is easier to eval than your entire task, that’s a good thing to break out and optimize.
- Project setup is the single most important human time investment you can make.
- Make your project build, test, and lint with a single command.
- Print minimal, actionable error messages.
- If a human gets lost onboarding to your codebase, an LLM is definitely going to be lost.
- Fix your fundamentals first: data quality, documentation, backups, testing, permissions, and operational culture. An LLM is not a psychic.
- Design small, isolated systems. You can check a static website looks great easily. You can check a small API design works well. Compose black boxes into larger systems. Individual boxes can be rewritten in other languages, removed, replaced easily. You can measure them individually.
- You are no longer optimizing your codebases for a team of humans, but for a (much larger) team of agents.
- Focus on building a rich environment with good and fast tests, documentation, consistent patterns, and clear feature definitions - this helps both humans and AI work better.
- Write legible (text based) relevant content and link it with anything else (code, diagrams, …).
- Applying software engineering best practices is key. LLMs actively reward existing top tier software engineering practices:
- Automated testing.
- Red/green TDD.
- Planning in advance.
- Comprehensive documentation (exportable/accessible in markdown).
- Good version control habits.
- Having effective automation in place.
- A culture of code review.
- Modular, reusable code.
- Strong research skills.
- The ability to ship to a preview environment.
- An instinct for what can be outsourced (to AI vs what needs human attention).
- A good (updated) sense of estimation.
- Unix philosophy beats vertical integration. The most powerful coding agents follow Unix principles, simple, composable tools that do one thing well.
- Design architecture for very quick iteration and change.
- Focus on figuring out what does “the box” actually do and what are the invariants that must be satisfied. With those boundaries established, the implementation inside can vary freely.
- Good component boundaries (Modularity) let you change the internals quickly without affecting other services or infrastructure.
- Agents don’t navigate software so much as intuit and compose it. They don’t see your GUI, but consume your API spec. Move away from visual interfaces and toward headless, API-first environments. An agent needs a CLI or a robust API, not a button on a web page.
- The best product for an agent is just the best product for a developer. Think like a developer-tools company: ship small, boring, composable primitives with explicit inputs, outputs, constraints, and errors that can be invoked and chained reliably.
- Provide structured error hints. If a request fails, the system should provide a reason that allows an agent to self-correct and retry without human intervention.
- A good test for how agentic-friendly your codebase is: “Can you get away with just asking for the What without describing the How?”
- Coding agents primarily navigate repositories through string and filename search, so identifiers and paths should be good search terms.
- Prefer distinctive, concept-specific function, method, type, directory, and file names over generic names such as create, Data, or Config.
- Prefer functions with clear, descriptive, unique, and longer than usual function names over classes. Avoid inheritance and overly clever hacks.
- Care about the failure modes. It’s very easy to make things that work well if you don’t care how they fail. AI-generated code can be designed to work while not being designed to fail gracefully.
- Agents are actors. Like actors, agents receive messages, update their internal state, spawn other agents, and send messages back. Multi-agent systems can borrow from the actor model.
- Actors never share state. They talk only through messages and process their inbox one message at a time. With no shared mutable state, agents can run in parallel on one computer or across many.
- Reuse actor patterns such as supervisor trees, scatter-gather, routers with worker pools, and aggregators.
- Let agents define listeners and monitors over external event streams (webhooks, Kafka, CDC, …). They turn events into signals to act on, instead of waking up on hourly cron jobs. Agents can build new listeners on the fly, in code or as other agents.
- Automate everything that’s easy. To spend more time on the hard stuff, minimize the time you spend on easy things. Distill learnings into skills, build loops, automate code reviews, and let your tools compound.
- If it doesn’t land, make a SKILL.
- Write skills for your product so agents know how to use it properly. Distribute them.
- Good skills optimize predictability.
- Write checkable steps with explicit completion criteria, front-load the trigger words that should invoke them, and use progressive disclosure for reference material.
- Prune duplication, no-ops, and stale sediment so each meaning has a single source of truth.
- Shared skills are a step toward factories.
- Factories are “shared AI systems that are designed to handle specific organizational tasks”. A handful of people build and run them, and everyone else benefits. This is specialization and gains from trade applied to agents.
- Every factory is:
- Specific: designed to handle certain types of tasks, and not others.
- Shared: multiple people on your team can use it.
- Scrutinized: some members of the team monitor the agent to make sure it performs as it should.
- Skills are “a sort of proto-factory”. They share instructions, but each person runs them on their own agent and setup, and nobody watches the runs, so improvements don’t compound.
- Fixed costs favor sharing. “Instead of one hundred people each spending an hour hand-rolling their own slide deck skill, imagine how much better off your team would be if two people spent twenty-five hours each”. Half the total time buys one factory fifty hours deep into the learning curve.
- Personal agents carry tail risk. “One bad security vulnerability in one agent is all it takes to cause significant harm”.
- Good factory candidates are recurring, verifiable, stable over time, need a known universe of information, and have mistakes that are cheap or easy to detect. See Using AI for similar criteria.
- The simplest factory is a task database with a status column and an agent that runs on every new “to-do” row.
- Roll factories out gradually with shadow runs and small volumes, and measure prompt changes with evals.
- When a full Git setup is overkill, version prompts in a simple database. Give each prompt a status (testing, production, retired) and a process step. Tasks either pin a prompt version or default to the production one.