GET /state/{pid} is the primary way to read what an application currently knows about itself. The response is a flat SubstrateState document containing every labeled state object in dot-notation form, the full action schema, navigational context such as current URL and window title, and probe performance metadata. By default the daemon returns the most recent cached snapshot, which is fast. Pass fresh=true when your agent needs a guaranteed up-to-date view before making a decision.
Endpoint
integer
required
OS process ID of the target application. Obtain this from
GET /apps.boolean
default:"false"
When
true, the daemon triggers a new probe cycle and waits for it to complete before returning. This adds between 50 ms and 90 s of latency depending on the runtime and application complexity. Use false for polling loops where throughput matters.Response
The response is a flat JSON object — allSubstrateState fields are at the top level rather than nested inside a wrapper.
Top-Level Fields
string (UUIDv7)
Time-ordered unique identifier for this specific capture. Use it to correlate snapshots with diff and watch events.
string
Stable semantic identifier for the application. Survives daemon restarts.
string
Human-readable application name.
integer
OS process ID.
string
Runtime kind:
v8, jvm, clr, native, or unknown.string
Semantic version of the state schema (semver). Use this value when submitting corrections via
POST /learn/{pid}.datetime
ISO 8601 timestamp of when this snapshot was captured.
float
Overall state quality score from
0.0 to 1.0.AppContext
Navigational context for the application — URL, view name, window title, and window ID.
object
Flat dot-notation map of every labeled state key and its current value. Array elements use bracket notation, for example
inbox.emails[0].subject.object
Map of action names to their typed schemas. Each entry includes the function signature, reversibility classification, parameter list, and confidence score.
object
Probe performance metadata. Useful for debugging latency and understanding which capture path was used.
