What is a space (agent workspace)?
The isolated container holding one customer's conversations, documents and memory — enforced at the database level, so one customer's material cannot surface in another's conversation.
A space is the unit of privacy. Every end customer gets one, and everything about that relationship — what they asked, what they uploaded, what the agent remembers — lives inside it.
Why it is not just a filter
The tempting way to build multi-customer AI is to keep everything in one pile and add a customer id to each query. It works until one query is written without the filter, and then it fails silently and in the worst possible direction: someone reads someone else's documents.
Isolation belongs one layer down, in the database, so that a query missing its scope returns nothing rather than everything.
How it is enforced here
Isolation is not a WHERE customer_id = ? that every query has to remember. In agent4.io a
customer's conversations, uploaded documents and memory are keyed to their space and enforced by
row-level security in the database, so a query that arrives without its scope returns nothing rather
than everything. The document bodies are additionally encrypted with a key belonging to that
customer.
This is the same boundary the customer knowledge base sits behind — which is why customers can be invited to upload passports, payslips and refusal histories without that becoming a problem you now own.
What this buys a business
Per-customer memory that is safe to keep. An agent can remember that this client prefers WhatsApp after six, that their case involves a spouse, that they already sent the bank statements — precisely because that memory cannot leak into a conversation with someone else.
A defensible answer to the security question. "How do you keep our clients' files apart" is the question every serious buyer asks, and "we filter by customer id" is not a comfortable answer.
Somewhere for sensitive material to go. Passports, refusal histories, financials — these arrive whether or not you designed for them.