- the agent’s protections: what each of Neon’s trained risks does when it fires,
- the agent’s guardrails: rules you write for this agent,
- at the model request, the agent’s purpose and capabilities.
Stages
What Neon decides
When the agent enforces anything on the reply, a streamed reply is buffered and checked before any of it is sent. When nothing is enforced on the reply, the stream goes to your app as the model produces it. Neon still judges the reply afterwards and records what it would have done.
Protections
Neon checks 35 trained risks, grouped into nine families, at every stage they apply to. Under Risks on the Neon tab, choose what each family does When one fires:
Default for all risks sets every family you haven’t set yourself. Until you change it, everything is in Monitor: Neon records what it finds and blocks nothing. The most specific setting wins: a single risk over its family, and a family over the default.
Hover the icon beside a family to see the risks it covers.
Set protections with the API
GET /api/v1/agents/{agent_id}/neon returns the agent’s protections. PUT to the same path replaces them:
target is * (the default), a family as risk.<family>., or one risk as risk.<family>.<risk>. The family keys are input, memory, tools, data, output, multiagent, supply, ops and vuln. action is enforce, monitor or off. A list holds up to 200 entries, and a target that appears twice is refused with 422. A change reaches the runtime within about five minutes and is recorded in the audit log as neon.settings.update.
Purpose and capabilities
The agent’s Purpose, on its Overview, says in plain language what the agent is for (up to 4,000 characters). Its Capabilities tab names the things it does, such as “Track orders”, each with an optional description and up to 10 example requests. An agent can have up to 50 capabilities. Neon checks every model request against the purpose and, when the agent has enabled capabilities, requires it to match one of them too. The purpose has its own Mode:- Monitor (the default) records requests outside the purpose without blocking them.
- Enforce blocks requests outside the purpose or its capabilities. When the check can’t run, the call fails closed (see When Neon can’t be reached).
purpose and purpose_mode (monitor or enforce) with PATCH /api/v1/agents/{agent_id}, and manage capabilities under /api/v1/agents/{agent_id}/capabilities.
Guardrails
A guardrail is a rule you write for one agent. Neon checks it alongside the risks, in the same pass. Add one under Your rules on the Neon tab with Add guardrail:
A Memory write or Context summary guardrail runs only at its own stage, and those two stages accept only their own kind or a Custom guardrail. Both stages come only from the Python SDK. A guardrail can be added to one inline sub-agent, where it runs on that sub-agent’s calls after the agent-wide guardrails.
Through the API, guardrails are under
/api/v1/agents/{agent_id}/slm-checks (GET and POST, then PATCH and DELETE on /{check_id}). The body takes name, kind, prompt, stages, action, enforcement_mode, enabled and sub_agent_id. action defaults to block and enforcement_mode to monitor.
How decisions show up
Every response carriesX-Xenovia-Decision. When Neon decided the stage, X-Xenovia-Decision-Id names its decision. On a block, X-Xenovia-Reason says what decided it: a risk ID such as risk.data.secret_exposure, purpose for the purpose check, or the ID of the guardrail that blocked. See Blocks and refusals for all the headers.
In Sessions, each stage Neon judged has a Neon step. What Neon found lists each risk or guardrail that fired, with its probability and whether it Blocked, Redacted or was only Recorded. Choose Explain this decision to have Neon say Why it fired, or Why it stayed below the line for one that didn’t.
To get the same explanation through the API, call POST /api/v1/agents/{agent_id}/neon/decisions/{decision_id}/explain with the decision ID from the header or the session. You can pass {"question": "<risk id>"} to ask about one risk. By default Neon explains its most probable finding. An unknown decision returns 404.
When Neon can’t be reached
What happens depends on whether the stage enforces anything: an enforced guardrail, a protection in Enforce, or, at the model request, a purpose in Enforce.- Something is enforced. The runtime fails closed: it answers
503withRetry-After: 5. At the model request, nothing is sent to the provider. - Nothing is enforced. The call goes on without a verdict, and
X-Xenovia-Decisionsaysunchecked.
What next?
Policies
Hard rules that run before Neon.
Sessions
Read what Neon found and why.
Simulation
Attack your agent to test Neon.