## 1 Introduction
### Motivation  
A principled approach to integrate agents and the blockchain is needed from both conceptual and technological perspectives. At the conceptual level, current efforts are mostly tailored to a particular application domain or even a specific goal, and they lack a more systematic analysis of all the opportunities and aspects involved in a principled integration of blockchain and agent-oriented models and technologies--such as the on-chain vs. off-chain aspect, the relationship with smart contracts, and the computation vs. interaction dimension already discussed. Indeed, as already mentioned, no effort seems to consider the possibility of adopting agent-orientation as the computational model for smart contracts [7]. At the technological level, a careful analysis of expressiveness of current blockchain technologies (there including smart contracts) with respect to their ability of fully supporting the agent abstraction is currently lacking in the literature, apart from our preliminary attempts [15], as well as an analysis of the benefits that transferring blockchain concepts to the agent realm may bring along. As a paradigmatic example, pro-activeness and execution of time-triggered activities, which are common traits of agents defining their autonomy to take action spontaneously, are technical capabilities difficult or impossible to obtain with state-of-the-art blockchain implementations [16]. Autonomy-related issues can easily be seen when mainstream blockchains--say Ethereum ([[https://ethereum.org](https://ethereum.org)]([https://ethereum.org](https://ethereum.org))) or HyperLedger Fabric (HLF) ([[https://www.hyperledger.org/projects/fabric](https://www.hyperledger.org/projects/fabric)]([https://www.hyperledger.org/projects/fabric](https://www.hyperledger.org/projects/fabric)))--are exploited to support the supply chain of products, a common scenario for blockchain-based IoT applications [17]. In fact, one of the most natural applications of BCT is to track the movements of goods amongst the many actors involved in transportation from the manufacturing facility to retail stores. Consider for instance the case of a manufacturing company willing to sell its products overseas. To make this possible, an articulated supply chain is in place involving, e.g., a shipping company, a distribution company, and a retail store. In such a scenario, the manufacturing company may leverage smart contracts to _(i)_ track the movements of its products along the supply chain and _(ii)_ receive automatic refunding in case some of its partner companies fail in dispatching the products on time. In particular, one smart contract is instantiated for each step of the supply chain. Focusing on the case of the shipping company, a smart contract may be programmed to _(i)_ keep track of the shipping status of the products, and _(ii)_ automatically refund the manufacturing company if the products reach the distribution company later than an agreed-upon amount of time since shipment. This is exactly what is represented in Figure 1, where the interaction of a _Shipment SC_ with off-chain entities is described through UML. Essentially, the diagrams represent one possible design of this scenario on top of an Ethereum or HLF smart contract. Upon shipment, an off-chain entity representing the _Manufacturer_ invokes a method ship(...) on the _Shipment SC_, notifying the handover of the product. Accordingly, the SC registers the beginning time of the shipment. Whenever the product actually reaches the _Distributor_, the latter--which is again an off-chain entity--certifies the successful dispatch of the product by invoking the method dispatched(...) on the _Shipment SC_. By reacting to such method invocation, the SC decides if a refund is to be performed or not, depending on whether the total time required for the shipment is greater than a given threshold (\(\Delta T\)) or not. This scenario highlights, for instance, the expressiveness limitations of mainstream SC w.r.t. pro-activeness and, hence, autonomy, a definitory trait of agendhood.