Security architecture
Security for AI agents lives in the system, not in the prompt.
AI in industry is a systems problem. Connecting a model is easy. The hard part is everything around it: whom an agent acts for, what it may see, what may leave your company and where your data lives. demi settles this in the architecture, outside the model. Here is how, with the sources.
01 · OVERVIEW
At a glance
The essentials in six sentences. The sections below show how demi puts them into practice.
Never more than the person
An agent always acts for one specific person and may never do more than they may.
The system checks rights
Whether an access is allowed is decided by the platform outside the model, on every read and every action.
Outbound only with a click
Once an agent has read content that may carry instructions from third parties, every send, publish or share outside needs a person's click.
Separated in the database
The database itself keeps the companies' data apart, and the application cannot bypass that separation.
Data in the EU
Your data lives in data centres in the EU, with Germany as the primary site.
Every call in the log
Every function call an agent makes is in the log, with person, agent and time, refused ones included.
02 · DELEGATION
An agent may never do more than the person it works for
The risk
A service with broad rights can do what its principal could not
An agent works on behalf of a person, often across several systems and minutes or hours after the request. If it runs under a service account that may do everything, any request can reach more than the person could.
What research shows
Computer science has known this pattern since 1988 as the “confused deputy”: a program acts with authority it was given for a different purpose [1]. The authorisation rules of the Model Context Protocol (MCP), through which AI clients call functions of other systems, name exactly this attack [2]. That permissions must never widen when they are passed on is a known design principle [3].
What demi does
The token names the person, never a service
Fig. 1 · From the person to the function
From the person through the agent to the function: no step gets more rights than the one before.
01 Person
Signs in
Their rights are the upper limit for everything that follows.
02 Agent
Works for them
With its own short-lived tokens for this task, issued to the person.
03 Check
Outside the model
Every call is checked against the person's rights.
04 Function
Acts for the person
Never under a service account. Every call is in the log.
The person's rights are the upper limit for every step
- The person, not the service. Every call an agent makes names the person it works for. No service puts its own identity in their place.
- Own tokens for every task. Every task runs with its own signed tokens: short-lived, valid only within demi and issued to the person.
- Passing work on never means more. When an agent hands work on, the next step gets at most the same rights and never a longer lifetime, and it always works for the same person.
- No self-approval. When an action needs a confirmation, the agent cannot give it itself.
- Revocation holds during outages. A revoked token is rejected even when part of the platform fails.
03 · RIGHTS
The model does not decide on rights
The risk
Everything in the prompt is a request, not a permission
A language model can be talked into things. Whether a person may see a document or trigger an action must therefore be decided by a check outside the model, when reading as much as when acting. Otherwise a search answers questions from documents the person asking was never allowed to see.
What research shows
AI answers that rely on retrieved documents read from an external search index [4]. If that index does not know the rights, it passes on whatever it finds. How to check rights as relationships between people, groups and objects quickly and consistently is well researched [5].
What demi does
Every check outside the model, when reading and when acting
- Rights as relationships. demi keeps rights as relationships between people, groups and objects (ReBAC) and checks them on the server, outside the model.
- When reading. What a person may not see does not come back, not through an agent either.
- When acting. Every action is checked too, before it runs.
- Every document check also checks the company. A check on a document makes sure of two things: that the person may access it and that it lies within their own company.
04 · MCP
AI clients via MCP: never more than the person may
The risk
Every connected AI client is one more way into your data
Through the Model Context Protocol (MCP), an open standard, AI clients such as chat assistants or agents call functions of other systems: read data, create documents, start tasks. Such access needs the same limits as the person the AI client works for.
What research shows
The MCP specification itself states that such functions can run arbitrary code and need explicit consent [6].
What demi does
Every call checked, every function with a confirmation level
- Through the programming interface. Every function for AI clients goes through the platform's programming interface, with the same checks as the application.
- Every call checked. Every function call is checked outside the model against the person's rights.
- Confirmation by level. A confirmation level sets for every function whether a person must confirm it before it runs. Where no level is set, the strictest applies.
- Sign-in via OAuth 2.1. External AI clients sign in via OAuth 2.1; redirects go only to addresses demi has approved in advance.
05 · INJECTION
What a prompt injection can trigger, demi limits outside the model
The risk
Anything an agent reads can be an instruction
In a prompt injection, instructions hidden in an email, a document or a web page try to make an AI model do something other than what the person wanted. No filter catches them reliably. What matters is what such an instruction can trigger at all.
What research shows
Attackers need no access to the model: in experiments, instructions placed in data made models leak data and steer calls of real systems [7]. Twelve recent defences did not hold against adaptive attackers; against most of them, over 90% of attacks succeeded [8]. Designs with provable security exist, but they limit what an agent can do [9] [10]. Germany's BSI describes the risks of AI agents [11], and OWASP lists them in its Top 10 for agentic applications [12].
What demi does
A person's click the model cannot forge
- The system marks, not the model. When an agent reads content that may carry instructions from third parties, the system marks that task.
- Outbound only with a click. From then on, every send, publish or share outside needs a person's click: once, for exactly that action. The model cannot forge this click.
- Output is not a right. What the model outputs gives it no rights: every call it triggers is checked like any other request.
- No shell, no file system. The agent has neither a command line nor a file system.
- Checked automatically. Automated tests check these locks whenever the code behind them changes.
06 · TENANTS
Tenant isolation the database itself enforces
The risk
Separation must be a property of the system, not the discipline of every query
When many companies work on one platform as separate tenants, a single forgotten condition in the code must not show anyone else's data.
What research shows
Databases can protect rows for this (row-level security): the database returns only the rows a policy allows [13]. It only works if the application cannot bypass that policy.
What demi does
The database separates, the application cannot evade it
- Separated in the database. The database itself keeps the companies' data apart (row-level security). Every access to company data runs in the context of exactly one company.
- The application cannot evade it. The application connects with a role that cannot bypass this separation. It checks this at every start; if it cannot check, that counts as an error.
07 · ENCRYPTION
Encrypted, backed up, recoverable
The risk
Protection must hold in transit, at rest and in every backup
Data can be attacked in three places: in transit between systems, where it is stored, and in its backups. And a backup is only worth as much as its restore.
What demi does
Encrypted connections, encrypted storage, separate backups
- In transit. Connections from the internet use only TLS 1.2 or newer; the path to database and cache is encrypted as well.
- At rest. Disks and object storage are encrypted with AES-256.
- Access to your systems. demi stores credentials for connected systems with an additional layer of encryption, using a key of its own.
- Backups. Database backups run at least daily, are encrypted before they are stored and are kept in a separate location; their keys are kept outside the operating environment. The restore is documented and practised.
08 · EUROPE
Data and models in Europe
The risk
The platform decides where processing happens, not the model provider
Leading AI models come from a handful of providers. Where your data lives and where a model processes it must therefore be set by the platform, not by each model vendor.
What demi does
Data centres in the EU, agents on models in the EU, every provider named
- Data in the EU. Your data lives in data centres in the EU, with Germany as the primary site; database backups are kept apart in a second data centre in the EU.
- Agents on models in the EU. Agents and image generation work with models in EU data centres; other regions only with your company's approval.
- Every provider named. The sub-processor list names every provider with its location. You can object to material changes (DPA § 9).
- Models are replaceable. Models can be swapped without anything changing on your side.
09 · OPERATIONS
Operations your IT can trace
The risk
An agent works for a long time, and every step must be on record
An agent works through many steps, must survive restarts and must be able to wait for answers from people. And your IT must be able to see afterwards who triggered what.
What demi does
Step by step, logged, monitored
- Step by step. Agents work step by step and survive restarts. When an agent asks a question, it pauses and, after the answer, continues where it stopped.
- Cost budget per task. Every task has a cost budget. When a request is cancelled, the running model call stops as well instead of running up costs in the background.
- Log. Every function call an agent makes is in the log, with person, agent and time, refused ones included. On justified request you receive an extract for your company.
- During operation. demi rolls out new versions while the platform keeps running.
- One code base, switches per company. All companies run on the same code; demi switches new capabilities on per company.
- Checked and traceable. Tests and security checks run automatically on every change; which version runs live is versioned and traceable.
- Monitored. Operations are monitored automatically, also from outside the operating environment; alerts go to the operations team automatically.
Literature
Literature
All sources checked on 10 November 2026. Every number in the text leads to the original source.
- [1]Norm Hardy (1988). The Confused Deputy (or why capabilities might have been invented). ACM SIGOPS Operating Systems Review 22(4), 36-38. doi:10.1145/54289.871709
- [2]Model Context Protocol project (2026). Authorization (Model Context Protocol Specification, version 2026-07-28). modelcontextprotocol.io. https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization
- [3]Arnar Birgisson, Joe Gibbs Politz, Ulfar Erlingsson et al. (2014). Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud. NDSS 2014. https://www.ndss-symposium.org/ndss2014/ndss-2014-programme/macaroons-cookies-contextual-caveats-decentralized-authorization-cloud/
- [4]Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. NeurIPS 2020 (per the arXiv record), arXiv:2005.11401. https://arxiv.org/abs/2005.11401
- [5]Ruoming Pang, Ramon Caceres, Mike Burrows, Zhifeng Chen, Pratik Dave et al. (2019). Zanzibar: Google's Consistent, Global Authorization System. USENIX ATC 2019. https://www.usenix.org/conference/atc19/presentation/pang
- [6]Model Context Protocol project (2026). Model Context Protocol Specification, version 2026-07-28. modelcontextprotocol.io (latest version when read on 2026-11-10). https://modelcontextprotocol.io/specification/2026-07-28
- [7]Kai Greshake, Sahar Abdelnabi, Shailesh Mishra et al. (2023). Not What You've Signed Up For: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection. AISec 2023 (16th ACM Workshop on Artificial Intelligence and Security), 79-90. doi:10.1145/3605764.3623985
- [8]Milad Nasr, Nicholas Carlini, Chawin Sitawarin, Sander V. Schulhoff, Jamie Hayes et al. (2025). The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against Llm Jailbreaks and Prompt Injections. arXiv:2510.09023. https://arxiv.org/abs/2510.09023
- [9]Edoardo Debenedetti, Ilia Shumailov, Tianqi Fan et al. (2025). Defeating Prompt Injections by Design. arXiv:2503.18813. https://arxiv.org/abs/2503.18813
- [10]Luca Beurer-Kellner, Beat Buesser, Ana-Maria Creţu, Edoardo Debenedetti, Daniel Dobos et al. (2025). Design Patterns for Securing LLM Agents against Prompt Injections. arXiv:2506.08837. https://arxiv.org/abs/2506.08837
- [11]Bundesamt für Sicherheit in der Informationstechnik (BSI) (living document (read 2026-11-10)). KI-Agenten: Wenn Künstliche Intelligenz selbstständig handelt. bsi.bund.de. bsi.bund.de › KI-Agenten
- [12]OWASP GenAI Security Project (2025). OWASP Top 10 for Agentic Applications for 2026. genai.owasp.org, December 2025. https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/
- [13]The PostgreSQL Global Development Group (living document (read 2026-11-10)). Row Security Policies (PostgreSQL Documentation, section 5.9). postgresql.org. https://www.postgresql.org/docs/current/ddl-rowsecurity.html
Talk to us about your case
demi is the AI operating system for industry. In the demo we show you and your IT how it works with your rights. The documents for your review are in the Trust Center.
