AI Engineer

AI Agents Are Just Distributed Systems Now — Salman Munaf, TikTok

Published 2026-08-29 · Duration 19:48

Summary

The core argument is that AI agents, once they interact with external services (tools/APIs), cease being purely model problems and become complex distributed systems challenges. Building reliable agents requires incorporating robust distributed systems thinking—focusing on failure modes, state management, transactionality, and security controls—rather than just improving the LLM itself.

Download summary

Key takeaways

  1. AI Agents as Probabilistic Coordinators 5:46

    Unlike traditional deterministic workflows that follow a predefined decision tree, AI agents act as probabilistic coordinators. This variability necessitates strong external controls (e.g., circuit breakers, spending ceilings) to ensure determinism and prevent severe consequences.

  2. Handling Failure: Timeout vs. Failure 11:59

    A timeout does not mean failure; it means unknown. To prevent unsafe side effects (like double refunds), agents must utilize request IDs and idempotency keys, allowing for status lookups to confirm if an action already succeeded.

  3. State Management and Context 17:37

    Context that influences an action is state. This state can become stale or conflict with the authoritative source of truth, requiring explicit invalidation and provenance tracking, much like managing a cache.

  4. Security and Control Boundaries

    Agents must operate with scoped credentials (separate read/write permissions) and limited tool access. Furthermore, human approval should be bound to specific actions, actors, and expiry times, not blanket privileges.

Technical details

  • Agent Loop Architecture 457s

    A typical agent loop involves Planning $\rightarrow$ Action (calling external APIs/tools) $\rightarrow$ Observation. Each step crosses a boundary, requiring persistence of every action and context retrieval for failure recovery.

  • Transactionality and Compensation

    Due to multi-step actions crossing system boundaries, explicit transactions must be identified. If an irreversible or unsafe operation fails (e.g., sending a wrong email), a compensating action must be defined to reverse the effect.

  • Reliability Patterns

    To prevent cascading failures and resource exhaustion, agents require deterministic controls: circuit breakers (to isolate unhealthy dependencies), rate limits, max turns/parallelism budgets, and exponential backoff.

  • Observability Requirements

    Standard logs are insufficient. Observability requires tracing the model called, the prompt given, all tool calls made, the responses received, errors encountered, and the context/approvals used to determine failure root cause.

Channel & topics

Watch on YouTube · Back to latest

This independent, AI-assisted summary is provided for commentary and informational purposes. It may contain errors or omit important context. Please watch the original video for the creator's complete presentation. Video, thumbnail, and related copyrights belong to their respective owners.