Skip to content

Conversation

A conversation is a streaming chat with Sadie. It is grounded, not blank. Every response loads your Soul summary, the attached context chips, and the recent message history before generating.

A conversation container holds a title, a short summary, Sadie’s current emotion, a pinned flag, and an archived timestamp. Messages inside carry a role (user, assistant, system), a streaming status, and metadata including the emotion Sadie expressed when the message was generated.

Context chips are things you attach to a conversation to ground it. They are removable and visible, never hidden. The kinds:

  • wiki for a wiki entry
  • source for a raw source in your library
  • brief for a recent brief
  • graph_entity for a node in the knowledge graph
  • discourse for a Today card

Attach a chip before you ask, and Sadie reads it in context. Remove it to drop the grounding. Each chip has a label and optional snippet for display.

Responses arrive token by token. A single POST request streams NDJSON events back, and the client renders as tokens arrive. The same endpoint supports an auto-continue mode used by the SadieDock, where the dock pre-creates a conversation and redirects you into it so the response is already streaming when you land.

POST /api/chat -> { "type": "token", "value": "..." }
{ "type": "token", "value": "..." }
{ "type": "emotion", "value": "reflective" }
{ "type": "done" }

Sadie’s tone shifts response by response across seven emotional states: curious, encouraging, focused, playful, serious, reflective, and celebrating. The current emotion is selected per response from the content of your prompt, persisted on the message, and rendered through the avatar sigil. See Emotional states for the full register map.

Before the stream starts, your chat-scoped policies are injected into the system prompt as a guardrail block so the model knows the rules up front. After the stream, the full message is linted again. Rewrite policies apply substitutions. Block policies replace the message with a short note identifying the rule and switch Sadie’s emotion to serious. Warn policies are recorded silently.

The prompt-injection step matters. Without it, a block policy would always fire after a message was already produced, which is wasteful and cannot un-say what the model has said. Telling the model the rules in advance reduces both problems.