Prompts
Prompts to be included in a User’s context window are streamed from Wysp via a WebSocket connection, using the prompt message: Users API -> prompt
New prompts (and updates to previous ones) arrive sporadically over the lifetime of the socket connection as the GPS, traffic, objectives, and other variables evolve.
{ "key": "3b8cb7c20", // opaque key used for prompt replacement "content": "The user is near the end of Pilestredet and should turn left at the lights. Just before the turn there is a prominent green building on the right. The left turn is subtly uphill.", "language": "en-US", // natural language of the content "timestamp": "2026-01-28T09:00:00.000Z", // ISO 8601 UTC Date string "ttlSeconds": 20, // (optional) number of seconds the content remains valid for}Prompts with the same key may arrive multiple times, evolving the context to maintain coherence and compactness.
Inclusion in context window
Section titled “Inclusion in context window”Each time a prompt is received, it needs to be integrated into the User’s overall context window. The algorithm for doing so is simple:
- If a prompt with the same
keyis already present, it should be deleted from the context window - The incoming prompt should be appended to the recent message history
Expiration
Section titled “Expiration”If a prompt has the ttlSeconds key set, it indicates how long the contents are expected to stay true / relevant / helpful.
When a prompt expires, it should be dropped from the context window to avoid misleading context.