The Potential of Agent Architectures

DZone 's Guide to

The Potential of Agent Architectures

Alexander Assink explains how agents, small distributed applications that demonstrate autonomous behavior, could aid the development of IoT.

· IoT Zone ·
Free Resource

Agents have existed already for a long time. In software engineering, they are small distributed applications that demonstrate some form of autonomous behavior. Also today's trends in distributed architectures such as blockchain and micro services can be viewed from an Agent perspective. Intelligent Agents can add more autonomy and contextual awareness to these concepts. Agent Architectures lay the foundation for such Intelligent Agents to also collaborate with each other.

The Internet of Things (IoT) for example is where Intelligent Agents could provide a more immersive experience. Today, the IoT mostly sends data up in verticals towards the Cloud for complex processing. As both software and hardware continues to evolve, 'data gravity' may bring some these processes back to the devices. In the IoT of tomorrow, horizontal value between devices and across industries could be uncovered using Intelligent Agents.

Agents Versus (Micro)Services

The following picture shows an example of a Multi Agent System. At the top you see Agents that interact like common (Micro)Services do. The key different here is that Agents also collaborate to make more sense of their Environment, trying to sense and influence it together.

Image title

When viewed top-down, Agents and (Micro)Services share some similar architectural characteristics. The difference is in how they fulfill these characteristics in order to address different challenges:

  • MicroServices are the foundation of a distributed architecture where change is expected in the form of code changes (focused on small services enabling a highly decoupled system).
  • Agents are the foundation of a distributed architecture where change is expected in the form of contextual changes (focused on collaboration and percieving its dynamic environment).

Below I tried to outline some similar characteristics, while also indicating how they differ while implementing these characteristics.

Characteristic MicroService Architecture Agent Architecture (Multi Agent Systems)
  • Distributed code
  • Distributed code
  • Distributed knowledge / intelligence
  • Services
  • Artifacts (for example Services + metadata)
  • Agents
  • Environments (physical and virtual)
Designed for flexibility:
  • Flexible to code changes
  • Flexible to code changes
  • Flexible to contextual changes
  • Reactive
  • Contextual (reactive, proactive, cognitive)
  • From Service to Service
  • From Agent to Agent
  • From Agent to Artifact
  • From Agent to Environment
Inter-process communications:
  • Event-driven / RESTful
  • Exchanges data
  • Common data structures
  • Event-driven and Environment-driven
  • Coordinates / communicates / organizes
  • Common data structures and semantic data
Agents are the foundation of a distributed architecture where change is expected in the form of contextual changes.

'Secret Agents'

Already we see 'smart' Applications and 'smart' Services emerging. These are often comprised of common Services that use the computing power and data in the Cloud with for example Predictive Analytics and Machine Learning to provide a more intelligent response. You could argue that these are Intelligent Agents that already work 'undercover' in todays architectures. In the transition from todays architectures to future Agent Architectures, we could refer to these as 'Secret Agents'.

An Intelligent Agent eventually may not be dependent anymore on the Cloud data and computing power. This is also where the concept of 'data gravity' comes into the picture. Eventually the data will already be real-time processed where it was first discovered and adds the most value. This is when we will see the true Agents start to emerge and expose themselves.

Agent Characteristics

A key difference between (Micro)Services and Agents is the contextual behavior that an Agent can demonstrate. An Agent is goal-driven, and tries to fulfill its goals by making decisions based upon various factors such as knowledge of its own capabilities, its connected environment, and other agents that are present at a given time. In other words, it aims to understand its context and based upon that decides what is the best way to achieve its goals.

The most commonly mentioned Agent characteristics I’ve somewhat simplified and listed below.

Characteristic From a software perspective
persistence Agents don't execute code on demand but run continuously and decides for itself when to perform some activity. It continuously tries to meet its goals and achieve stability.
autonomy The ability to make decisions without human intervention. Agents can select their own tasks to execute, they can prioritize their work, and decide which goals to pursue first.
social ability Agents are able to engage other components through some sort of communication and coordination, they may collaborate on a task.
reactivity Agents perceive the context in which they operate and react to it appropriately.
proactivity Agents can probe its context and consider different scenarios before acting, it takes initiative in a goal-oriented manner.
adaptability Agents could reconsider their options and adopt another strategy in case its original plan to reach a goal becomes inadequate.
Agents are goal-driven and try to understand its connected environment, based upon that they take contextual and intelligent decisions.

Types of Agents

Agents decide which actions to take that in turn lead to goals achieved and new inputs to process. Agents are often categorized into two groups.

The Reflex Agent is quite similar to the (Micro)Services that we are already familliar with. It demonstrates the characteristics of an Agent, but in terms of intelligence it is not very different from a common Service. It can be implemented using programming logic and rules.

The model-based Agent has a better understanding of its context, and maintains a model of the world around itself in order to make decisions. The control-logic can often be further broken down into two cycles: deliberation (what to do) and planning or means-end reasoning (how to do it).

As factors change in its dynamic environment, the interpreter of a Model-Based Agent may revise its plans and goals. Common interpreters can be implemented using programming logic and rule engines, but more intelligent interpreters require processing of semantic data and ontologies.

Agents can vary from simple Reflex Agents to complex Model-Based Agents that use semantic data and ontologies.

Beliefs, Desires, and Intentions

I don’t go into detail on more ‘human-like’ Agents but I like to briefly point out the BDI model. This can be used for advanced Model-Based Agents that use concepts of human practical reasoning in terms of Beliefs, Desires, and Intentions (BDI). In software development, it could be viewed as follows:

Mental attitudes From a software perspective
Beliefs The context of the Agent, the Agents knowledge base
Desires Agent goals to be achieved, as well as properties and costs associated with each goal. The motivational state of the system.
Intentions Forming 'human-like' intentions is the most complex part, and requires help from a interpreter for deliberation and planning. The intentions represent the selected actions for an Agent to try to reach a certain goal.

A framework based on for example BDI can help to implement Cognitive Agents that align software processing more with our human way of thinking.

The Beliefs, Desires, and Intentions (BDI) model can be used for software frameworks that implement Cognitive Agents.

The Aliens Agents are coming?

Agents are already emerging in various solutions as what I like to call 'Secret Agents'. Once Intelligent Agents will find there place in the IT landscape, and continue to converge with trends like Micro Services, IoT, Machine Learning, AI, and what else the future brings, I really start to wonder how tomorrows IT landscape will look like?

microservice ,architecture ,internet of things ,machine learning

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}