Skip to main content
NSP’s CLR probe lets your AI agent read live data from any running .NET application and invoke its methods directly — without hooking into the UI, writing interop code, or modifying the target app. The probe attaches to the target process, normalises field values and method return values into the Substrate Schema Format (SSF), and makes them available over the standard NSP API. This guide walks you through detecting a .NET app, reading its state, exploring actions, and executing CLR method calls.
1

Prerequisites

Confirm the following before you begin:
  • NSP daemon installed and running on port 7842. Download from platform.nelieo.com/download.
  • .NET Framework 4.8 or later installed on the host machine. The CLR probe targets both .NET 4.x and .NET 6+ apps.
  • The target .NET application is running. The daemon scans for processes every 5 seconds, so start your app before you query for it. This guide uses Mission Planner (a C# Ground Control Station) as the example; the same steps apply to any WinForms, WPF, or .NET console app.
  • Python 3.11+ and the NSP SDK installed.
2

Detect the .NET App

Call the /substrate/v1/apps endpoint to confirm the daemon has detected and classified your application. Look for "runtime": "clr" in the response.
Example response showing Mission Planner as a CLR app:
You can also check with the Python SDK:
Expected output:
The first time the CLR probe attaches to a process, it may take up to 90 seconds to complete the cold probe (heap enumeration + schema learning). Subsequent runs use the cached schema and attach in under a second. Check probe_status — it progresses from attachingcold_probeactive.
3

Read .NET App State

Once attached, use session.get_*() with dot-notation keys to read values that the CLR probe has normalised into SSF. The exact keys available depend on the application; call session.state.objects to see all discovered keys.
Expected output:
4

Explore Available Actions

Iterate session.actions to see what NSP discovered for this CLR app. Each entry shows the action name, its full type signature, and its reversibility classification.
Example output for Mission Planner:
5

Execute a CLR Action

Use session.execute() to run an action. For reversible_write actions you do not need a verify_expression, though you can add one. The example below arms the motors — a reversible operation that can be undone with disarm_motors.
Expected output:
6

Handle the raw_return Field

When NSP invokes a CLR method rather than a higher-level action, the response includes a raw_return field containing the .NET method’s return value serialised to JSON. Check this field when you need the actual return value of a method call rather than a simple success boolean.
raw_return is null for actions that do not map to a direct method invocation (for example, actions that trigger UI events). The success field always reflects whether the action completed without error, regardless of raw_return.
7

Cold Probe Timing and Confidence

The first time NSP attaches the CLR probe to a process, it must enumerate the full CLR heap to build the schema — this is called a cold probe and can take up to 90 seconds. Subsequent attachments use the cached schema and complete in under a second.You can monitor probe progress by polling /substrate/v1/apps and checking probe_status and confidence:
The probe_status field moves through these stages:Actions are gated by confidence. The CLR probe typically reaches 0.93–0.97 confidence once active. reversible_write actions require confidence >= 0.80; irreversible_write actions require confidence >= 0.95.

Full Workflow Example

The script below covers the complete CLR probe workflow: detection, state reading, action execution, and real-time streaming.