# Agent Architecture

_Modular Agent Design That Separates Thinking, Acting, and Guarding_



Z4R0 agents follow a modular blueprint designed for flexibility and reliability in on-chain execution. Instead of hardcoding behaviors into a single smart contract, each agent is assembled from discrete, plug-in components: a sensing module (to gather inputs), a logic module (to process and decide), an execution module (to perform on-chain actions), and a guard module (to impose constraints and failsafes).



These modules aren’t just theoretical abstractions — they’re contract-bound units, deployed and registered independently. This modularity allows for targeted upgrades (you can improve one part without touching the rest), strategy composability (reuse a logic module with new inputs), and fault isolation (execution won't fail just because a sensor feed breaks).



This also means that developers and advanced users can build libraries of interchangeable components — think of them like DeFi strategy Lego blocks. Instead of writing a new contract every time a market condition changes, you just swap in new modules.

\
