Agentic Logic

Validate a code rule's draft

POST /v25-10-beta/agentic-logic/rules/{ruleId}/draft/validate

Runs the publish pipeline's static_contract check (the evaluate export contract, ESM compatibility, and the sandbox source guard) on the saved draft. Nothing is published or persisted.

  • No body. The response is { "valid": true } or { "valid": false, "message": "...", "details": { ... } | null }, where details carries the gate's structured fields (for example reason: "missing_evaluate_export", or reason: "source_guard_refusal" with construct and remedy).
  • A failed check is a 200 with valid: false, not an error.
  • A builder rule answers 409: it has no code draft, so validate its template params instead. A code rule with no saved draft source answers 404.
  • Only the first publish gate runs; a valid draft can still fail a later gate (tests, budgets, deployment) when it is published.

Use the intelligems-access-token header. The token selects the organization; do not send orgId. The organization must have Agentic Logic enabled.

Rate Limit: 50 requests per 30s window, refilling 25 tokens every 30s.

post/v25-10-beta/agentic-logic/rules/{ruleId}/draft/validate

Request

Path parameters

ruleIdstring uuid required

Response

OK

OR

Changes

No recorded changes to this operation across all 1 revision of this API.