Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Agent Plan Validator

agent.plan_validate

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

This advises and does not act: it reads the plan you send and reports what is wrong with it, without running a single step. Three questions are answered. Do the dependencies hold together — no loop, no step waiting on something the plan never declares, no step sitting outside the flow? Will every input a step reads exist by the time it runs, judged against the resolved layers rather than the order you happened to write the steps in? And does any step break a rule you set, such as a denied tool, a scope you did not allow, a side effect above your ceiling, or work that needs approval and does not carry it? A bad plan is a normal answer here, so problems come back as a report with valid set to false rather than as an error. The dependency facts come from the same graph engine the workflow validator uses, so a plan and a workflow can never disagree about whether a graph has a cycle.

A plan that loops or reads a value nothing produces fails partway through, after the earlier steps have already written somewhere. Checking the shape and the policy first turns that into a rejected plan with the offending step ids in hand, and it does so with the same cycle detection the workflow skills use, so the two surfaces cannot disagree.

Reliability

Fully deterministic: the same plan and policy always produce the same report, issues come back in a fixed order by kind and then by step declaration order, and cycle members are listed in declaration order. Traversal is iterative, so a 2000-step chain is answered rather than overflowing. Every policy denies on omission: a step that does not say what it changes cannot pass a side-effect ceiling, and a step with no tool cannot pass a tool allowlist. Failures, all of which are about the request rather than the plan: PLAN_INVALID means a step is not an object, an id is empty or padded with whitespace, or a property outside the accepted set was sent — fix the field named in the error and retry; PLAN_STEP_ID_DUPLICATE means two steps share one id while describing different work, which makes every dependency on that id ambiguous — give them separate ids; PLAN_LIMIT_EXCEEDED means more than 2000 steps were sent — split the plan and validate each part; PLAN_EDGE_LIMIT_EXCEEDED means the dependsOn lists add up to more than 10000 dependencies — split the plan the same way; PLAN_POLICIES_INVALID means a policy named a rule that is not implemented or a bound that contradicts itself, and a policy is never ignored — correct it and retry; PLAN_ID_TOO_LONG means one step id is longer than 128 characters — shorten the id and retry.

Context footprint

The report holds step ids, codes and counts, never step inputs or the plan's goal. A clean 2000-step plan answers in a few hundred kilobytes because the layers name every step once; issues stop at maxIssues and say so in summary.truncated. A successful call costs 1 execution credit.

When to use it

After a plan is proposed and before its first step runs, especially when the plan was generated rather than written.

When you want the plan carried out, when loops are deliberate, or when the question is whether the goal is the right one.

Scope

Note
Report the dependency, input-availability and policy problems in a supplied agent plan, and the execution layers when the plan is sound.

Non-goals

  • Does not run, schedule or store any step of the plan
  • Does not judge whether the plan achieves its goal
  • Does not repeat the plan's goal text back to the caller
  • Does not authorise anything — the policy is the one you supply
  • Does not invent steps for dependencies the plan never declares

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

validation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
planobjectYesClosed agent plan with a required steps array plus optional available names and unused goal text.
policiesobjectNoClosed optional policy ceilings; omit the object to keep cycle and producer checks on with no other ceilings.
maxIssuesintegerNoIssue cap; omit it for 1,000.

Output schema

