Conversation state
Each time an agent ends successfully or pauses on an ask, the conversation state is encrypted and stored in Search2o Cloud, or handed to your own code when the account keeps state in its own enterprise. A follow-up query in the same conversation restores the state and runs the selected agent with that context. The state is per conversation: another conversation cannot see it, and a conversation belongs to one user, so another user cannot see it either.
What the state holds
- The runs so far: which agent ran, with which inputs, what it output, and where it paused when the run paused on
ask. - The prompts: for each prompt with the
conversationoragentscope, the system text and the full history of user turns, assistant answers and tool results. This history is why an LLM in a follow-up remembers the earlier exchange. A prompt with theagentscope is kept per agent. See Prompts. - The conversation variables (
conv.), shared by every agent in the conversation. - The agent variables (
agent.) of every agent that has run in the conversation.
Agents see the state only through these variables and prompts. Local variables are not kept.
When state is saved
State is saved when a run ends with end, with return from main, or by pausing on ask. It is not saved when the run ends with fail or with an error, so a follow-up sees the state as it was before the failed run.
Encryption
State is encrypted before it leaves the agent server, and the cloud never decrypts it. By default Search2o manages the key for your account. An administrator can switch to keys held entirely in your enterprise. See Encryption.
Keeping the state in your enterprise
With the conversation state hooks set, the agent server stores each conversation's state through your own code instead of the cloud. A save function receives the state, a restore function returns it for a follow-up or for the UI's conversation view, and a deleteConversation function is called when a user deletes the conversation. The state never leaves your enterprise. It is handed over in plain form, so encrypting what you store is your choice, and restore receives the user's email so that your code can check who the conversation belongs to. The cloud keeps only the conversation's entry: its encrypted title and when it was last used. Validation runs keep their state in the cloud.
Retention
A conversation is deleted after 7 days without use, counted from the last time an agent ran in the conversation or the conversation was read, whichever is later. The paid service has no such limit. A user can pin a conversation to keep it, and can delete a conversation at any time. When the state is kept in your enterprise, that retention still removes the conversation from the list. The stored state itself is deleted by your deleteConversation function when the user deletes the conversation; expiring anything else is your decision.

