Skip to main content

Local service HTTP API

The local integration point for the Yam app and any other client (REQ-ADE-1, LLD §13.5). Bound to 127.0.0.1, behind a bearer token printed on stdout. Every handler calls the same function the CLI calls; no logic lives here.

OpenAPI 3.1.0, service version 0.1.0. The document itself is openApiDocument() in @svatah/yam-service; the Python and Java clients under clients/ and @svatah/yam-sdk are generated from it.

MethodPathSummary
GET/projectConfig, flows, stories, compositions, run blocks and API names
GET/flows/{file}Read a flow file
PUT/flows/{file}Write a flow file
POST/compileCompile and lint
GET/planThe compiled plan, story by story
POST/runStart a run; step events arrive on the stream
GET/runsEvery run's summary
GET/runs/{id}One run's summary
POST/runs/{id}/stopStop a run that is going
GET/runs/{id}/resultsOne run's step results
GET/runs/{id}/auditOne run's audit log
GET/bindingsThe bindings store
GET/bindings/{id}One binding
PUT/dataWrite data.yaml
GET/dataRun data, with secrets redacted
GET/runs/{id}/screenshots/{name}A screenshot a run wrote
POST/api/requestExecute one API request ad hoc
PUT/api/{name}Save a named request under api/.yaml
GET/apiNamed API requests
POST/recordStart a recording session; decisions arrive on the stream
POST/captureRecord a flow from what a person does; sentences arrive on the stream
POST/capture/{id}/stopEnd a capture, writing the flow and its bindings
POST/record/{id}/decisionAccept, re-pick or reject the grounding a session is waiting on
POST/record/{id}/stopStop a recording session
POST/migrateImport a Yam prototype's electron-db directory into this project
POST/bindings/verifyDry-resolve the store, or one binding
POST/healHeal a run; proposals arrive on the stream
POST/surface/{session}/snapshotThe driven session's snapshot, for the picker and the explorer
POST/trajectory/compileCompile a captured trajectory into proposals//
GET/agents/clientsWho is connected over MCP right now
GET/toolsThe tools this project exposes, and every invocation served
GET/targetsDiscover available targets and adapter readiness (SF-04)
GET/sessionsList active surface sessions (SF-05)
POST/sessionsConnect to a target and open a surface session (SF-04)
DELETE/sessions/{session}Close a surface session (SF-05)
GET/sessions/{session}/capabilitiesA session's adapter capabilities (SF-09)
POST/sessions/{session}/snapshotA semantic snapshot of the surface (SF-10)
POST/sessions/{session}/actPerform a validated action on the surface (SF-11)
POST/sessions/{session}/readRead a value from the surface (SF-11)
POST/sessions/{session}/checkCheck a predicate against the surface (SF-11)
POST/sessions/{session}/describeDescribe a specific element on the surface (SF-10)
GET/sessions/{session}/eventsWhat this session did, and the steps a proposal compiles from (T17, SF-19)
POST/sessions/{session}/controlTake, release or report who holds a target (T16, SF-13)
POST/sessions/{session}/requestSend an HTTP request on an HTTP surface (T15, SF-04)
POST/sessions/{session}/screenshotTake a screenshot of the current surface (SF-11)
GET/eventsThe event stream (WebSocket)
GET/events/sseThe event stream (server-sent events)
GET/openapi.jsonThis document
GET/healthLiveness, for the app's spawn handshake