This document proposes a structured HTTP interface for recording trader observations and generating .jgtml-spec packages.
Traders narrate their market analysis across multiple instruments and timeframes. The API maintains session state so that an LLM can transform these observations into a specification. This design supports real-time voice or text input and allows a stateless LLM to recall the full context.
Note from William: The flow below is still evolving. The sequential, multi-timeframe rhythm of an actual trading session may require further refinement. Treat this specification as a draft for future tightening.
POST /intent/initiateStart a new intent session.
{
"instrument": "EUR/USD",
"timeframes": ["H4", "H1"]
}
{ "session_id": "uuid", "timestamp": "ISO-8601" }POST /intent/observeSend a raw observation string.
{
"session_id": "uuid",
"observation": "Wave 3 complete, AO rising"
}
GET /intent/stateRetrieve current session information.
{
"current_observations": ["..."],
"inferred_components": {"bias": "bullish"},
"pending_slots": ["wave_count"]
}
POST /intent/labelAnnotate or correct an element.
{
"session_id": "uuid",
"label_type": "wave_count",
"value": "Wave 3 complete"
}
POST /intent/confirmFinalize the .jgtml-spec generation.
{ "session_id": "uuid" }{
"jgtml_spec": "<YAML representation>",
"signal_package_preview": "..."
}
GET /intent/historyRetrieve past specifications or narrative echoes.
This API is intended to integrate with the broader jgtagentic ecosystem and enable recursive narrative capture from trader to specification.