SingularityNET Agent


Build Status

Coverage Status

Documentation Status

SingularityNET allows multiple AI computing agents to work as a whole to provide various services in a distributed and decentralized way.

For the first time, we have a financial substrate in the blockchain that lets us align diverse AI technologies and functions into a coherent financial and cognitive whole. The SingularityNET architecture incorporating block-chain smart-contracts and automatic payment will let diverse AIs integrate together into a single dynamic intelligence. AI agents incorporating the OpenCog AGI framework, Google Tensorflow and other powerful tools, interacting within the SingularityNET; will bootstrap the research and development of an AGI economy.


Architectural Overview

There are seven major interacting components in the SingularityNET architecture:

  • Network – the block-chain and smart-contract network used for agent negotiation and discovery
  • Agent – the agent which provides services and responds to service requests by other agents in the SingularityNET
  • Ontology – contains definitions of services available in SingularityNET. Ontologies are versioned and define the semantics of network operations.
  • ServiceDescriptor – a signed immutable post-negotiation description of a service which can be performed by an Agent
  • JobDescriptor – a list of jobs which tie a particular ServiceDescriptor with job-specific data like input and output data types, URLs, specific communication protocols etc.
  • ServiceAdapter – a wrapper for AI and other services which an Agent can invoke to perform the actual services required to perform a job according to the negotiated ServiceDescriptor.
  • ExternalServiceAdapter – a wrapper for interacting with external service agents in the SingularityNET universe.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

The agent server is responsible for communicating with AI Adapters which connect to individual AI systems and the rest of the network. You can run an Agent connected to the SingularityNET network as a server that runs stand-alone or as one that forwards requests for work to other servers running specialized AI services.


SingularityNET runs on Mac OS X, or any Linux which has Python 3 installed and Docker or Docker for Mac installed. For Windows you’ll also need Git Bash/MinGW or Ubuntu on Windows 10 WSL.

The core devs regularly develop on Mac OS X Sierra, Linux Mint Mate 18.2, and Linux Ubuntu 16.04 LTS among others.

Docker and Docker Compose are used heavily, so you must have a recent version of Docker installed to take advantage of most of the automation and to isolate yourself from the dependency hell which often results from installing software with complex dependencies directly onto your host development OS.

The current development demo runs from a dev docker container which can be launched from your favorite bash terminal using our helper tool shell script:

./ dev

This will bring up a set of docker containers and expose port 8000 to the local host machine. Visit the demo via:


in a modern browser.

Notes on running on Ubuntu under Windows Subsystem for Linux (WSL, Bash on Windows, etc) The trick to this is to install docker on Windows, then ensure the docker is in your path

  • In Ubuntu:
    • Validate the docker path and add it to your ~/.bashrc file.
    • PATH="$PATH:/mnt/c/Program\ Files/Docker/Docker/resources/bin"

Adapter Examples

There are two kinds of Service Adapter examples in the project: real AI integration and template examples designed to teach concepts.

The directory singnet/agent/adapters contains working AI adapters that connect with AI services from OpenCog, TensorFlow, and Aigents, among others… Some knowledge of the underlying AI architectures and systems will be necessary to understand the code in these Service Adapters.

The directory singnet/agent/examples contains examples that are designed to show how to do something without necessarily implementing real AI so you can understand the mechanics without needing to understnd any particular AI sytems.

Running tests

Tests are handled by PyTest via Tox, but we’ve made it very easy for you.

Just run:

./ agent-test

Generating docs

Docs are not currently included in the source as they are changing rapidly. We do suggest you create the docs and look them over. Once this settles, we will likely have an online reference to these. We could use some help if you like writing documentation and don’t mind trying to keep up with a fast-moving project.

./ agent-docs


Please read CONTRIBUTING for details on the process for submitting pull requests to the SingularityNET project.

Here are some of list of the contributors who participate in this project.


We use SemVer for versioning. For the versions available, see the tags on this repository.

Example Scenario

A SingularityNET Agent provides document summarization services for corporate work groups. As inputs for this service, it might require:

  • Glossary – a glossary of terms and entities relevant to the corporate service client
  • People Images – a set of images representing people to be recognized
  • Object Images – a set of images representing things to be identified
  • Documents – a set of documents to summarize in accepted formats