FieldTypeRequiredDescription
validbooleanYesWhether no ERROR-severity finding exists.
issuesarrayYesBounded array of 0 through 10,000 findings with code, severity, and detail.
orderarrayYesBounded array of execution layers; empty when a cycle makes layering impossible.
summaryobjectYesClosed plan-validation summary with counts, depth, and truncation.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"agent.plan_validate","input":{"plan":{"steps":[{"id":"load","produces":["rows"]},{"id":"sum","dependsOn":["load"],"inputs":{"src":"rows"}}]}}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("agent.plan_validate", {"policies":{"maxSideEffect":"EXTERNAL_READ"},"plan":{"available":["tenantId"],"goal":"produce the weekly revenue report","steps":[{"id":"load","tool":"data.load_rows","produces":["rows"],"sideEffect":"EXTERNAL_READ","inputs":{"tenant":"tenantId"}},{"id":"summarise","tool":"data.aggregate","produces":["totals"],"dependsOn":["load"],"sideEffect":"NONE","inputs":{"source":"rows"}},{"id":"render","tool":"chart.bar","produces":["chart"],"dependsOn":["summarise"],"sideEffect":"NONE","inputs":{"series":"totals"}}]}});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
PLAN_INVALID400NoThe request payload failed this skill's input validation.
PLAN_STEP_ID_DUPLICATE400NoThe request payload failed this skill's input validation.
PLAN_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
PLAN_EDGE_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
PLAN_POLICIES_INVALID400NoThe request payload failed this skill's input validation.
PLAN_ID_TOO_LONG429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not run, schedule or store any step of the plan
  • Does not judge whether the plan achieves its goal
  • Does not repeat the plan's goal text back to the caller
  • Does not authorise anything — the policy is the one you supply
  • Does not invent steps for dependencies the plan never declares
  • Executing the plan or any step of it
  • Plans where cycles are intentional, such as retry loops
  • Deciding whether a plan is a good idea rather than a runnable one

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "agent.plan_validate",
  "input": {
    "policies": {
      "maxSideEffect": "EXTERNAL_READ"
    },
    "plan": {
      "available": [
        "tenantId"
      ],
      "goal": "produce the weekly revenue report",
      "steps": [
        {
          "id": "load",
          "tool": "data.load_rows",
          "produces": [
            "rows"
          ],
          "sideEffect": "EXTERNAL_READ",
          "inputs": {
            "tenant": "tenantId"
          }
        },
        {
          "id": "summarise",
          "tool": "data.aggregate",
          "produces": [
            "totals"
          ],
          "dependsOn": [
            "load"
          ],
          "sideEffect": "NONE",
          "inputs": {
            "source": "rows"
          }
        },
        {
          "id": "render",
          "tool": "chart.bar",
          "produces": [
            "chart"
          ],
          "dependsOn": [
            "summarise"
          ],
          "sideEffect": "NONE",
          "inputs": {
            "series": "totals"
          }
        }
      ]
    }
  }
}

Examples

A sound three-step plan, with the resolved layers and a side-effect ceiling that holds

Inputjson
{
  "policies": {
    "maxSideEffect": "EXTERNAL_READ"
  },
  "plan": {
    "available": [
      "tenantId"
    ],
    "goal": "produce the weekly revenue report",
    "steps": [
      {
        "id": "load",
        "tool": "data.load_rows",
        "produces": [
          "rows"
        ],
        "sideEffect": "EXTERNAL_READ",
        "inputs": {
          "tenant": "tenantId"
        }
      },
      {
        "id": "summarise",
        "tool": "data.aggregate",
        "produces": [
          "totals"
        ],
        "dependsOn": [
          "load"
        ],
        "sideEffect": "NONE",
        "inputs": {
          "source": "rows"
        }
      },
      {
        "id": "render",
        "tool": "chart.bar",
        "produces": [
          "chart"
        ],
        "dependsOn": [
          "summarise"
        ],
        "sideEffect": "NONE",
        "inputs": {
          "series": "totals"
        }
      }
    ]
  }
}
Expected outputjson
{
  "valid": true,
  "order": [
    [
      "load"
    ],
    [
      "summarise"
    ],
    [
      "render"
    ]
  ],
  "summary": {
    "stepCount": 3,
    "edgeCount": 2,
    "layerCount": 3,
    "cyclic": false,
    "maxDepth": 3,
    "issueCount": 0,
    "bySeverity": {
      "ERROR": 0,
      "WARNING": 0
    },
    "availabilityEvaluated": true,
    "truncated": false
  },
  "issues": []
}
Tip
Each step reads a name the previous one produces, and tenantId was declared as already available, so availability resolves.

A plan with a two-step loop, an unknown dependency and a step that breaks two policies

