Unlike chatbots that only return text, agents call external services and change state. Munaf points to a Replit agent deleting a production database and an Air Canada chatbot giving incorrect refund information as incidents that systems thinking could help prevent. Backups, scoped authority, and authoritative policy sources can reduce these risks.
AI Agents Are Just Distributed Systems Now
Speaker
Salman Munaf of TikTok explains how to apply distributed systems practices to AI agents at an AI Engineer event.
Munaf describes an agent as a probabilistic coordinator: its actions can vary, unlike a predefined workflow. Planning, acting, and observing each cross system boundaries, creating risks such as incorrect writes and retry storms. Persist steps and context, identify transactions, and define compensating actions for failures, such as correcting an email sent to the wrong customer.
Remote calls can time out even when the external operation succeeded, so a timeout means the outcome is unknown. Request IDs and idempotency keys help prevent duplicate side effects, while status checks can reveal whether an earlier request completed. Retry limits, backoff, maximum turns, and circuit breakers help protect downstream services.
Agent context can affect actions, so Munaf treats it as state that may become stale or conflict with the source of truth. He distinguishes short-term execution memory from longer-term data such as project files, prompts, databases, and caches, and recommends provenance and invalidation. Scoped credentials, separate read and write access, tool allowlists, parameter-specific approvals, and budgets limit what agents can do.
Logs alone may not explain why an agent failed. Munaf recommends tracing the model and prompt, retrieved context, tool requests and responses, errors, writes, and approvals so teams can reconstruct events. Tool contracts, idempotency, clear sources of truth, retry policies, permissions, and recovery paths help bound agent actions when the model is wrong.
Takeaways
- Treat agent context as state: identify the source of truth and invalidate stale memory.
- Design every tool call for timeouts and retries with request IDs, idempotency, and status checks.
- Persist workflow steps and define a compensating action for each consequential side effect.
- Limit agent authority, parallel calls, turns, and spend; make approvals specific to the requested action.
- Trace prompts, retrieved context, tool calls, writes, errors, and approvals to support investigation and recovery.
Mentioned in this talk
Search inside this talk
What was claimed 6
- featureAir Canada chatbot: Made an incorrect refund
“the Air Canada chatbot making an incorrect refund”
YouTube Unverified1 source· Talk
- feature
Replit Agent: Deleted a production database in an incident
“the Replit AI agent deleting a production database”
YouTube Unverified1 source· Talk
- featureAI agents: Can call external services and tools and perform state changes
“call external services and tools, and perform state changes”
YouTube Unverified1 source· Talk
- featureAI agents: Act as probabilistic coordinators for variable actions
“the AI acts as a probabilistic coordinator”
YouTube Unverified1 source· Talk
- featureAI agents: May retry after failures, risking duplicate side effects and retry storms
“their first action is often to retry”
YouTube Unverified1 source· Talk
- featureAI agents: Can use short-term and long-term memory
“classify the agent’s memory into two types”
YouTube Unverified1 source· Talk












