Harness Engineering - Part 6: The Filesystem & Environment

2026年8月15日3 次浏览来源:Dev.to阅读原文

Welcome back to the Harness Engineering series — a 10-part journey from raw language model to production-ready agentic system.

Made by builders.

For builders.

In Part 5, we looked at the Context — the payload the model sees on every call.

Now we look at what happens after the model, having seen that Context, decides to do something.

The model calls a tool.

The tool has to execute somewhere.

That somewhere is the Environment.

It's easy to under-appreciate.

The Environment feels like plumbing — the filesystem, the shell, the network, the machine underneath.

But it's where every side effect the model requests actually lands, and how you design it is what separates "an AI agent doing things on your behalf" from scary to routine.

What's ahead: Part 1: The Raw Model Problem Part 2: Defining the Harness — The Six Components Part 3: The Control Loop Part 4: The Tool Layer Part 5: Context Engineering The Filesystem & Environment ← You are here Part 7: The Memory Layer Part 8: Observability Part 9: The Harness Architecture Part 10: Decomposing Claude Code By the end of this article, you'll know what the Environment actually is, why every tool with side effects depends on it, and the three properties (bounded, reproducible, inspectable) that separate a production-ready environment from a demo one.

Let's get started. 📚 Want to go deeper than the articles?

While you follow along with this series, I've put together two hands-on resources that go further than any single article can: Build a Harness from Scratch — Udemy Course — A self-paced course where I walk you through building a production-grade agentic harness from the ground up, in code.

Harness Engineering for AI Agents — Live Maven Workshop — A live, cohort-based workshop for builders who want direct feedback, Q&A, and to work through the material with peers.

Both are optional — the series stands on its own.

But if you want the full studio-quality version, that's where it lives.

What The Environment Is The Environment is the runtime that tools operate inside.

Concretely, it includes: The filesystem they read from and write to The shell they exec commands in The network they can reach The compute resources they're permitted to consume — CPU, memory, disk, wall-clock time, API quotas If a tool has any kind of side effect, the Environment is where that side effect materializes.

When your tool opens a file, it's opening a file in an environment.

When your tool runs , it's running that in some shell, on some filesystem.

When your tool fires an HTTP request, it's doing so from some network stack, subject to some rules about what it can reach.

None of this is exotic.

If you've ever set up a CI pipeline, you've made environment decisions — what OS the runner uses, what dependencies are pre-installed, what secrets are exposed, what artifacts persist between steps.

The Environment for an agent is the same kind of concern, applied to the same kind of question: inside what world does this thing run?

Why The Environment Exists Because tools can't exist in a vacuum.

A tool is meaningless without a filesystem to read from.

A tool is meaningless without a shell to run in.

A tool is meaningless without a network to reach out through.

Every tool with side effects needs a target for those side effects, and the Environment is that target.

Put another way: the Tools (Part 4) are the model's reach, but the Environment is what they reach into.

You can't separate the two.

A well-designed tool set embedded in a poorly-designed environment produces an agent that either can't act (because the environment blocks it) or acts too freely (because the environment doesn't).

What a Good Environment Design Looks Like Three properties separate a production-ready Environment from a demo one.

Bounded The Environment defines the scope within which the agent can operate.

Good environments are bounded — the agent can do the things it needs to do, and nothing else.

That means: The agent can't accidentally the host machine T

分享