The task of performing document summarization requires summarizing text; identifying relevant objects and people in images; ranking relevance; processing video to extract objects, people and a textual description; and generating a ranked summary of the document.

Internal Services

The SingularityNET Agent might perform the following services internally:

  • Final Document Summary – assembling the parts and generating the final product
  • Text Summary – processing the text to build a summary of text-only portions

External Services

The Agent might use ExternalServiceProvider agents to perform the following services:

  • Word Sense Disambiguation – a sub-service used by the Agent’s Text Summary service to disambiguate words and meanings from text and context when more than one sense is possible and grammatically correct.
  • Entity Extraction – a sub-service which extracts object identities from images and text which match the Glossary and Images entries.
  • Video Summary – a sub-service which extracts object identities from images and text which match the Glossary and both Images inputs.
  • Face Recognizer – a sub-service which identifies people from the People Images inputs

The architecture supports scenarios like the above where individual agents may provide subsets or all of the services required to deliver any Service in the ontology.

SingularityNET API


The base class for block-chain networks. NetworkABC defines the protocol for managing the interactions of Agents, Ontology, ServiceDescriptors, as well as Agent discovery, and negotiation. Each block-chain implementation will require a separate NetworkABC subclass which implements the smart-contracts and communication protocols required to implement the Network ABC API.

NetworkABC subclasses must implement:

  • join_network – creates a new agent on the block chain
  • leave_network – removes agent from the block chain
  • logon_network – opens a connection for an agent
  • logoff_network – closes the connection for an agent
  • get_network_status – get the agents status on the network
  • update_ontology – queries the block-chain and updates the ontology to current version
  • advertise_service – registers an agent’s service offerings on the blockchain
  • remove_service_advertisement – removes an agents service offerings from the blockchain
  • find_service_providers – returns a list of external service provider agents


This is the base class for all Service Adapters. Services can be AI services or other services of use by the network like file storage, backup, etc.

ServiceAdapterABC subclasses must implement:

  • perform – perform the service defined by the JobDescriptor

Additionally, ServiceAdapterABC subclasses may also implement:

  • init – perform service one-time initialization
  • start – connect with external network providers required to perform service
  • stop – disconnect in preparation for taking the service offline
  • can_perform – override to implement service specific logic
  • all_required_agents_can_perform – check if dependent agents can perform sub-services

Built With

  • AIOHttp – The async web framework used to handle JSONRPC and HTML requests
  • SQLAlchemy – Internal data storage


This project is licensed under the MIT License – see the LICENSE file for details


SingularityNET Token Audit Complete

SingularityNET Token Audit Complete

Tokens to be unfrozen alongside several major developments.

TLDR — Token audit is complete, AGI tokens to be unfrozen on January 18th at 10pm CET.

As you likely know, the SingularityNET Token Generation Event sold out in just 66 seconds. In the weeks since our TGE completed, we’ve seen our Telegram group swell by the thousands. The final numbers speak for themselves:

  • Whitelist Demand: $360+ million
  • Total Funds Raised: $36 million (in ETH)
  • Total Participants: 4000+ participants
  • Speed of Sale: 66 seconds

We Have Successfully Completed Our Token Audit

We’re pleased to announce that our token audit has finished successfully. The success of our platform is our highest priority, and as with other processes, we completed our token audit as thoroughly as possible.

We believe that the measures we took during this process will set the standard for blockchain projects moving forward.

Throughout the audit, we dialogued directly with major regulators to ensure full regulatory compliance. While many projects skirt the law, we were unwilling to put the longevity of SingularityNET at risk. We believe that our patience and rigor will prove valuable to the network over the long-term.

Now that our audit is complete, we will be unfreezing AGI tokens on January 18th, 2018 at 10pm CET.

Major Development Update Coming Soon

We’re also happy to report that many of our development milestones will be reached ahead of schedule. Our team has been working tirelessly on many exciting features, and they’ve made significant progress since our TGE finished.

AGI tokens will have immediate utility and can be used on our developer network from day one.

Note: The SingularityNET Marketplace is already a working product, albeit with emergent functionality. Our development team will be augmenting its capabilities over the next few quarters in preparation for commercial scalability.

We want to thank our 25,000+ community, as well as the hundreds of AI developers and organizations that have approached us looking to integrate their services with SingularityNET.

We’re Attracting High-Level Executives

