"Bring your own key" is the most underestimated feature in the agent platform space.
Every vendor ships it. Almost nobody ships it correctly. The default implementation is a text input on a settings page, a row in a settings table, and a process.env.OPENAI_API_KEY fallback that quietly takes over the moment the workspace value is empty. The customer thinks their key is in use. The vendor thinks their key is in use. Audit logs say neither.
This is the part of multi-tenant AI that goes wrong silently.
The Default Implementation Is a Liability
If you store BYOK keys as plaintext in a JSONB column, four things happen the first time something goes wrong:
- A read replica gets dumped during a debug session and the keys go with it.
- An ops engineer with
SELECTrights now has the production OpenAI keys of every customer. - A bug in the workflow editor renders
settings.openaiKeyinto a React Server Component and pushes it to the browser. - A workspace export feature accidentally serializes the key into a JSON download.



