Over a million developers have joined DZone.

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

Access the survey results 'State of Industrial Internet Application Development' to learn about latest challenges, trends and opportunities with Industrial IoT, brought to you in partnership with GE Digital.

Agents have existed already for a long time. In software engineering, they are small distributed applications that demonstrate some form of autonomous behavior. Early examples are monitoring agents, web crawlers, and chat bots. Also, today's trends in distributed and intelligent architectures can be viewed from this existing Agent perspective. Software Agents could be viewed as an evolution of, or an addition to, the (Micro)Services that are underpinning these trends.

Intelligent Agents can add autonomy, context awareness, and intelligence as natural behaviors to these concepts. They can provide interactions between such Services and with its Environments more naturally. 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. IoT is distributed and it’s all about connecting with its dynamic environment. 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.

Intelligent Agents could be viewed as an evolution of, or addition to, (Micro)Services.

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.

CharacteristicMicroService ArchitectureAgent Architecture (Multi Agent Systems)
Distributed:
  • Distributed code
  • Distributed code
  • Distributed knowledge / intelligence
Modular:
  • 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
Behavioral:
  • Reactive
  • Contextual (reactive, proactive, cognitive)
Decoupled:
  • 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.

CharacteristicFrom a software perspective
persistenceAgents 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.
autonomyThe 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 abilityAgents are able to engage other components through some sort of communication and coordination, they may collaborate on a task.
reactivityAgents perceive the context in which they operate and react to it appropriately.
proactivityAgents can probe its context and consider different scenarios before acting, it takes initiative in a goal-oriented manner.
adaptabilityAgents 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 attitudesFrom a software perspective
BeliefsThe context of the Agent, the Agents knowledge base
DesiresAgent goals to be achieved, as well as properties and costs associated with each goal. The motivational state of the system.
IntentionsForming '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, Predictive and Prescriptive Analytics, and what else the future brings, I really start to wonder how tomorrows IT landscape will look like?

The IoT Zone is brought to you in partnership with GE Digital.  Discover how IoT developers are using Predix to disrupt traditional industrial development models.

Topics:
microservice ,architecture ,internet of things ,machine learning

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}