# Can static JSON schemas secure non-deterministic AI agent reasoning?

> Source: <https://dev.to/geercom/can-static-json-schemas-secure-non-deterministic-ai-agent-reasoning-36pl>
> Published: 2026-08-10 20:13:13+00:00

I would love feedback from the technical community on scope enforcement and impact boundaries when building production agent workflows.

Indirect prompt injection allows attackers to context-hijack autonomous AI agents. Because hijacked tool calls look completely legitimate at the API and firewall level, non-deterministic evaluation (using an LLM to monitor another LLM) fails to enforce strict security boundaries.

To address this vulnerability, I published a paper modeling a deterministic **Intent Architecture**. By placing a static JSON policy schema layer between agent reasoning and tool execution, proposed actions are validated against explicit policy boundaries *before* execution can occur.

The architecture intercepts proposed agent actions and validates them against a static `policy_schema.json`

file prior to execution:

``` python
python
import json
import jsonschema

# Load static policy schema
with open("policy_schema.json", "r") as f:
    policy_schema = json.load(f)

def validate_agent_intent(intent_payload):
    """Intercepts a proposed agent action and validates it against static policy schema rules."""
    try:
        jsonschema.validate(instance=intent_payload, schema=policy_schema)
        return True, "ACTION ALLOWED: Intent satisfies static policy schema."
    except jsonschema.exceptions.ValidationError as err:
        return False, f"ACTION BLOCKED: Policy violation -> {err.message}"
```


