Agentic harness

    An agentic harness forms the surrounding infrastructure that manages the execution and boundaries of an autonomous AI system.

    What is an agentic harness?

    An agentic harness is the execution and control layer surrounding an AI model. It structures how an AI agent interacts with its environment across multiple sessions Anthropic. This framework manages state, memory and permissions to reduce the risk of uncontrolled behaviour. On ai.nl, we use eight practical components to define this harness. These components are guardrails, least privilege, evaluations, observability, human approval, version control, token budget and an emergency stop. These elements address security risks like excessive agency OWASP. They do not represent an official standard. A well designed harness helps developers restrict access to external systems. It also helps maintain operational stability during complex tasks.

    What surrounds the model?

    Eight practical controls for agent execution. Their implementation depends on the task and risk.

    model12345678
    1. 1Guardrails
    2. 2Least privilege
    3. 3Evaluations
    4. 4Observability
    5. 5Human approval
    6. 6Version control
    7. 7Token budget
    8. 8Emergency stop

    Why does an AI agent need a harness?

    An AI agent needs an agentic harness to maintain oversight and control actions. Large language models operate in discrete sessions. They inherently lack memory of previous steps. A harness must provide solutions for these limitations by keeping a progress log Anthropic. The control layer reduces the risk of an autonomous system obtaining excessive freedom. An uncontrolled system risks excessive autonomy. This can result in undesirable actions in connected applications OWASP. The harness functions as a secure envelope around the AI model. It determines which specific external tools the AI agent is permitted to use. It also calculates when execution must pause for necessary human validation.

    Which eight components belong in a harness?

    Eight practical components together form a robust agentic harness. This list is an informal guideline. It lacks official standard status. It provides organisations with a workable framework for agentic control. The components include the following elements.

    1. Guardrails filter unsafe input or output.
    2. Least privilege ensures the AI agent receives only the absolute minimum required access permissions.
    3. Evaluations are continuous tests to assess the logic.
    4. Observability structurally logs all system actions.
    5. Human approval is a mandatory pause for manual review during high risk decisions.
    6. Version control carefully tracks configuration changes.
    7. A token budget restricts the number of input and output tokens per task.
    8. An emergency stop blocks new actions immediately. Companies can integrate this framework into their security policies.

    What is the difference between a prompt, a model, and a harness?

    The prompt is the instruction. The AI model is the computational core. The agentic harness is the controlling software layer around it. A successful implementation requires a clear separation between these three elements.

    ComponentDefinitionFunction
    PromptTextual instructionDirects the specific task
    AI modelNeural networkGenerates the actual predictions
    HarnessControl layerManages budgets and access permissions

    Fictional example for clarification. A user types the instruction to delete old files. This functions as the prompt. The model proposes a programming command. That proposal can contain errors. The control system subsequently verifies whether the user holds the correct administrative permissions. The software checks the proposed action against documented permissions and approval rules. This is the role of the harness. Developers thereby avoid processing complex security rules directly within the textual instruction.

    How does the control cycle work?

    Control continues throughout the agent's lifecycle.

    1. 01

      Set boundaries

      Define the task, tools and permissions.

    2. 02

      Test

      Check expected and unexpected situations.

    3. 03

      Execute

      Work within defined limits.

    4. 04

      Monitor

      Track actions, errors and costs.

    5. 05

      Adjust

      Stop or change and test again.

    A relevant change starts a new assessment.

    How do permissions and human approval work together?

    Permissions and human approval combine to form a layered defence against undesirable actions by an AI agent. The principle of least privilege restricts the baseline access of the system to exclusively the necessary data sources. Within these restricted permissions, certain operations can still have major consequences. Here, human approval takes effect. The agentic harness pauses execution. It asks an administrator for explicit consent before processing an impactful decision. An AI agent might write draft texts based on its permissions. The actual publication to the website requires a manual click from the final editor. OWASP advises developers to include approval routines for all high impact operations OWASP. This reduces excessive autonomy in systems.

    How do you test an agentic harness?

    Developers test an agentic harness by systematically breaching the limits and security mechanisms in a shielded development environment. The testing process includes simulating erroneous model output and mimicking malicious prompts. Teams write specific scripts that attempt to operate outside the assigned directories. An effective testing strategy validates whether the emergency stop successfully blocks new actions and revokes access permissions. Running processes must be handled safely. Already completed actions are not automatically undone. Testing additionally demands a review of the version control. One verifies whether previous configurations can be restored correctly during incidents. Comprehensive evaluations help organisations to increase the reliability of the system. Read more about related control concepts in our overview of ai-swarms.

    What do you do about prompt injection and untrusted input?

    You implement strict input validation and minimise extension permissions. You also require human approval for high impact actions. A prompt injection occurs when malicious inputs trick an AI into executing unauthorised commands. The Open Web Application Security Project explains that excessive agency enables damaging actions from manipulated outputs OWASP. Developers must restrict capabilities to reduce this vulnerability. Organisations apply complete mediation by validating all requests against security policies. Fictional example. A marketing agent receives a manipulated email asking to delete files. The agentic harness only grants read access. Correctly enforced read access limits the harm this attack can cause. Test other attack paths too. Approval requirements depend on specific business context and deployment risks.

    How do you manage costs, logging and an emergency stop?

    You manage costs with token budgets and track actions via observability. You integrate an emergency stop to halt execution. There is no official standard for an agentic harness. Eight common components align with fundamental risk mitigation principles. A token budget counts input and output tokens and related costs. Calling external tools can incur separate costs. Budget enforcement must be actively implemented in the code.

    ComponentPrimary function
    Token budgetRestricts tokens and related costs per session
    ObservabilityRecords system interactions and tool usage
    Emergency stopBlocks new actions during unexpected behaviour

    Observability involves detailed logging of AI agent tool usage. An emergency stop requests to stop and revokes access during anomalies. Running tasks require specific handling.

    How do the three instruments connect?

    Use the same agent ID and version in all three. Check that documented rules match actual permissions.

    Harness

    Enforces execution boundaries

    Register

    Shows the organisation's agents

    Passport

    Records purpose and evidence

    Documented agreementCheck actual behaviourUpdate evidence

    How do you build a harness step by step?

    You build an agentic harness step by step by isolating sessions and structuring incremental progress steps. Researchers demonstrate that complex tasks require a systematic approach. Models lose context across discrete sessions. A successful method involves an initialiser agent that prepares the environment and creates a structured feature list Anthropic. Following this, a separate coding process executes incremental work on one specific feature at a time.

    • Implement environment management tools to maintain state.
    • Require the AI agent to document progress.
    • Use version control to revert problematic changes safely.

    This structural separation helps prevent the AI model from attempting to solve entire projects simultaneously. Limitations of implementations include technical difficulties with complex browser automation.

    How do harness, register and passport work together?

    An agentic harness enforces operational rules. An internal agentic register globally tracks deployed AI assets NIST. An agentic passport documents the specific characteristics of an individual AI system or AI agent. An internal register and passport support documentation. They do not replace formal EU database registration or statutory technical documentation where applicable. These internal tools confer no certification. They do not operate independently of legal obligations. Legal obligations always depend on specific use cases. You must always consult the original law. Agree a review cadence based on risk and reassess after relevant changes. Learn more in our ai-swarms guide.

    Frequently asked questions

    How does an agentic harness restrict excessive agency?+

    An agentic harness reduces risks by applying least privilege and minimising extension functionality. This ensures the AI agent has restricted access to data and tools. Human approval provides manual oversight for high impact actions.

    What is the role of an emergency stop in an agentic harness?+

    An emergency stop blocks new actions, revokes access permissions and pauses the AI agent. Running tasks must be handled carefully and completed actions are not automatically undone. Operators use this to prevent further changes while investigating anomalies.

    How does an agentic harness support long running tasks?+

    Long running AI agents operate in discrete sessions without inherent memory of prior actions. A harness bridges these gaps by maintaining progress logs and a detailed feature list. This environment management allows the agent to resume work incrementally.

    Do agentic harnesses guarantee EU AI Act compliance?+

    Internal tools do not guarantee legal compliance. Documentation within a harness or passport supports the process. Actual compliance depends entirely on your specific use case, system classification and your role as a provider or deployer under the EU AI Act.

    How do token budgets structure agent autonomy?+

    A token budget defines the maximum input and output tokens an agent can consume. This restricts direct input costs and output costs. Executing external tools can incur separate costs. Administrators must actively implement this budget enforcement.

    How should organisations inventory systems within an agentic harness?+

    You can establish a register to inventory AI models and AI agents. An inventory acts as a database containing system documentation, incident response plans and contact information. This overview aids maintenance and depends on your organisational policies.

    Stay informed about AI

    Stay informed on AI governance

    Subscribe to the ai.nl newsletter to receive updates on AI governance concepts and technical frameworks. Read our latest articles and insights directly in your inbox.

    AI insights, cases and events. Once a month. No spam.

    Next step

    Explore AI consultancy

    Newsletter

    Always up to date on AI.

    Once a month: cases, frameworks and concrete examples of what works in practice. No noise.

    No spam. Unsubscribe any time.