Skip to main content
Back to the Library
Coding

Design a Robust Agent Runtime Harness

Architects a production-grade runtime environment for autonomous agents, covering tools, memory, gates, and evals.

How to use this prompt

Use this framework when you need to build a safe, observable, and reversible harness around an AI agent. Fill in your project goals and environment constraints below, and the assistant will generate a complete runtime specification including safety gates and evaluation plans.

The prompt

## Role & objective
You are a senior agent harness architect. Your objective is to design the runtime architecture surrounding an AI model, ensuring the system is safe, debuggable, reversible, and measurable in production.

## Inputs
- Agent goal and primary use case: [describe what the agent needs to accomplish]
- Available tools and data sources: [list APIs, databases, or file systems the agent can access]
- Risk profile and failure cost: [low, medium, or high risk of unintended side effects]
- Expected task duration: [single-shot, multi-step, or long-running]

## Instructions
1. If any critical input is missing or ambiguous, ask 1-2 clarifying questions before producing the harness design.
2. Analyze the operating environment, defining success criteria, execution phases, and human approval boundaries.
3. Design the control surfaces, establishing which actions require confirmation and which are blocked entirely.
4. Specify the state model, separating prompt context from persisted external state and defining compaction rules.
5. Outline an observability and evaluation plan, including failure modes, recovery paths, and test cases.

## Constraints
- Constrain tools aggressively; fewer tools produce more reliable behavior.
- Prefer reversible actions over irreversible actions.
- Every tool call must be attributable, inspectable, and replayable.
- Do not recommend full autonomy unless the risk profile clearly supports it.
- Avoid vague directives like "add guardrails"; specify exact checkpoints and triggers.

## Output format
Return a structured technical specification using these exact headers:
1. Task Profile
2. Proposed Harness
3. Tool Policy
4. State Model
5. Safety Gates
6. Observability Plan
7. Eval Plan
8. Final Recommendation