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

# Components

> What each part of the Casa Conect platform is responsible for: the agent runtime, background jobs, the editor, the document engine, search, storage, email, integrations, billing, the API and observability.

Each component has one responsibility and a narrow public surface. This page says what each one does and the rules it enforces. It deliberately leaves out operational detail such as limits, schedules and vendor configuration; we share those with customers on request.

## Agent runtime

The agent is **one agent**, configured for each request. The dashboard, the Word add-in, a matter and an inbound email do not each have an agent of their own; they configure the same one differently, so its behaviour and its safeguards cannot drift apart. For every turn the runtime resolves the instructions (the mode, plus organization and personal [guidance](/agent/guidance)), the model, the tools that fit the situation, and the organization's skills. Identity is stamped by the server; only the mode and the model are chosen in the interface.

Every model is wrapped before use so that each call is admitted by the billing guard and metered. No code path can call a model without it. Tools are grouped into toolsets selected per situation, which is where [containment](/security/agent-safety) happens: unattended sessions are assembled from a fixed allowlist, and the dangerous tools are simply not present. Tools that give an outside party access or act externally suspend for an approval card; where there is no way to ask, the action is refused rather than performed unattended.

Memory is keyed by organization **and** user, so a person in two organizations has two separate memories, and in conversations that others can read it is confined to that conversation. Deleting a conversation deletes its memory. See [Conversations](/agent/conversations#memory).

## Background jobs

Anything that takes longer than a web request, or must happen without anyone watching, runs as a background job on a managed job platform: agent sessions, document indexing, drive sync, workflows, reminders and maintenance. Every task has a time limit, a retry policy and a concurrency cap. Tasks whose repetition would cause harm, such as an agent turn, are never retried automatically; recovery is handled by the session's own continuation.

Agent conversations are spread across a set of queues by organization, so that one organization's burst of activity fills only its own queue. Workers reach Casa Conect's data over private links with short-lived credentials, process data in memory while a task runs, and hold nothing of record. Progress is published so the interface can show it, using tokens issued only after the API has authorized access to the underlying resource.

## Editor and collaboration

The editor is built on the open-source ProseMirror ecosystem, with three substantial pieces written in-house: **tracked changes** designed to map exactly onto Word's revision model, **page layout** with real pagination, headers and footers, and a **schema contract** enforced by tests so that a change that would break stored documents fails the build. The same library runs in the browser and headlessly on the server, which is how the agent edits documents by exactly the same rules as a person.

The collaboration server keeps everyone's copy of a document in step using a shared-editing protocol in which concurrent edits merge without conflict. It opens a document only for a short-lived token that names exactly the documents the holder may open, refuses to open a document that has no record (so edits can never land in a phantom document), and loads from the primary database so that a document created a moment ago is always found. Changes are written back continuously, and on shutdown every pending change is written before the server stops.

## Document engine

Word files are handled by an in-house engine that reads, validates, edits and writes `.docx` files directly, without Word or a generic converter. It is the most heavily tested component in the platform. Every uploaded file is validated before it is parsed: archives that escape their root or decompress to unreasonable sizes are rejected, malicious XML is refused, macro-enabled documents are refused outright, and the format is detected from content rather than extension.

The agent never rewrites a Word file wholesale. It reads a simplified view, decides on its changes, and the engine works out the smallest difference, which is then written into the file as native revision markup in a new version, or replayed through Word itself when the document is open in the add-in. A separate bridge converts between the editor's model and Word's, and returns a plain-language **report** of anything that could not be carried across exactly; a second round trip is guaranteed to produce an empty report. See [Word documents](/documents/word-documents).

PDF export and page-accurate viewing use a self-hosted rendering service inside the private network, with a curated set of metric-compatible fonts. Documents are never sent to an outside converter.

## Search

Documents are parsed, divided into passages along their own structure, and indexed both for **meaning** and for **words**, in Spanish and English. A search resolves the set of documents the caller may read **first**, then searches only within it, fuses the two kinds of result, and reranks them. The search function never decides access; it is given the authorized set by the caller that knows the user, and a filter can narrow that set but never widen it. A system-level variant used by background jobs is marked server-only and is never exposed through the API. See [Search](/documents/search).

## Storage and data

All file access goes through one storage gateway, which issues signed, single-purpose upload and download links after an authorization check, and checks each object's malware-scan verdict before serving it. The database is PostgreSQL, accessed through a typed query layer; tenancy is enforced in the query layer and reinforced by the schema itself. Migrations are applied only by the deployment pipeline. The cache is used through small, single-purpose modules rather than a general client, and locks, deduplication and rate limits use atomic operations.

Secrets that matter most are never stored in a recoverable form: share-link tokens and access codes are kept only as one-way hashes, provider tokens for connected drives are held by the identity provider's vault, and there are no passwords at all. See [Encryption](/security/encryption).

## Email

Inbound mail is received on Casa Conect's own mail infrastructure in the EU, scanned and authenticated on arrival, and handed to the API as a small **pointer** rather than the message itself. The API applies drop rules before it opens the message, removes duplicates, routes by recipient, threads by reply headers first and subject second, and only then hands the message to the agent in unattended mode. Outbound mail is signed, checked against a suppression list before every send, and marked so that loops are prevented. A single setting can disable all sending, and it is enforced inside the send function so that no caller can forget it. See [Email security](/security/email-security).

## Integrations

Folder sync is a provider-neutral adapter with implementations for Google Drive, OneDrive and SharePoint. Credentials are delegated: the identity provider hosts the consent flow and holds the tokens, and Casa Conect requests a short-lived token only when a sync runs. The sync engine is incremental and serialized, recognizes its own writes, and never overwrites a file that changed on the other side; conflicts keep both versions. See [Drive, OneDrive and SharePoint](/sources/document-management-systems).

Events from the identity and payment providers are verified by signature, capped in size before they are read, and deduplicated so that a crashed handler can be retried and a successful one is never run twice.

## Billing

The billing component answers two questions on every request: may this organization use this feature, and what did this work cost? Entitlement is checked on every metered call. Before any model is called, a guard checks the subscription, the [model policy](/models/model-policies), the credit balance, the organization's budget and the member's limit, in that order, and a refused call costs nothing. Metering is structural rather than voluntary: models are wrapped at the point where the agent is defined, and every embedding, parsing, dictation and browser call reports its units. Usage is priced from provider list prices with no margin added by Casa Conect. See [AI credits](/admin/ai-credits).

## API

Every Casa Conect application talks to a single backend through a typed interface, so that a mismatch between client and server is a compile-time error rather than a production bug. Every request passes through security headers, an origin allowlist, size limits applied before the body is read, authentication and a ladder of authorization levels before it reaches a handler. Notifications from other services are each authenticated in their own way and capped in size before being read.

<Note>
  **There is no public, customer-facing API today.** Casa Conect does not issue API keys and has no outbound webhooks. If an integration would be valuable to your office, [tell us what you need](/get-started/get-help).
</Note>

## Observability

One logging library writes structured logs everywhere, without request bodies and without token material. Only server errors are reported to error monitoring, with inputs reduced to their shape. Health checks are cheap, side-effect-free probes with short timeouts. Product analytics pass through a wrapper that strips any property that could carry content, and session replay masks all text and blocks content areas entirely. Agent runs are traced for quality evaluation in a mode that carries no prompt or response text. See [Privacy](/security/privacy).

<Note>
  This page describes our security practices at the level of a help page. We share detailed security documentation, architecture reviews and completed questionnaires with customers on request. Write to [support@casaconect.ai](mailto:support@casaconect.ai).
</Note>
