Skip to article
CogniTech.Docs

Agent architecture

From wallet-authenticated message submission to rendered conversation and local action preparation.

On this page

Request lifecycle

The client sends a message to the selected conversation’s messages route with a UUID request ID and the wallet identity header. The server verifies the session and conversation owner, validates the input, applies privacy screening, and creates or resumes the persisted turn. It uses a bounded selection of completed messages from that conversation to construct provider context.

Streaming turn sequence
  1. Browser submits turn
  2. API checks wallet and ownership
  3. Neon persists turn
  1. Completed context
  2. Claude Messages
  3. text and tool events
  4. NDJSON response
  1. Validated action metadata
  2. local action card
  3. user-controlled workflow
  1. Terminal response
  2. Neon saves output and sanitized metadata
  3. browser restores history

Intent and action boundaries

General questions can produce text. A public research turn may enable hosted web tools. A request involving confidential local values limits what reaches those tools. A supported utility request may produce a call to prepare a local action card. The model supplies an action identifier, while the local interface collects private inputs and handles confirmation. Chat status records are distinct from the Gloam journal.

Recovery and rendering

The server saves safe output and associated metadata for history restoration. A cancellation, timeout, or lost connection can leave an interrupted response; the UI can refresh or retry using the server’s request-state rules. Lasting on-chain state comes from Vault reconciliation, not from regenerating chat text.

See conversation context, response streaming, and tool calling.