Inputjson
{
  "policies": {
    "maxSideEffect": "NONE",
    "requireApprovalFor": [
      "EXTERNAL_WRITE"
    ]
  },
  "plan": {
    "steps": [
      {
        "dependsOn": [
          "b"
        ],
        "id": "a"
      },
      {
        "dependsOn": [
          "a"
        ],
        "id": "b"
      },
      {
        "dependsOn": [
          "missing-step"
        ],
        "id": "c"
      },
      {
        "sideEffect": "EXTERNAL_WRITE",
        "id": "d",
        "tool": "mail.send"
      }
    ]
  }
}
Expected outputjson
{
  "valid": false,
  "order": [],
  "summary": {
    "stepCount": 4,
    "edgeCount": 3,
    "cyclic": true,
    "maxDepth": 0,
    "issueCount": 12,
    "bySeverity": {
      "ERROR": 10,
      "WARNING": 2
    },
    "availabilityEvaluated": false,
    "truncated": false
  },
  "issues": [
    {
      "code": "DEPENDENCY_UNKNOWN",
      "severity": "ERROR",
      "stepId": "c",
      "detail": "This step waits for 'missing-step', which the plan never declares, so the dependency can never be satisfied."
    },
    {
      "code": "DEPENDENCY_CYCLE",
      "severity": "ERROR",
      "stepId": "a",
      "detail": "These steps wait for each other in a loop, so no order satisfies every dependency and the plan cannot be layered.",
      "ruleId": "policies.forbidCycles",
      "steps": [
        "a",
        "b"
      ]
    },
    {
      "code": "STEP_UNREACHABLE",
      "severity": "WARNING",
      "stepId": "c",
      "detail": "This step neither waits for anything nor is waited on, while the rest of the plan is wired together, so it sits outside the flow."
    },
    {
      "code": "STEP_UNREACHABLE",
      "severity": "WARNING",
      "stepId": "d",
      "detail": "This step neither waits for anything nor is waited on, while the rest of the plan is wired together, so it sits outside the flow."
    },
    {
      "code": "SIDE_EFFECT_ABOVE_CEILING",
      "severity": "ERROR",
      "stepId": "a",
      "detail": "This step does not say what it changes, so it cannot be shown to stay under the ceiling you set.",
      "ruleId": "policies.maxSideEffect"
    },
    {
      "code": "SIDE_EFFECT_ABOVE_CEILING",
      "severity": "ERROR",
      "stepId": "b",
      "detail": "This step does not say what it changes, so it cannot be shown to stay under the ceiling you set.",
      "ruleId": "policies.maxSideEffect"
    },
    {
      "code": "SIDE_EFFECT_ABOVE_CEILING",
      "severity": "ERROR",
      "stepId": "c",
      "detail": "This step does not say what it changes, so it cannot be shown to stay under the ceiling you set.",
      "ruleId": "policies.maxSideEffect"
    },
    {
      "code": "SIDE_EFFECT_ABOVE_CEILING",
      "severity": "ERROR",
      "stepId": "d",
      "detail": "What this step changes is above the ceiling you set.",
      "ruleId": "policies.maxSideEffect"
    },
    {
      "code": "APPROVAL_REQUIRED",
      "severity": "ERROR",
      "stepId": "a",
      "detail": "This step needs approval under the rule you set and does not carry approved set to true.",
      "ruleId": "policies.requireApprovalFor"
    },
    {
      "code": "APPROVAL_REQUIRED",
      "severity": "ERROR",
      "stepId": "b",
      "detail": "This step needs approval under the rule you set and does not carry approved set to true.",
      "ruleId": "policies.requireApprovalFor"
    },
    {
      "code": "APPROVAL_REQUIRED",
      "severity": "ERROR",
      "stepId": "c",
      "detail": "This step needs approval under the rule you set and does not carry approved set to true.",
      "ruleId": "policies.requireApprovalFor"
    },
    {
      "code": "APPROVAL_REQUIRED",
      "severity": "ERROR",
      "stepId": "d",
      "detail": "This step needs approval under the rule you set and does not carry approved set to true.",
      "ruleId": "policies.requireApprovalFor"
    }
  ]
}
Tip
Because a loop makes layering impossible, order is empty and availabilityEvaluated is false: the input checks were not run rather than quietly passed.
  • Reject a model-generated plan before the first side effect happens
  • Prove a plan stays inside a tool allowlist and a side-effect ceiling
  • Get the execution layers for a plan you already trust

Avoid for

  • Executing the plan or any step of it
  • Plans where cycles are intentional, such as retry loops
  • Deciding whether a plan is a good idea rather than a runnable one

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

analysisagentplanvalidation