Architecture
How RecoX is built, from the governed tool gateway and tenant isolation to durable workflows, data classification, storage roles and the model connection.
RecoX is a layered platform with one rule at its centre: every request, from a console click to an outside agent's tool call, passes through the same governed tool gateway and the same tool definitions. Identity, roles, data classification, approval policies and audit are therefore enforced in one place, not re-implemented per entry point. This page describes the layers, how companies are isolated, how durable workflows survive failures, what each datastore does and how models are used.
Layers
Imagine a user in Slack and another in the console asking about the same invoice. Their permitted access should depend on their identity and role, not the interface they happen to use. The architecture explains why the gateway enforces that boundary consistently.
| Layer | Responsibility | Status |
|---|---|---|
| Entry points | Carry a person or a machine credential into RecoX (Console, Slack, MCP clients). They hold no business logic. | Live feature |
| Governed tool gateway | Authenticates, resolves caller role and grants, applies column data classifications, evaluates policy, creates decisions, executes tools and records the call. | Live feature |
| Recobot | The model-driven loop that chooses tools to answer a person, with Answer Reveal transparency and citation deep-linking. | Live agent |
| Entity Graph | Cross-department graph linking records (invoices, tasks, campaigns, documents, legal filings) with typed bidirectional edges. | Live feature |
| Workflows and AI steps | Durable workflows run by Temporal with retries, and bounded model calls inside fixed code. | Live workflow, Live AI step |
| Department modules | Own records and deterministic business rules for Sales, Marketing, Finance, Compliance, People, Operations, Templates and Academy. | Live feature |
| Platform | PostgreSQL with Governed Views & SQL Lineage, Temporal for durable workflows, Redis for caching, and Qdrant for semantic search. | Live feature |
One gateway for every entry point
The console, Recobot, Slack and MCP clients all call tools by name, for example bills.mark_paid. Every tool declares:
| Property | What it states |
|---|---|
| Roles | Which roles may call it |
| Side effect | Whether it changes anything, and where |
| Approval policy | Whether the call needs a person to approve |
| Retry safety | Whether repeating the call after a failure is safe |
| Sensitivity | Whether it touches personal, pay or message data |
| Read-back | How the result is verified after a write |
Because the definitions are shared, a Slack mention, a Claude session over MCP and a button in the console follow identical checks. An MCP client with a narrow grant sees a short tool list. A write from any entry point that needs approval returns pending_approval and creates the same decision.
Tool-call result envelope
Every tool call returns the same versioned envelope. This is a write that needs approval:
{
"status": "pending_approval",
"data": null,
"evidence": [
{ "type": "finance.bills", "id": "bill_123" },
{ "type": "finance.bank_lines", "id": "bl_881" }
],
"effect": null,
"proposal": {
"id": "dec_4f2a91",
"title": "Mark Northwind bill as paid",
"severity": "moderate",
"approver_role": "finance_lead",
"expires_at": "2026-11-08T09:30:00Z",
"fingerprint": "sha256:9c1e7b"
},
"next_actions": ["Ask Priya Sharma to approve decision dec_4f2a91"],
"retryable": false,
"invocation_id": "inv_77b3",
"run_id": "run_2d90"
}Prop
Type
Errors use a separate structured error packet:
{
"error": {
"code": "forbidden",
"message": "Role operator cannot call payroll.run",
"retryable": false
}
}Tenancy and isolation
Each organisation is a tenant with its own database, files, credentials and jobs. Queries are bound to the caller's company at the gateway, so one company's records and documents never appear in another company's results.
Inside a company, isolation is by role. Access is scoped to the company, a department or the person's reports, can be time-bound, and sensitive permissions (people.pii.read, pay.read, messages.read) mask fields. Employees see their own records. See Roles and access.
Durable workflows
Status: Live workflow. Routines, invoice import and annual accounts run as Temporal workflows. A workflow is a sequence of steps, and each step is durable.
- Retried. A transient failure in an integration retries without losing the run.
- Resumes after a restart. If a worker restarts mid-run, the workflow continues from the last completed step.
- Waits and resumes. A workflow can wait for a person or an event and continue afterwards.
- Visible. Routines show health and a run timeline. See Routines.
No model decides the steps of a workflow. Where a workflow includes an AI step, the model makes one bounded call and fixed code does the rest.
What each datastore does
| Store | Role |
|---|---|
| PostgreSQL | System of record for companies, people, roles, decisions and every module's records. |
| Temporal | Durable execution of workflows and routines. |
| Redis | Cache. Exact-text results are cached for 24 hours and embeddings for 28 days. Records, access decisions and approvals are never cached. |
| Qdrant | Vector search over documents and knowledge, kept separate per company. |
Models
Recobot uses two model stages.
A fast router model, DeepSeek V4 Flash, picks the workflow. The answer comes from the company's default model connection: GPT-6 Luna through a ChatGPT or Codex plan, or Claude through an Anthropic API key. In each chat the person can choose the model, the reasoning effort and fast mode. There is no automatic fallback to another provider. A spend guard sits on model calls, and provider prompt reuse lowers the cost of repeated context. See Caching and cost.
The Outside AI setting is Off or one provider. With it Off, RecoX uses templates for drafts and summaries and nothing leaves the company.
Planned
Automatic fallback between model providers is on the roadmap.
How MCP and Slack enter
| Entry | Identity | Behaviour |
|---|---|---|
| MCP | A stdio launcher, or a governed HTTP gateway where a machine credential is exchanged for a short-lived run token | Reads run directly. Consequential calls return a pending proposal. |
| Slack | The Slack user, mapped to a RecoX person | Recobot runs as that person. Decisions arrive as DMs with signed buttons. |
| Console | Signed-in person | Recobot panel and pages call tools directly. |
An outside agent can propose but cannot approve. External MCP servers can also be registered in RecoX, and each of their tools stays off until an admin allows it. See MCP.
Audit trail
Decisions, tool calls, record changes, access changes and connection changes are recorded. A decision records the outcome, who decided and the channel. Access changes can be exported as CSV from the Access page. See Outputs and audit and Audit log.
Failure behaviour
| Failure | Behaviour |
|---|---|
| Model connection error | The run stops with an error. There is no automatic switch to another provider. |
| Integration error | A workflow retries. A tool that is not safe to repeat returns a failure and waits for a person. |
| Worker restart | The workflow resumes from the last completed step. |
| Record changed before apply | The decision does not apply a different change. |
| Read-back differs | The decision is marked failed. |
| Spend guard | The guard stops further model calls. |
How is this page?
Last updated on