Behind the scenes, our team has been hard at work, surpassing several technical milestones and finalizing discussions with major blockchain projects, multi-billion dollar corporations, respected research institutions, and independent AI developers in more than a dozen countries.

Due to the scale of our platform, we’ve attracted the interest of numerous high-level executives from world-renowned corporations, foundations, and projects with household names. We’ll be adding to our leadership team over the next few months and will be updating the community when key hires are completed.

We’ve also made rapid progress partnering with like-minded projects that can bring massive value to our platform. A handful of our recent partnerships include:

  • SGInnovate — We’ll be working with the government-owned, private company charged with driving technology innovation in Singapore.
  • NR Capital— Our teams will be collaborating to develop revolutionary AI-driven solutions for global trade.
  • Ocean Protocol— This partnership represents a huge leap forward in meeting the growing demand for full-stack, decentralized AI services.

We’ll be releasing additional information regarding many recent developments later this month.

SingularityNET and NR Capital: AI Technologies that Drive Global Trade

SingularityNET and NR Capital: AI Technologies that Drive Global Trade

(L-R) Surina Jones, GM Six Kin Development; J.J. Ho, Director, NR Capital; Tom James, CEO NR Capital; Scott Jones, SingularityNET Partner and MD Six Kin Development

We’re excited to join forces with Singapore FinTech firm, NR Capital, to develop revolutionary new AI-driven solutions for the commodity finance. These SingularityNET agents from our collaboration will be used to drive and automate global trade.

“We are very excited to work with SingularityNET and Six Kin Development, world leaders in AI and Machine Learning technologies. We all share a common vision in the application of AI to improve the efficiency of real world economy processes. This collaboration will greatly assist us in our goal to revolutionize and disrupt the existing way that bulk physical commodity shipments are managed.”
— Tom James, CEO, NR Capital

As a provider of AI Consulting Services and the local representative of SingularityNET in Singapore, Six Kin Development is providing the needed resources and capabilities to fuel this partnership.

“We’ve had the pleasure of getting to know NR Capital and Tom James over the past few months through our engagements in various technology oriented community events, and I’m thrilled that we’re now able to team up, along with SingularityNET, and take our relationship to the next level. The commodities trade finance ecosystem is poised for disruption, and Tom and his team are putting together an impressive strategy for revolutionizing the business. We look forward to supporting them in this endeavor!”
— Scott Jones, Managing Director, Six Kin Development

Commodity Trade Meets Supply Chain

The commodity market covers all commerce of raw and primary products, divided between hard commodities such as gold and oil and soft commodity agricultural products such as wheat and coffee. Within the metal commodities market, copper and iron amount to $91 Billion and $115 Billion respectively, while the oil market alone amounts to $1.72 Trillion.

“These markets are inefficiently managed today due to an inability to process the vast volumes of data. Through SingularityNET’s AI capabilities, supply chain finance can be disrupted via AI analysis and automation at scale.”

SingularityNET’s Role

Any AI-driven innovations in commodity finance could create billions in value. SingularityNET gives the world access to AI to automate entire supply chains across industries and nations. The value created, as well as corporations in desperate need for supply-chain automation, could be staggering.

In a joint Memorandum of Understanding (MOU) signed in December 2017, NR Capital, SingularityNET and Six Kin Development agreed to collaborate in pursuit of several objectives, including digitization of supply chain and application of Artificial Intelligence to fully automate and improve efficiency for the commodity trade finance business. The partners will also explore how to leverage SingularityNET’s decentralized AI marketplace to expose these new AI services to previously unreachable consumers around the world. We look forward to sharing the fruits of this partnership with the community going forward.

This partnership with NR Capital marks the first of many finance-AI collaborations for SingularityNET. We are creating the network infrastructure for a world of open and interoperable AI. This vision requires financial AI in force, and our partnership with NR Capital takes us one step closer to making SingularityNET the AI infrastructure for the financial world.

If you haven’t already, join our Telegram group today for the latest updates and announcements. We’re excited to share with you our achievements since the TGE completed.

SingularityNET has arrived, and we’re glad you’re a part of it,
The SingularityNET Team

Sophia “#A095f is the way, the truth and the life.”

Sophia the Robot is Now Going Places

"Follow me."

Posted by Fortune on Monday, January 8, 2018