Skip to main content
Kviria keeps no conversation between calls. Your agent keeps it, as the state string of the last response. Conversation state explains what the string holds.

Keep one state per conversation

  1. On the first call, send an empty string as state.
  2. After each response, keep its state in place of the old one.
  3. On the next call, send that state, copied exactly. Send that field only, never the whole response.
  4. To start a new conversation, send an empty string again.
In code, one state per conversation is enough:
On the MCP server, state is an ordinary argument of the tool. Copy it from the last result into the next call.

After an error

  • 400 invalid_state: the state was altered. The body carries an empty state. Keep it, and the conversation starts again.
  • 400 with invalid_body, invalid_request, unsupported_field, transcript_removed or anchor_required: the body carries a state. Keep it and send it on the next call.
  • Every other error carries no state. Keep the one you had.

Send the position

  • Send anchor on the first call. Kviria keeps it in the state.
  • After that, send anchor only when the user moves. A call without one uses the position in the state.
  • Send the user’s position exactly as you were given it. Never send the coordinate of a place from an answer as the user’s position. Kviria keeps the earlier position when it sees one, and the evidence says so.
The Quickstart carries one conversation from the first call to a settled place.