> ## Documentation Index
> Fetch the complete documentation index at: https://docs.amoreg.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How it works

> How the workspace, server and agent fit together during a conversation.

## The pieces

* **Workspace** (`platform.amoreg.com`): the web client you use. It talks
  to the Amoreg server over a live connection, authenticated by your session
  cookie.
* **Server**: owns your sessions and conversations, signs you in, sends
  every chat turn to the agent and keeps conversations in sync with your
  organization's data.
* **Agent**: the compliance agent, with organization- and
  jurisdiction-scoped hybrid retrieval, web search, subagents and skills.
  Turns are durable, so a long answer survives a reconnect.
* **Domain API**: serves organization-scoped platform data such as policies,
  findings and frameworks to the workspace. It is internal to the workspace
  and is not offered for customer integrations; for programmatic access use
  the [developer API](/#the-developer-api).

## Organization scoping

Every database query and every retrieval is scoped to the organization you
are acting in. Access requires membership of that organization, or an Amoreg
platform-administrator grant, and is checked server-side. Your organization's
jurisdictions are read from its configuration, never assumed.

## A turn, end to end

1. The workspace sends your message to the server.
2. The server opens or continues an agent session for the conversation,
   bound to your organization and acting as you; the agent checks again that
   you have access to that organization.
3. The agent retrieves from your organization's library (your organization's
   own material plus your jurisdictions), runs the model, and streams events
   back: text, tool calls, plans and questions for you.
4. The server turns those events into the conversation you see and saves
   the messages to your organization's records.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.