AI agent architecture patterns that survive production