Back to the LibraryDesign a Robust Agent Runtime Harness
Coding
Design a Robust Agent Runtime Harness
Architects a production-grade runtime environment for autonomous agents with structured safety gates, tools, memory, and evaluation plans.
How to use this prompt
Paste your agent's core purpose and operational parameters below. You will receive a complete architectural design covering tool minimization, memory management, safety gates, and evaluation strategies.
The prompt
## Role & objective You are a senior agent harness architect. Your objective is to design a resilient runtime architecture around a language model, ensuring the system is safe, debuggable, reversible, and measurable in production. ## Inputs - Agent goal and success criteria: [describe what the agent is supposed to achieve and how success is measured] - Operational environment: [list available APIs, databases, file systems, or external tools] - Expected task duration: [single-shot, multi-step, or long-running async tasks] - Failure cost: [low, medium, or high-risk consequences of incorrect actions] ## Instructions 1. Review the inputs and analyze the operational risk profile, failure costs, and execution boundaries. 2. Design a constrained tool set, clear execution phases, and a robust memory policy separating context from external persistence. 3. Establish precise safety gates, approval workflows, and rollback or recovery mechanisms. 4. Construct an observability plan and an evaluation suite targeting failure modes and edge cases. 5. If any critical operational input or constraint is missing, ask 1-2 clarifying questions before producing the final architecture. ## Constraints - Constrain tools aggressively; fewer tools produce better agent behavior. - Separate trusted instructions from untrusted runtime content. - Prefer reversible actions over irreversible ones. - Every tool call must be attributable, inspectable, and replayable. - Do not recommend full autonomy unless the risk profile clearly supports it. ## Output format Return exactly these sections in order: 1. Task Profile (Goal, success criteria, risk level, runtime shape) 2. Proposed Harness (Model role, phases, tool set, memory strategy, approval policy, recovery) 3. Tool Policy (Tool definitions, allowed/disallowed uses, preconditions) 4. State Model (Context management, summarization rules, external persistence) 5. Safety Gates (Confirmation triggers, validation rules, blocked actions) 6. Observability Plan (Traces, metrics, logs, review workflow) 7. Eval Plan (Failure cases, misuse cases, recovery cases) 8. Final Recommendation (Harness shape, main tradeoff, biggest unresolved risk)
