/state endpoint is the primary way to read what an application is doing right now. It returns a SubstrateState — a flat JSON document containing every semantic state key the probe has extracted from the process’s runtime heap, along with the full action schema, navigational context, and probe diagnostics. You’ll call this endpoint before planning an agent action, after executing one, or any time you need the freshest possible view of a process.
Endpoint
Parameters
The OS process ID of the target application. Get this value from the
pid field in GET /apps.When
false (the default), the daemon returns the most recently cached state snapshot immediately — typically under 5 ms. When true, the daemon triggers a new probe cycle before responding. Fresh probes add 50 ms to 90 s of latency depending on the runtime and application size. Use fresh=true when you need to confirm the current state before a high-stakes action, or after an action has just completed.Response Fields
The response is a flat JSON object. AllSubstrateState fields are at the top level — there is no wrapper envelope.
A UUIDv7 (time-ordered) identifier for this exact state snapshot. Use this value as the
since parameter in GET /diff/{pid} to compute what changed between two captures.Stable semantic identifier for the application, e.g.
"gmail-chrome-12847".Human-readable application name.
OS process ID at the time of capture. If the process has restarted since the capture, this may differ from the PID you requested.
Runtime kind:
v8, jvm, clr, or native.Semantic schema version in semver format, e.g.
"1.4.2". The schema version increments whenever the semantic engine updates its labeling model for this application, either automatically or via POST /learn/{pid}.ISO 8601 timestamp of when this snapshot was taken.
Overall probe quality score from
0.0 to 1.0. Values above 0.90 indicate reliable semantic labeling. If confidence is low, read the probe_metadata fields to diagnose which tier was used and whether the heap was partially filtered.Navigational context for the application.
A flat map of dot-notation state keys to their current values. Keys use dot-notation for nested fields and bracket notation for array indices, e.g.
"inbox.emails[0].subject". Values are primitives: strings, numbers, booleans, or null. This is the primary data structure your agent reads and reasons over.A map of action names to their
ActionSchema definitions. Each entry describes how to call the action. See GET /schema/{pid} for the full field list with documentation.Internal probe diagnostics. Useful for performance tuning and debugging.
