New: my book on artificial intelligence, from its history to agentsDiscover it →

Harness engineering: give the agent a goal, not a recipe

The new way to work with AI: prepare context, memory, skills, plugins and permissions, then ask only for the result. How to do it with Claude Code, Grok Bot and Gemini Notebook, and what to check.

Mattia PanattaPublished 22 October 202612 minIntermediate
A hand writing on a card that sends a beam of light to a target
AI-generated illustration

In short

  • With today’s agents the work shifts from the perfect prompt to the right environment: context, memory, skills, tools and permissions. That’s what I call harness engineering.
  • When the environment is well prepared, one request with the goal, the audience and the test for “done” is enough. The agent decides how.
  • The three tools I use most to work this way are Claude Code, Grok Bot and Gemini Notebook.
  • Your job is still to decide what you want, provide the right material and check the result before it goes out.

From prompt to environment

Until recently we were taught to write long, precise prompts: role, steps, format, examples. It made sense, because the model only saw the conversation and forgot everything when the chat closed.

Today agents work inside an environment: they read a folder, remember your preferences, use tools, open the browser, run code and pick the work up again the next day. The result depends less and less on how you phrase a single request, and more and more on what the agent finds when it starts.

The word for this whole setup is harness: everything around the model that guides it. Context, memory, skills, tools, permissions, checks. With the same model, two different environments produce very different results.

The five parts of the harness

1. Context: the right material, not all the material

Context is what the agent reads to do the job: documents, data, examples. A small, tidy folder beats an archive with five versions of the same file. Keep originals apart from outputs and make it clear which document has the final word (the approved price list, the final draft).

A good example is worth more than a long explanation: a presentation you like, an email written the way you want, a report that worked.

2. Memory: what stays true from one task to the next

Memory is what you don’t want to repeat every time: how you write, who you work for, which sources are reliable, which format you deliver. In Claude Code it lives in an instructions file (CLAUDE.md) and in auto memory; in Grok Bot each Bot keeps preferences and files; in Gemini Notebook the memory is the notebook’s sources.

I always separate three levels: general preferences (“write in plain English”), project rules (“prices come from the approved list”) and work status (“photos for three products still missing”). The first rarely changes, the last changes hourly: mixing them creates memories that age badly.

3. Skills: the method, written once

A skill is a reusable procedure: how to prepare the monthly report, how to check an invoice, how to write an article in your style. The agent loads it when needed instead of keeping it in mind all the time.

You don’t have to write it from scratch: when a job goes well, ask the agent to turn it into a skill with materials, steps and checks. Then test it on a second case. Grok Bot and Hermes Agent even create them on their own, by watching you work or by reflecting on how they solved a problem.

4. Plugins, connectors and tools: what it can touch

Connectors (often via MCP) link the agent to email, calendar, documents, business software. Plugins package skills, tools and links together. The rule is simple: connect only what the task needs. A method without access isn’t enough, but twenty useless accesses make the system more fragile and less safe.

5. Permissions and checks: where it stops on its own

Reading, preparing and proposing are one thing; sending, publishing, paying and deleting are another. Decide upfront what it can do alone and what must stop at a draft for approval. The serious agents already do this: Claude Duet shows you the plan before paying or messaging someone, Grok Bot asks for approval on actions, Claude Code has a planning mode and per-tool permissions.

The request, once the environment is ready

With the environment prepared, the request gets short. It doesn’t describe the steps: it describes the result. For example:

In the folder you’ll find the price list, photos and last year’s deck. Prepare an editable presentation explaining the offer to a new client, with the same prices as the list. Only ask me about decisions that change content or cost, and show me everything before sending.

It works because it has four things: material with clear authority, a recognisable result, an audience, a boundary (what to ask and when to stop). The agent organises the rest.

If the result doesn’t convince you, the useful correction is concrete: “You’re using the old price list, this is the valid one” updates the work; “do better” adds nothing.

With which tools

Claude Code is the most complete environment for handing over a whole result: it works on a folder and has CLAUDE.md, memory, skills, plugins, scheduled tasks and projects that keep going in the cloud. No coding needed: documents, sites, analyses and presentations are made this way too.

Grok Bot is my favourite for work that carries on over time: you create several Bots, each with a role, memory and routines, on a cloud computer that works with your laptop off. A main Bot coordinates the others. More on the 24/7 agents page.

Gemini Notebook is the cleanest way to provide context: you upload your sources and get answers, maps, quizzes and summaries only from those sources, citing the passage. Perfect for studying and for preparing the material you’ll then hand to an agent.

What stays with you

The agent executes, but the responsibility for the result is yours. Open the files, check the numbers at the source, reread before sending. An agent saying “done” hasn’t proved it did well.

A four-step method for long tasks

  1. Explore: the agent reads the material and tells you what it understood.
  2. Plan: it proposes how to proceed; correct it now, while it’s cheap.
  3. Produce and check: it executes and verifies, opening files and comparing them with the data.
  4. Consolidate: it saves a clear version and a short status file (goal, decisions, next step) to restart from.

Try this week

Pick a job you redo often. Create a folder with the right material and one good example, write three lines of stable rules and hand the agent the result, not the steps. When it works, have it turned into a skill. That’s the step that turns AI from a chat into a collaborator.

In my book, the chapters on Claude Code, Grok Bot and Gemini Notebook show this method step by step.

Sources

Informational content, current as of the date shown. Prices, models and rules change often: always check official sources. Written with the support of AI tools and reviewed by the author.

Found it useful? Keep going

The book · €19.90The full picture, from history to agentsEverything behind the guides, in a single path. The first chapter is free.Discover the book →AI training · €30/hourA lesson with meWant to apply it to your case? In one hour we set it up together, screen shared.Book a lesson →
Newsletter · freeEvery Monday, what matters

Next guide →Claude Code: hand over a whole job, even without codingWhat Claude Code is, why I think it's the most complete platform, how to prepare the folder, what CLAUDE.md, memory, skills, plugins and scheduled tasks are, and a simple method for your first task.