open-wa Jev assistant
The Jev plugin of the open-wa WhatsApp toolkit asks Jev which chat action an incoming message needs, then has Mistral write the wording for that one action.
The Jev plugin of the open-wa WhatsApp toolkit asks Jev which chat action an incoming message needs, then has Mistral write the wording for that one action.
Every incoming message becomes one request. The state carries the latest request, the recent conversation, the chat formats that are still available, any booking already sent, earlier action results and the current delivery outcomes. Several independent Choice questions ride together: action picks the format still needed now among none, clarify, text, template, buttons, list, form, booking and correct-booking; next picks respond, act, clarify or reconcile at the checkpoint; reply decides whether the drafted answer may be returned; proposal, field and button check factual grounding, invented fields and the button kind. Code validates that the chosen option exists, that the probabilities cover every option and that the choice is the most probable, and only the selected format is executed.
Which WhatsApp chat action is still needed now for the latest request? Formats already submitted in this turn are absent from the options.
The latest request, recent conversation, the formats still available, any booking already sent and the delivery outcomes so far. Generated wording is present only as a draft that the questions may reject.
What should happen next at this checkpoint, given the authoritative delivery state?
The latest request, recent conversation, the formats still available, any booking already sent and the delivery outcomes so far. Generated wording is present only as a draft that the questions may reject.
May the drafted reply be returned to the person now, or does it claim an unsupported send or contradict the latest request?
The latest request, recent conversation, the formats still available, any booking already sent and the delivery outcomes so far. Generated wording is present only as a draft that the questions may reject.
The WhatsApp adapter passes a text message from an allowed chat to the plugin, with the recent conversation and any booking card already sent.
The plugin assembles the latest request, the conversation context, the formats still available, the booking facts and the outcomes of earlier actions.
One request asks which format is needed, what happens next and whether the draft may be returned; the answers are validated against the offered options.
Only for the chosen format, a chat model writes the message body, labels or booking fields, and the plugin builds the tool arguments.
Grounding questions check that business facts and destinations come from the person or the conversation, and a repair or clarification is used when they do not.
The action is executed, its outcome is recorded for the next turn, and an unknown send is reported for reconciliation instead of being retried.
Intent classification is separated from wording: Jev answers only which closed chat action is needed and a different model writes the text that action requires. Formats already submitted in a turn are removed from the offered options, and an unknown send has to be reconciled rather than retried, so the request that chooses an action also prevents a duplicate send.