Why AI agents need a two-tier architecture for tool execution and secret isolation
badhiyahai · reddit · 2026-07-24
The author argues that public-facing tool-using agents should use a two-tier design: one persistent server that only handles prompts and tool planning, and a separate ephemeral machine that actually executes code. This isolates malicious prompts so a bad command only affects one user’s sandbox instead of the shared server.
The post also notes a related secret-management pattern: never store OpenAI or other API keys on the persistent server. Instead, inject them on the fly through a proxy backed by a separate vault. The author says Anthropic’s managed agents follow a similar idea, even if they don’t call it that.
More from coding & agent
- Cheaper OpenAI Agents API alternative: sandbox service undercutting E2B by 46% — airesearch12 · 2026-09-11
- His agent kill switch ran for months before he found it was wired to nothing — AnvilandCode · 2026-09-11
- Kernel's Browser Agents Can Now Pay Online Using Aliases, Never Touching Card Data — jeff_weinstein · 2026-09-11
- OpenAI opens up agent sandboxes: BYO or pick from Cloudflare, E2B, Modal, Vercel and more — threepointone · 2026-09-11
- SocialCrawl MCP lets agents search Reddit, YouTube, TikTok, X with one API key — dooddyman · 2026-09-11
- Astra builds a surprisingly polished Catan game in three.js, reusing past UI and 3D assets — FinanceYF5 · 2026-09-11