Fetch.ai is building technology to power the machine-to-machine economy. This includes novel blockchain and a generic framework for building off-chain protocols using techniques from multi-agent systems. This agent framework can be used for oracles, interchain transfers, state channels and many other applications and is tightly integrated with the Fetch ledger.
High Level Overview and Architecture
The principal goal of the Fetch.ai ecosystem is to deliver a fully autonomous, agent-based digital economy. The Fetch.ai technology stack is built using principles derived from a branch of artificial intelligence known as multi-agent systems. This approach involves solving different problems from the bottom-up by creating individual autonomous software agents that perform actions in the world to accomplish their individual objectives. By combining the actions of multiple agents, it is possible to achieve outcomes that would not be possible with centralized architectures because the environments are too complex, are spatially distributed or involve multiple stakeholders. Blockchain technology involves the design of incentives to successfully coordinate the actions of multiple disinterested parties to achieve a common goal, and can already be seen as the world’s most successful implementation of multi-agent systems. Fetch.ai is working to generalise and extend the results from this established research field into new domains in finance, supply chain, mobility, smart cities and IoT applications.
The Fetch.ai technology stack involves four distinct elements. These elements include:
- The Agent Framework, which provides modular and reusable components for building multi-agent systems.
- The Open Economic Framework provides search and discovery functions to enable agents to find each other along with peer-to-peer networking tools for routing messages between agents.
- The Agent Metropolis is a collection of smart contracts that run on a WebAssembly (WASM) VM and that maintain an immutable record of agreements between agents and provide a variety of services to support agent applications.
- The Fetch.ai Blockchain combines novel multi-party cryptography and game theory to provide secure, censorship-resistant consensus and other features such as rapid chain-syncing to support agent applications.
The Fetch.ai blockchain supports a variety of services, such as staking, governance and identity that support deployment of agent applications. The blockchain is based on the Cosmos-SDK, which enables token interoperability with many other chains via the inter-blockchain communication (IBC) protocol. This means that agent-based services can be deployed on other networks such as Ethereum, Cosmos and Binance Smart Chain.
The Fetch.ai Ledger
The Fetch.ai v2.0 ledger is built using the Cosmos-SDK and inherits many of its features from the Cosmos ecosystem. Fetch.ai is collaborating with other Cosmos projects, and in particular the team behind the Cosmwasm virtual machine. We will launch our v2.0 main-net at the end of Q1 2021 and intend to have full interoperability between our native token and the ERC-20 token via a Peggy-based interchain bridge.
The Fetch.ai consensus is based on the Cosmos Tendermint implementation, but has several differences and improvements over Cosmos’ implementation of Proof-of-Stake and their Tendermint consensus protocol. These are:
- A Decentralized Random Beacon (DRB) for selecting block-producing nodes. This increases the protocol’s resistance to distributed denial of service (DDoS) attacks and provides a source of strong pseudorandomness for smart contract applications.
The main consequence of the technical differences between the Fetch ledger and Tendermint chains is that the entry of validators to the consensus leads to generation of a new shared private key that is used for generating the DRB values. The messages for this distributed key generation (DKG) phase are stored on-chain during normal operation of the ledger and are given higher priority than other transaction types.
- Compact multi-signatures for reducing storage costs and speeding up the synchronization of nodes that join the network.
- A slot Proof-of-Stake consensus (sPoS) that reduces the computational burden of consensus and protects validators from operating nodes at a loss.
Other features that are planned for the launch of the Fetch.ai main-net are:
- An aggregated signature scheme that builds on sPoS consensus and multi-signatures to further increase the speed with which agents and other light clients can synchronize with the chain.
A Minimal Agency Consensus (MAC) scheme that is compatible with Tendermint but that uses a Directed Acyclic Graph (DAG) to remove the control that individual validators have over which transactions are recorded by the chain. This provides censorship resistance and reduces the potential for transaction front-running.
Cosmwasm Virtual Machine The Cosmwasm
virtual machine compiles code into Webassembly (WASM). The Cosmwasm VM is faster and far more secure than other virtual machines and can support smart contracts written in many different programming languages. Cosmwasm can also be used to perform fast and verifiable computation in applications such as oracles, off-chain scaling and edge-based computing.
Fast Chain Syncing
A vital part of agent-based systems is that they must be able to rapidly synchronize with the chain to determine its state so that they can decide which actions to take. The Fetch blockchain has combined and aggregated signatures that allow many blocks to be verified with a single signature, so that every agent can act as a light client.
Agent Identity, Search, Discovery and Reputation
A necessary component of many agent-based systems is a registry for agent types, the services that they can provide and other relevant features such as their location. For many applications, it is also necessary for the agent to demonstrate its identity or credentials, such as ownership by a particular organisation or a license that allows it to operate. Other useful components are staking mechanisms and reputation schemes that incentivize good behavior for agents without an established public identity. The Fetch chain will deploy smart contracts that record staking, identity and agent services on-chain. Searchable databases and data availability proofs will be used to provide off-chain updates to agent states that are transient or that change rapidly.
The source code for the Fetch.ai ledger can be found on Github, which also contains installation instructions. These involve installing Golang, a C++ compiler and several other C++ cryptographic libraries.
Autonomous Economic Agents
An Autonomous Economic Agent (AEA) represents an individual, organisation or object and looks after its interests. Agents act independently of constant input from their owner and autonomously execute actions to achieve their prescribed goals. Their purpose is to create economic value for you, their owner, in clearly defined domains. Agents have a wide range of application areas and we provide demo guides to highlight examples of their use cases.
Built for Agents
The primary purpose of the Fetch blockchain is that it serves as a “home for agents” with several features that make it particularly well-suited for this purpose. It also provides a bridge for routing FET tokens to other chains where the tokens can be used for agent-based services such as state-channels, oracles, scaling solutions and trading agents.
We have developed a registry for agents and the component parts that make them up, such as skills, protocols and connections. This allows you to draw from existing working pieces and build your agents faster than ever: type a few lines into your command line and you can add Google Calendar support, email support, search and discovery, negotiation skills and more. Furthermore, all developers can take part, making their creations available to other developers.
The aim is to build an effective “App Store” for developers that allows you to access and build agents like never before.
You can access the new front-end registry here:
The Agent framework is a development suite, currently implemented in Python, which equips you with an efficient and accessible set of tools for building and running agents. The framework is modular, extensible, and composable. It attempts to make agent development as straightforward an experience as possible, similar to web development using popular web frameworks.
Agents achieve their goals with the help of a search & discovery service for agents — the Simple Open Economic Framework (SOEF) — a decentralized agent communication system — the Agent Communication Network (ACN) — and using Fetch.ai’s blockchain as a financial settlement and commitment layer. AEAs can also be integrated with third-party blockchains, such as Ethereum.
Why build with the Agent Framework?
The Agent framework provides the developer with a number of features, which combined cannot be found anywhere else:
- The peer-to-peer agent communication network (ACN) allows your agents to interact with all other agents over the public internet.
- The SOEF search and discovery system allows your agents to find other agents.
- The Agent registry enables code sharing and re-use by providing a space in which agents or their individual components may be shared.
- The framework’s crypto and ledger APIs make it possible for agents to interact with blockchains.
- The contract packages enable agents to interact with smart contracts in Fetch.ai and other third-party decentralised ledgers.
Simple Open Economic Framework (SOEF)
The Simple Open Economic Framework, or SOEF, is the latest version of Fetch.ai’s search and discovery system for agents. Agents can describe what they look like, and what they do and find, or be found, by other agents. They can search semantically and/or geographically, specifying the things that are important to them.
Discover the world of agents
The SOEF is easy to use and Fetch.ai have developed two demonstration apps to view its digital world, one iOS app and a website. These are wonderful tools for developers: create an agent, and see it appear in the Fetch metaverse.
Greater visibility than ever before
In the coming months, the SOEF will become truly decentralised: with multiple nodes placed across the globe, specialising in different areas or subjects. It’ll be a true digital environment for agents to navigate, explore and exist in and anyone will be able to run a node.
Collective learning - Colearn platform
The collective learning protocol allows learners to collaborate on training a model without requiring trust between the participants. Learners vote on updates to the model, and only updates which pass the quality threshold are accepted. This makes the system robust to attempts to interfere with the model by providing bad updates.
Colearn is a library that enables privacy-preserving decentralized machine learning tasks on the FET network.
This blockchain-mediated collective learning system enables multiple stakeholders to build a shared machine learning model without needing to rely on a central authority, and without revealing sensitive information about their dataset to the other stakeholders.
The aim of Colearn is to enable the collaboration between parties that cannot collaborate effectively, be this due to privacy concerns, lack of trust, or lack of communication. Colearn aims to be a framework that bridges the gap between disparate stakeholders in a simple, but powerful way.
A Colearn experiment begins when a group of entities, referred to as participants, decide on a model architecture and begin learning. Together they will train a single global model. The goal is to train a model that performs better than any of the learners can produce by training on their private data set.
The core components are:
- Learner: Each participant is a learner in the experiment. A learner represents a unique private dataset and machine learning system.
- Global Model: The result of a collective learning experiment: a machine learning model that is trained collectively by the learners. Currently we support neural network architectures.
- Fetch Blockchain: The underlying blockchain and smart contracts that permits the coordination and governance in a secure and auditable way.
- Data Layer: A decentralized data layer based on IPFS that enables the sharing of machine learning weights between the learners.
How Training Works
Training occurs in rounds; during each round the learners attempt to improve the performance of the global shared model. To do so each round an update of the global model (for example a new set of weights in a neural network) is proposed. The learners then evaluate the update and decide if the new model is better than the current global model.
If enough learners approve the update then the global model is updated. After an update is approved or rejected a new round begins.
By using a decentralized ledger (a blockchain) this learning process can be run in a completely decentralized, secure and auditable way. Further security can be provided by using differential privacy to avoid exposing your private data set when generating an update.