Reference
FAQ
Common questions about what NILScript is, how it stays safe, and how to adopt it.
Positioning
Is NILScript a product or a standard?
A standard. It is an open specification for agent ↔ system operations — a wire protocol (NIL) plus an orchestration DSL. The Wosool project is its steward and reference implementation, not the standard itself. You conform to it; you don’t run it.
How is it different from MCP?
MCP standardizes how agents read and call tools. NILScript standardizes how agents act on a business — proposing, approving, and committing consequential operations. They are complementary: MCP to read context, NILScript to act on it.
Do I have to use Wosool?
No. The core package is JSON schemas plus docs with zero runtime dependencies. The standard is self-adoptable — an independent ERPNext adapter was built from the public standard and CLI alone.
What languages are supported?
The protocol is language-neutral — it is HTTP plus JSON. The optional SDK and CLI are Python (≥ 3.12). Any language that speaks HTTP can implement a conformant system or a speaker.
Is it production-ready?
The specification is published as v0.3.0 (still a DRAFT 0.x line); the reference implementation runs in production; the open validator core and graph executor are emerging. Guarantees never weaken across versions, and the spec is extracted from running code — so what is specified is real, even while the surface is still settling.
Safety & guarantees
Does the agent ever execute anything directly?
No. The agent emits intent — a PROPOSE or a DSL program. The system validates, previews, and (after any required approval) commits. Hallucinations die at the server.
What stops a hallucinated amount from going through?
Several layers. PROPOSE has no side effects and returns a human-readable preview rendered from system facts. Risky verbs carry a tier floor — HIGH parks for approval, CRITICAL adds a 300-second cooling delay. Grants are budgeted and fail-closed.
What happens on a retry or double-commit?
Idempotency (G4). A repeated COMMIT with the same idempotency key replays the original outcome instead of acting twice.
What if the agent is ambiguous about which customer or order?
The system refuses rather than guesses. An ambiguous hint returns an AMBIGUOUS refusal with up to eight candidates; an unmatched hint returns UNRESOLVED. Both are 200 OK outcomes, not errors.
Can multiple agents share authority?
Yes — a swarm. Multiple speakers act under one shared grant and one shared budget, enforced before side effects, so a swarm cannot collectively overspend.
Reversal & failure
Can an agent undo what it did?
Sometimes — honestly. ROLLBACK requests a governed reversal; it returns a PROPOSAL (a compensation preview) committed like any other action. Whether reversal is possible depends on the verb’s reversibility tier: REVERSIBLE, COMPENSABLE, or IRREVERSIBLE. Unmarked verbs default to IRREVERSIBLE, and the system refuses to pretend otherwise.
What happens when a multi-step task fails halfway?
The DSL program is a saga. Action nodes can declare compensation, and on failure (on_error: compensate) the durable runtime unwinds completed steps in reverse order — each compensation previewed and committed. Reversals that exceed an agent’s authority park for a human DECIDE.
Building & scope
How do I make my backend conformant?
Implement the six endpoints (PROPOSE, COMMIT, QUERY, STATUS, EVENT, ROLLBACK) and the Six Guarantees. Use nilscript export-openapi to scaffold the surface and nilscript profile <verb> for the contracts. Target Core System, or NIL-H if you are multi-tenant.
Is it only for e-commerce?
No. It ships with two profiles today — commerce-v1 and services-v1 — and was calibrated against 18 platforms across e-commerce, ERP, billing, and scheduling. New domains arrive as new profiles, which version independently.
Is it Arabic-only?
No. Previews are localized via BCP 47. NILScript is Arabic-first with RTL support, but the locale is a parameter, not a constraint.
Why "intent, not implementation"?
Because a verb should say what the speaker wants, not how a particular backend does it. record_payment means the same thing across Stripe, Square, and ERPNext; the system owns the implementation. That is what makes the protocol neutral across backends.
Governance
How are breaking changes handled?
SemVer: MAJOR = breaking, MINOR = new verbs/profiles, PATCH = editorial. Profiles version independently with a deprecation overlap of at least one MINOR. Releases happen at most quarterly, only from features already running in the reference implementation. The Six Guarantees never weaken.
Who governs the spec?
The Wosool project stewards it. The spec is extracted from running code rather than designed in the abstract, and it is self-adoptable from public materials alone — which keeps the steward honest.