# Your company brain will leak secrets: how we stopped it for big banks — Tanmai Gopal, PromptQL

## Executive summary

The talk addresses the critical security challenge of 'Company Brains'—shared knowledge systems that risk leaking sensitive corporate secrets. The speaker proposes a secure architectural model centered on using a single companywide wiki (linked markdown files) for context storage. Key security measures include scoping read/write access per file, preventing agents from auto-writing memory, and ensuring every change is attributed to a human owner. For multi-user operations, credentials must be injected at the HTTP and SQL layers rather than stored in a sandbox.

## Key takeaways

- Healthy Company Brain Growth: A healthy company brain should show a continuously increasing trend in daily updates, indicating that users are not only consuming knowledge but also teaching the system new skills (e.g., querying data $\rightarrow$ interpreting results $\rightarrow$ taking action).
- Secure Knowledge Contribution Model: To prevent leakage, context must be stored in a single shared wiki (linked markdown files), and the agent should only *suggest* changes with defined scopes; a human user must accept or reject the change to assign ownership.
- Multi-User Security Architecture: For collaborative tasks (e.g., incident management), credentials should never be stored in a sandbox. Instead, they must be injected per user at the HTTP and SQL layers to allow the AI agent to behave as the authenticated human.

## Technical details

- Company Brain Definition: A company brain is defined as shared context stored in a set of markdown files, coupled with granular access control rules for the data and tools available to a coding agent. It focuses on enabling agents to solve general-purpose problems, not just pulling knowledge into an LLM.
- Data Storage Model: The recommended model is a single companywide wiki using linked markdown files. This structure allows for granular scoping of read/write access per file, mitigating the risk of siloed data.
- Security Principles (Rules): 1) All context must reside in one companywide wiki. 2) Every change must be backed by a human's name/ownership to ensure accountability and traceability.
- Credential Handling: To maintain security during shared AI use, credentials must be injected at the HTTP layer and the SQL layer, rather than being stored in a sandbox environment.

## Practical implications

- Adopt a 'grow' approach for the company brain rather than attempting to build it all at once; encourage every employee to own and contribute their part of the knowledge base.
- Implement strict access controls (scopes) on individual wiki pages/files, ensuring that data sensitivity dictates who can read or write.
- When designing multi-user AI workflows, prioritize injecting user credentials into execution layers (HTTP/SQL) over relying on persistent agent memory.

## Topics

Company Brain Architecture, Data Security and Leakage Prevention, GraphQL Engines, AI Agent Development, Knowledge Graph Modeling, PromptQL, Hasura GraphQL engine

Source: https://www.youtube.com/watch?v=0uC6u0lJJl4
