Section 1 — Security
Locking down the daemon is the first thing you should do. The default configuration is intentionally permissive to make local development frictionless, but every one of those defaults is a hazard in production.The daemon emits a loud startup warning whenever
require_key = false or cors.allow_all_origins = true is set. These warnings are intentional — do not suppress them; fix the configuration.-
Enable API key authentication.
OpenC:\ProgramData\Nelieo\axon.tomland confirm the[auth]section requires a key:Generate your production key from platform.nelieo.com. Never setrequire_key = falseoutside of a fully isolated development machine. -
Bind only to localhost.
Thehostfield controls which network interface the daemon listens on. In production it must always be127.0.0.1. Setting it to0.0.0.0exposes the daemon to every network interface on the machine, including any that are publicly reachable. -
Disable wildcard CORS.
If you have any dashboard or browser-based tooling that calls the daemon, enumerate those origins explicitly. Never allow all origins. -
Store API keys in environment variables, not in source code.
The Python SDK readsNSP_API_KEYautomatically: -
Rotate keys regularly.
Visit platform.nelieo.com to issue a new key, update your deployment environment, then revoke the old key. The daemon’s in-memory verification cache will invalidate the revoked key within seconds.
Section 2 — Reliability
A daemon that does not survive reboots or crashes is not production-ready. The items in this section make sure NSP keeps running regardless of what the underlying Windows machine does.-
Install the daemon as a Windows Service with automatic startup.
Run the following command once from an elevated (Administrator) terminal:This registers theNSPDaemonservice with start type Automatic, which means it comes back on every reboot without any manual intervention. -
Configure service recovery actions.
The installer sets sensible defaults (restart after 30 s, 60 s, then 120 s), but you should verify these are in place or tune them to your requirements:Thereset= 86400argument resets the failure counter after 24 hours of clean operation. -
Set
min_confidenceto 0.4 or higher.
This prevents the daemon from wasting resources tracking processes it cannot reliably identify. The default is already 0.4 — confirm it has not been lowered: -
Tune
poll_interval_secsfor your latency needs.
The default of 2 seconds is the right balance for most production workloads. Lowering this value increases CPU load on the host; raising it increases the staleness of cached state. Adjust only if you have a specific latency or resource budget. -
Poll
GET /healthfrom your monitoring system.
The health endpoint returns a lightweight JSON payload and never requires authentication. Add it to your uptime monitor or Nagios/Datadog check:Alert on anything other than"status": "ok".
Section 3 — Agent Safety
These settings guard against your agent taking destructive or irreversible actions when state data is stale, ambiguous, or wrong.-
Require
verify_expressionfor allirreversible_writeactions.
Any action whose schema has"reversibility": "irreversible_write"— such assend_reply,delete_permanently, orsubmit_form— must be called with averify_expressionthat confirms the action actually took effect. The daemon rejects the call with400 missing_verify_expressionif you omit it, but your code should be explicit regardless: -
Tune
verify_timeout_msto match your app’s response time.
The default verification timeout is 5 000 ms. If your target application is slower (for example, a Salesforce form that takes 8 seconds to confirm), raise this value. If it is faster, lower it to fail quickly: -
Test your agent on a staging environment before production.
Run your agent against a staging instance of the target app with non-production data. Confirm that everyirreversible_writepath behaves as expected and thatverify_expressionvalues match real post-action state. -
Handle
NSPVerificationFailedErrorcorrectly — do not retry blindly.
When you receive this error it means the action executed but the post-action state did not match yourverify_expression. The action may or may not have succeeded in the application. Retrying immediately risks a double-execution. Log the error, inspect the state manually, and alert a human if necessary: -
Handle
NSPRateLimitErrorwith exponential backoff.
The daemon enforces 10 action executions per second per API key by default. Bursting past that limit returns a429which the SDK surfaces asNSPRateLimitError. Back off exponentially and add jitter:
Section 4 — Monitoring
Knowing when something is wrong before your users do is a matter of wiring up the right signals from the start.-
Poll
GET /healthfrom your monitoring system.
If you have not done this under Reliability above, do it now. This endpoint is unauthenticated by design so your monitoring agent does not need a key. -
Configure Windows Event Log monitoring.
The daemon writes all significant events — startup, shutdown, probe errors, auth failures — to the Windows Application event log under the sourceNSPDaemon. Point your log aggregator (Splunk, Datadog Agent, Elastic Agent, etc.) at this source, or set up a manual alert:In Event Viewer: Windows Logs → Application → Filter Current Log → Source: NSPDaemon. -
Use
level = "info"in production — not"debug".
Debug logging is verbose and will fill your log storage quickly. Set the level to"info"unless you are actively investigating a problem: -
Use
format = "json"for structured log ingestion.
JSON-formatted logs can be parsed, filtered, and indexed by any modern log aggregator without custom grok patterns. The"text"format is human-readable but unstructured — reserve it for local development:
