Brains vs Hands: How to Run AI Agents Safely in Production — Viren Baraiya

Viren Baraiya emphasizes the importance of separating AI agents’ non-deterministic planning (“brain”) from deterministic execution workflows (“hands”) to ensure safe, reliable operation in production environments. He showcases this approach through an AI-driven SRE agent using the Conductor workflow engine, highlighting how combining flexible LLM-based planning with robust, stateful harnesses enables scalable, maintainable, and safe AI applications.

In this talk, Viren Baraiya discusses the challenges and best practices for running AI agents safely in production environments. He begins by highlighting the growing adoption of AI agents beyond simple chatbot applications, emphasizing their use in diverse scenarios such as background workers, event-driven agents, long-running coordinators, and multi-agent systems. Baraiya stresses that agents in production should be viewed more like full applications rather than isolated components, drawing a parallel to microservices architecture where multiple specialized services collaborate to achieve business goals.

A key concept introduced is the distinction between the “brain” and the “hands” of an AI system. The “brain” refers to the non-deterministic reasoning capabilities provided by large language models (LLMs), which are responsible for planning and deciding what should happen next. The “hands,” on the other hand, are deterministic harnesses that execute these plans reliably and safely. This separation ensures that critical operations, such as restarting a Kubernetes cluster or processing payments, are handled with predictable, repeatable workflows rather than left to the unpredictability of AI-generated decisions.

Baraiya explains that these harnesses operate as long-running processes that maintain state, track completed work, and manage side effects. They combine deterministic workflows with the flexible planning of LLMs, enabling systems to recover from failures and maintain durability—a fundamental requirement for production systems. He likens these harnesses to “late bound sagas,” where workflows are dynamically constructed at runtime based on the agent’s plans, providing visibility, control, and adaptability that traditional static workflows lack.

To illustrate these concepts, Baraiya presents a demo of an AI-driven service reliability (SRE) agent that autonomously diagnoses issues, plans remediation steps, and executes them through a deterministic workflow engine called Conductor. The agent plans multiple steps ahead, gathers evidence, analyzes logs, and decides on actions like rolling back deployments, all while the harness ensures safe and consistent execution. This approach allows the system to run continuously, respond to events, and adapt its plans based on real-time feedback, demonstrating how AI agents can be effectively integrated into complex production environments.

In conclusion, Baraiya encourages the audience to adopt this brain-and-hands model for building AI agents in production, leveraging deterministic harnesses to manage execution while using LLMs for planning. He introduces Conductor, an open-source workflow orchestration platform designed to support such agentic systems, and invites practitioners to explore its capabilities for running various AI agents safely and reliably. The talk underscores the importance of combining AI’s flexibility with robust engineering practices to achieve safe, scalable, and maintainable AI-driven applications.

Useful Links