1. Task & project rules
  2. Context & model
  3. Tools & feedback
  4. Verification & result

How do model, agent and harness differ?

The language model processes a limited context and generates text or a tool call. On its own, it has neither access to project files nor a reliable view of a development process. These capabilities come from the surrounding software.

An agent uses a model and tools in a loop: read code, make a change, assess feedback and choose the next step. The harness executes this loop. It determines which tools are available, whether writing is permitted and when a run must stop.

Context is an engineering task

A large context window does not replace selecting relevant information. Project rules, the file tree, located code and execution history compete for the same budget. Irrelevant or outdated information can influence the next step just as the requirement itself does.

In Charly Agent, a ContextBuilder assembles information in defined layers. Project knowledge from AGENTS.md, notes and condensed history serve different roles. A symbol index helps locate declarations. The harness determines what the model actually sees.

Permissions must be enforced by tools

An instruction such as “only edit production code” expresses an intention. A technical boundary exists only where a tool checks the write operation. Charly Agent answers questions in read-only mode. Changes require write mode; allowed paths constrain the writing tools.

This differs from factory-level checks: the factory can inspect a diff after an agent run against path rules and discard changes. Such result checking happens at a different time from access control in an agent tool. The two mechanisms complement each other.

Budgets make execution bounded

Agents can call tools repeatedly without moving closer to the goal. The harness therefore limits steps, time, context and repair rounds. Reaching a limit produces a defined outcome with a reason rather than allowing execution to continue indefinitely.

Model choice and the execution framework remain separate. A different LLM can have different context or tool-calling requirements. Workflow and verification rules should therefore not be hidden entirely inside model-specific prompts.

Results need verifiable evidence

After a change is completed, Charly Agent checks for placeholder tests and starts the configured Maven build. A build with no executed tests does not count as passing. Failures can return to the model for a bounded number of repairs.

The event stream records prompts, responses, tool calls and builds. Scripted scenarios examine behaviour without a real LLM; live scenarios add model evaluation. This provides a basis for diagnosis without treating one successful test run as proof of universal correctness.

In practice

The decisions described come from our Charly projects. The project pages explain the documented design and its place in the development process.

Explore the Charly project

Related articles

AI software factory: from issue to verified pull requestSandboxing coding agents: setting deliberate boundaries