This prompt acts as a safety interlock for autonomous agent systems. Before an agent executes a multi-step plan—such as modifying files, sending emails, or making API calls—this gate prompt evaluates the plan for feasibility, identifies missing preconditions, and assesses step-level risk. It produces a binary feasible/infeasible decision, preventing agents from executing plans that are logically broken, have unmet dependencies, or carry unacceptable risk. Use this prompt when your agent generates a plan and you need a structured, programmatic go/no-go signal before any side effects occur. This is not a planning prompt; it is a plan evaluation prompt. It assumes a plan already exists and needs validation.
Prompt
Agent Plan Feasibility Gate Prompt

When to Use This Prompt
Defines the job-to-be-done, ideal user, required context, and when not to use the Agent Plan Feasibility Gate Prompt.
The ideal user is an AI engineer or platform developer building an agent harness where plan execution carries real-world consequences. You should have a plan object—likely JSON with ordered steps, each containing an action type, parameters, and preconditions—ready to pass into this gate. The prompt requires a defined [RISK_LEVEL] threshold (e.g., 'low', 'medium', 'high') that determines how aggressively the gate rejects plans. It also benefits from [TOOLS] context describing what each tool does and its side-effect profile, so the model can reason about whether a step's preconditions are actually satisfiable given available capabilities.
Do not use this prompt as a substitute for proper planning. If your agent hasn't generated a coherent plan yet, use a planning prompt from the Agent Planning and Task Decomposition pillar instead. Do not use this gate for real-time safety-critical systems where latency constraints preclude LLM evaluation—hardcoded rule checks or deterministic validators are more appropriate there. Also avoid this prompt when the plan's risk is purely informational (e.g., a research agent that only reads data). The gate is designed for plans with side effects: writes, sends, deletes, or external API calls. For read-only plans, a simpler precondition check may suffice without the full feasibility and risk assessment overhead.
Use Case Fit
Where the Agent Plan Feasibility Gate delivers reliable go/no-go signals and where it introduces unacceptable risk or operational overhead.
Good Fit: Pre-Execution Validation
Use when: you need a binary gate before an autonomous agent executes a multi-step plan. The prompt excels at catching missing preconditions, circular dependencies, and resource conflicts that would cause mid-plan failure. Guardrail: Run the gate synchronously in the critical path; do not treat it as an advisory check that can be skipped.
Bad Fit: Creative Brainstorming
Avoid when: the task requires open-ended exploration or novel solution paths. The feasibility gate is calibrated to reject plans with unverified assumptions, which will block legitimate creative approaches that lack precedent. Guardrail: Use a separate divergent-thinking prompt before the gate, or apply the gate only after initial exploration produces a concrete plan candidate.
Required Input: Structured Plan
Risk: The gate produces unreliable verdicts when given vague intentions or natural-language goals without explicit steps. Without a structured plan, the model fills gaps with assumptions and either over-approves or rejects based on imagined details. Guardrail: Require a machine-readable plan schema with ordered steps, dependencies, required tools, and expected outputs before invoking the gate.
Operational Risk: Over-Rejection Drift
Risk: As the agent's capabilities expand through new tools or model upgrades, the gate's static risk assessment becomes stale and begins rejecting plans that are now feasible. This silently reduces automation coverage. Guardrail: Track the rejection rate over time and trigger a recalibration review when it increases by more than 20% without a corresponding rise in actual execution failures.
Operational Risk: Step-Level Blind Spots
Risk: The gate may approve a plan as feasible overall while missing a single high-risk step that causes catastrophic failure. Aggregate feasibility scores mask step-level danger. Guardrail: Require the output to include per-step risk flags, not just a binary verdict. Escalate any plan containing a step flagged as high-risk even if the overall verdict is feasible.
Bad Fit: Real-Time Adaptation Loops
Avoid when: the agent replans dynamically based on intermediate results. The gate is designed for static plan evaluation before execution begins. Running it repeatedly inside a tight loop adds latency and produces inconsistent verdicts as partial state changes. Guardrail: Gate the initial plan only; use a separate lightweight invariant check for mid-execution replanning steps.
Copy-Ready Prompt Template
A reusable prompt that evaluates an agent's execution plan and returns a binary feasible/infeasible decision with step-level risk assessment and missing precondition identification.
This prompt acts as a feasibility gate before an autonomous agent executes a multi-step plan. It forces the model to examine each step for missing dependencies, resource conflicts, safety violations, and logical impossibility rather than accepting the plan at face value. The template is designed to be wired into an agent orchestration layer where a proposed plan is intercepted, validated, and either approved for execution or returned for revision. Use this when the cost of a bad plan is high—data mutation, external API calls with side effects, or user-facing actions that cannot be easily undone.
textYou are an execution feasibility auditor for autonomous agent systems. Your job is to evaluate a proposed execution plan and determine whether it can succeed given the available tools, current state, and known constraints. You must be skeptical of optimistic assumptions and identify what is missing before approving any action. ## INPUT [PLAN_DESCRIPTION] [AVAILABLE_TOOLS] [CURRENT_STATE] [CONSTRAINTS] ## OUTPUT SCHEMA Return a JSON object with exactly this structure: { "feasible": boolean, "overall_risk": "low" | "medium" | "high" | "critical", "step_assessments": [ { "step_index": number, "step_description": string, "feasible": boolean, "risk": "low" | "medium" | "high" | "critical", "missing_preconditions": [string], "failure_mode": string | null, "remediation_suggestion": string | null } ], "blocking_issues": [string], "warnings": [string], "requires_human_approval": boolean, "rationale": string } ## EVALUATION RULES 1. For each step, verify that all required tools are present in [AVAILABLE_TOOLS] and that their required parameters can be satisfied from [CURRENT_STATE] or prior step outputs. 2. Flag any step that assumes success of a prior step without verification or error handling. 3. Identify circular dependencies where two steps each require the other's output before they can start. 4. Mark a step as infeasible if it requires external state not present in [CURRENT_STATE] and no prior step produces it. 5. Escalate to human approval if any step modifies production data, triggers financial transactions, sends user-facing communications, or accesses PII. 6. A plan is feasible only if every step is individually feasible and the dependency chain is complete. 7. Do not reject creative or unconventional approaches that are logically sound. Only reject plans with demonstrable gaps. ## CONSTRAINTS - Base your assessment only on the information provided. Do not assume tools or state that are not listed. - If a step's feasibility depends on an unverified assumption, flag it as a warning rather than blocking unless the assumption is provably false. - For steps with high or critical risk, provide specific remediation suggestions. - If the plan is infeasible, the rationale must explain exactly which steps fail and why.
To adapt this template, replace the four bracketed inputs before calling the model. [PLAN_DESCRIPTION] should contain the agent's proposed steps with their intended order and dependencies. [AVAILABLE_TOOLS] must list every tool the agent can invoke, including their parameter schemas so the judge can verify argument availability. [CURRENT_STATE] should capture the system state at the moment of evaluation—database records, environment variables, session data, or prior step outputs. [CONSTRAINTS] should encode operational boundaries such as rate limits, permission scopes, cost budgets, and safety policies. After receiving the output, check requires_human_approval first: if true, route to a review queue before any execution begins. If feasible is false, return the blocking_issues and step_assessments to the planning agent for revision rather than attempting execution. Validate the JSON structure before acting on the decision—malformed outputs should trigger a retry or fallback to a conservative block.
Prompt Variables
Inputs the prompt needs to work reliably. Validate these before calling the model.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[AGENT_PLAN] | The full execution plan produced by the upstream agent, including steps, tool calls, and expected outcomes. | { "goal": "Deploy v2.1 to production", "steps": [ { "id": 1, "action": "Run database migration", "tool": "db_migrate", "params": { "target_version": "v2.1" } } ], "preconditions": ["Backup confirmed"] } | Must be valid JSON. Schema check: root object requires 'steps' array with at least one element. Each step requires 'id', 'action', and 'tool' fields. Null or empty plan triggers immediate infeasible response. |
[ENVIRONMENT_STATE] | Current state of the execution environment, including system health, resource availability, and active incidents. | { "production": { "status": "healthy", "active_incidents": 0, "deployment_lock": false }, "staging": { "status": "degraded", "active_incidents": 1 } } | Must be valid JSON. Check for 'deployment_lock' boolean; if true, plan must be rejected regardless of other signals. Null allowed if environment is unknown, but confidence score must be lowered. |
[AGENT_CAPABILITIES] | List of tools, APIs, and permissions available to the agent. Defines the boundary of what the agent can actually execute. | [ "db_migrate", "kubectl_apply", "slack_notify", "rollback_service" ] | Must be a non-empty array of strings. Cross-reference every step's 'tool' field against this list. Any step referencing a tool not in this list must be flagged as a missing precondition. |
[HISTORICAL_OUTCOMES] | Recent execution results for similar plans, including success/failure patterns and known failure modes. | [ { "plan_type": "database_migration", "success_rate": 0.94, "common_failures": ["connection_timeout"] } ] | Must be valid JSON array. Null allowed if no history exists. When present, use to calibrate risk assessment: plans matching known failure patterns should increase risk scores for affected steps. |
[CONSTRAINTS] | Hard constraints that must not be violated, such as maintenance windows, rate limits, compliance rules, and safety policies. | [ "No production deploys during business hours", "Database migrations require manual approval", "Max 3 concurrent tool calls" ] | Must be a non-empty array of strings. Each constraint must be checked against every step. Any violation is an automatic infeasible verdict. Parse check: constraints must be explicit, not vague policies. |
[RISK_THRESHOLD] | The maximum acceptable risk score (0.0 to 1.0) for the overall plan. Plans exceeding this threshold are infeasible. | 0.3 | Must be a float between 0.0 and 1.0. Default to 0.5 if not provided. Plans with aggregate risk above this value produce infeasible verdict. Individual step risks above 0.7 should trigger step-level blocking even if aggregate is below threshold. |
[OUTPUT_SCHEMA] | The required JSON schema for the gate output, defining the structure of the feasibility verdict and risk assessment. | { "verdict": "feasible", "step_assessments": [], "missing_preconditions": [], "aggregate_risk_score": 0.0 } | Must be a valid JSON Schema object. Validate output against this schema post-generation. Required fields: 'verdict' (enum: feasible/infeasible), 'step_assessments' (array), 'missing_preconditions' (array), 'aggregate_risk_score' (float 0.0-1.0). |
Implementation Harness Notes
How to wire the Agent Plan Feasibility Gate Prompt into an agent orchestration layer or CI/CD pipeline with validation, retries, and human escalation.
The Agent Plan Feasibility Gate Prompt is designed to sit as a synchronous checkpoint between plan generation and plan execution in an autonomous agent loop. After the planning agent produces a proposed execution plan, the entire plan—including steps, dependencies, and expected preconditions—is passed to this gate prompt. The gate returns a structured binary verdict (feasible or infeasible) along with a step-level risk assessment. This output should be parsed by the orchestration layer before any tool calls or state mutations occur. The prompt is not a planner itself; it is a critic that validates whether the plan is safe and likely to succeed given the available tools, context, and constraints.
To wire this into an application, construct the prompt input by serializing the proposed plan into the [PLAN] placeholder. The plan should include an ordered list of steps, each with a description, the tool or action to invoke, expected inputs, and declared preconditions. The [AVAILABLE_TOOLS] placeholder must contain a machine-readable manifest of tool names, parameter schemas, and side-effect classifications (e.g., read-only, mutating, destructive). The [CONSTRAINTS] placeholder should encode operational boundaries such as rate limits, cost budgets, and forbidden actions. After invoking the LLM, parse the response against a strict JSON schema that requires the verdict field to be exactly `
feasible"or"infeasible
and the step_assessments array to contain an entry for every input step. If parsing fails
retry once with a repair prompt that includes the raw output and the schema; if it fails again
escalate to a human reviewer and log the full trace. For high-risk domains
always require human approval before executing any plan where the gate returns `
infeasible"or where any individual step is flagged with arisk_levelof"high"`."
Model choice matters here. Use a model with strong reasoning capabilities and reliable structured output support, such as GPT-4o or Claude 3.5 Sonnet, configured with a low temperature (0.0–0.2) to minimize variance in binary decisions. Enable structured output mode if available to enforce the JSON schema at the API level, reducing parse errors. Log every gate invocation with the input plan, the raw model response, the parsed verdict, and a timestamp. This audit trail is essential for debugging false positives (plans incorrectly rejected) and false negatives (plans incorrectly approved). Implement a metric dashboard tracking gate pass rate, parse failure rate, and the distribution of risk levels across steps. A sudden drop in pass rate may indicate prompt drift or a change in the planning agent's behavior that requires investigation.
Common failure modes in production include the gate rejecting creative but valid plans due to overly conservative constraints, and the gate approving plans that contain hallucinated tool names or impossible parameter combinations. To mitigate the first, periodically review a sample of rejected plans with a human expert and adjust the [CONSTRAINTS] or [EXAMPLES] to calibrate the gate's risk tolerance. To mitigate the second, cross-reference the tool_name fields in the plan against the actual [AVAILABLE_TOOLS] manifest before calling the gate, and reject plans with unknown tools at the orchestration layer. Never rely solely on the LLM to catch every tool hallucination. Finally, set a hard timeout on gate execution—if the model call exceeds your latency budget, default to a safe fallback: reject the plan, log the timeout, and alert the on-call engineer. Do not silently proceed with an unevaluated plan.
Expected Output Contract
Fields, data types, and validation rules for the Agent Plan Feasibility Gate response. Use this contract to parse, validate, and route the model's output before executing any plan steps.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
feasibility_verdict | enum: feasible | infeasible | Must be exactly one of the two enum values. Reject any other string. | |
overall_confidence | number (0.0-1.0) | Must be a float between 0.0 and 1.0 inclusive. Parse failure or out-of-range value triggers a retry. | |
step_assessments | array of objects | Array length must equal the number of steps in [PLAN_STEPS]. Each element must match the step_assessment schema. | |
step_assessments[].step_id | string | Must exactly match a step_id from the input [PLAN_STEPS] array. Missing or extra IDs fail validation. | |
step_assessments[].risk_level | enum: low | medium | high | blocker | Must be one of the four enum values. A blocker on any step forces feasibility_verdict to infeasible. | |
step_assessments[].rationale | string | Non-empty string with minimum 20 characters. Must reference a specific precondition, dependency, or constraint from [CONTEXT]. | |
missing_preconditions | array of strings | Each string must describe a concrete missing input, permission, or state. Empty array is valid when feasibility_verdict is feasible. | |
alternative_suggestion | string or null | Required when feasibility_verdict is infeasible. Must propose a concrete modification to the plan. Null allowed when verdict is feasible. |
Common Failure Modes
What breaks first when using an Agent Plan Feasibility Gate and how to guard against it.
Over-Optimistic Feasibility
What to watch: The gate approves plans that sound plausible but contain hidden dependencies, impossible sequences, or resource constraints the model overlooked. The agent confidently labels a plan 'feasible' because each step is individually possible, ignoring cross-step conflicts. Guardrail: Add a dedicated 'precondition chain' check that requires the model to list every prerequisite for each step and verify it exists in the output of a prior step or the initial context. Reject plans with unfulfilled preconditions.
Rejection of Creative but Valid Approaches
What to watch: The gate rejects novel or unconventional execution strategies because they fall outside the model's training distribution of 'normal' plans. Creative tool combinations or non-obvious sequencing gets flagged as infeasible. Guardrail: Require the gate to provide a specific, evidence-backed reason for rejection rather than a vague risk label. Implement a lightweight human override path for rejected plans that include a 'novel approach' flag, and track override rates to calibrate the gate's strictness.
Missing Precondition Blindness
What to watch: The gate fails to detect that a step requires an output, permission, or state that hasn't been produced yet. The plan passes because the model assumes implicit availability of resources or data. Guardrail: Force explicit input/output contracts for every step. The prompt must require the model to map each step's required inputs to the outputs of preceding steps or the initial context. Any unmapped input is an automatic infeasible flag.
Context Window Truncation Errors
What to watch: Long or complex plans get truncated by context limits, causing the gate to evaluate only the first N steps and approve an incomplete plan. The feasibility verdict covers only a prefix of the actual execution. Guardrail: Add a plan-completeness check before the feasibility assessment. Require the model to confirm the number of steps evaluated matches the total steps in the plan. If the plan exceeds context, chunk the evaluation and require all chunks to pass before a final feasible verdict.
Risk Assessment Inflation
What to watch: Every step gets a 'high risk' label because the model defaults to conservative risk language, making the risk assessment useless for prioritization. The gate becomes a noisy 'no' that teams learn to ignore. Guardrail: Define a concrete risk rubric with specific criteria for low, medium, and high risk. Require the model to cite a specific, observable condition for each risk level. Track risk score distribution over time and recalibrate if high-risk labels exceed a threshold without corresponding real-world failures.
Tool Availability Assumption
What to watch: The gate approves plans that depend on tools, APIs, or data sources that aren't actually available in the execution environment. The model assumes capabilities exist because they are common in training data. Guardrail: Provide the gate with an explicit, machine-readable manifest of available tools, their schemas, and their constraints. Require the model to match every planned action to a tool in the manifest. Any action without a matching tool is an automatic infeasible flag.
Evaluation Rubric
Run these checks against a golden dataset of plans with known feasibility. Each criterion targets a specific failure mode observed in agent planning: over-optimism, missing preconditions, hallucinated capabilities, and unnecessary rejection of creative approaches.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Feasibility Classification Accuracy | Binary feasible/infeasible matches ground truth label for >= 90% of golden dataset cases | Feasible plan marked infeasible due to conservative risk assessment; infeasible plan marked feasible due to missed precondition | Run against 50+ labeled plans with known outcomes; measure precision and recall separately for feasible and infeasible classes |
Missing Precondition Detection | All preconditions listed in ground truth are identified; no more than 1 false-positive precondition per plan | Required dependency omitted from precondition list; hallucinated precondition that does not exist in the plan context | Compare extracted precondition list against expert-annotated ground truth; count omissions and fabrications per plan |
Step-Level Risk Assessment Accuracy |
| High-risk step rated low-risk; low-risk step flagged as high-risk causing unnecessary plan rejection | Pairwise comparison of model-assigned risk vs expert risk per step; measure exact match rate and adjacent-category match rate |
Over-Optimism Detection | Zero false negatives on plans with known fatal flaws; all infeasible plans correctly rejected | Plan with missing dependency or impossible constraint receives feasible classification with weak or missing risk flag | Curate 10 deliberately infeasible plans with subtle flaws; verify gate rejects all 10 with specific reason codes |
Creative Approach Preservation | <= 5% false-positive rejection rate on valid novel plans that differ from common solution patterns | Valid unconventional plan rejected as infeasible because it does not match expected solution template | Include 5 valid but non-obvious plans in golden dataset; verify gate does not reject them due to unfamiliarity bias |
Reason Code Specificity | Every infeasible verdict includes at least one actionable reason code referencing a specific step or precondition | Infeasible verdict with vague justification like plan seems risky or may not work without citing concrete blocker | Parse reason code field from output; verify non-empty, references specific step ID or precondition name, and is actionable |
Edge Case Boundary Handling | Plans at feasibility boundary (partial dependency satisfaction, time-constrained) receive correct classification with uncertainty noted | Boundary plan classified with high confidence when ground truth is ambiguous; missing uncertainty qualifier | Select 10 plans where expert annotators disagreed or rated as borderline; verify model output includes uncertainty signal and does not over-assert |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Use the base prompt with a frontier model. Remove the structured output schema requirement initially—just ask for a JSON block. Focus on getting the feasibility reasoning right before locking down the output shape.
Simplify the prompt:
- Drop
[CONSTRAINT_SCHEMA]and[RISK_THRESHOLD]parameters - Replace
[OUTPUT_SCHEMA]with: "Return JSON withfeasible(boolean),rationale(string), andrisks(array of strings)" - Use a single example plan instead of the full few-shot set
Watch for
- Over-optimistic feasibility assessments on creative but underspecified plans
- Missing step-level risk identification when the plan is short
- Model conflating "feasible" with "desirable" or "optimal"

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us