Skip to main content
A session can carry its own instructions, a system prompt that shapes every answer in the session. It can set the role to take, the tone to use, or the format of the result. Session instructions add to the context’s default instructions instead of replacing them. The context default always applies, and if the session prompt only repeats it, Nexus skips the session prompt.

Start and continue a session

Pass system_prompt on the query that starts the session, and it applies to every turn after that.
1

Start a session with a system prompt

Pass system_prompt with scope and ask on the opening query. You can set scope and system_prompt only when a session starts.
curl
The response carries a session_id and the query’s id.
2

Continue the session

Reference the previous turn with previous_query_id. Follow-up turns keep the system prompt and the context default, so you don’t resend either.
curl