AJAN Overview - aantakli/AJAN-service GitHub Wiki
AJAN (Accessible Java Agent Nucleus) is an agent system designed to interact with Linked Data (LD) domains. SPARQL enhanced Behavior Trees (BT), so called SPARQL-BTs, are used as an agent behavior model to dynamically explore such domains and to query and orchestrate LD resources. For an intuitive modeling of AJAN agents a standalone web editor is provided. It offers a graphical user interface to model agent behavior via drag'n'drop and provides a view to hide native SPARQL queries for use by non-experts. For the individual control of the simulated workers or pedestrians, AJAN agents are used in our approach to execute MMUs via the CoSimulator. AJAN is a multi-agent Web service developed for the intelligent orchestration of LD resources and was already used for various simulations in 3D worlds, see 1, 2, 3.
AJAN Architecture
Fig. [AJAN_Architecture] shows an overview of the AJAN architecture. AJAN consists of several independent Web services: The Execution Service (yellow); a plug-in system (orange); the agents domain (blue) with accessible resources (green); a Triple Store (red); and a graphical editor (violet).
Triple Store: RDF Triple Stores maintain various models and manage the knowledge of the agents. Four defined triple data bases (TDB) are available for this: the Template TDB contains different agent models, which are used for the initialization of an agent; predefined SPARQL-BT behaviors are stored in the Behavior TDB respectively the plan library; the* Domain TDB* contains the domain model with ontologies and rules; finally, a Knowledge Base (KB) TDB is available for each agent.
Domain: Domains, for which AJAN was primarily developed are LD environments. In these, the interaction takes place via HTTP with resources that describe their status and actions that can be performed in RDF. If available, AJAN can directly access a functional and logical description of these actions in order to execute them, but also for reasoning purposes, e.g. for action planning. Thus, their preconditions and effects are included in these descriptions.
Execution Service: This is the core of AJAN, with which agents can be created, deleted, managed and executed via various HTTP/RDF interfaces. For example, to create an agent, the agent model to be used and its initial knowledge must referenced or defined in a RDF dataset. This service also offers a plug-in system in which further AI technologies can be integrated for agent behavior modeling.
AJAN Editor: The AJAN Editor is a web service, available to the user for modeling an AJAN agent. It can be used to create SPARQL-BTs, define agent templates, and edit the domain model.
AJAN Agent Model
An AJAN agent (see Figure) has one or more behaviors, each executed in a single thread and consisting of a SPARQL-BT (see chapter SPARQL Behavior Tree) and a corresponding execution knowledge (EK) or working triple data base (TDB), which stores internal behavior knowledge (e.g. procedural variables) in memory as RDF for a faster access; one agent specific RDF based knowledge base (KB), storing internal agent knowledge (e.g. the agent status) in an external RDF triple-store, which can be accessed by all agent (not like EKs, where only the corresponding agent behavior has access to); one or more events, each holding RDF data in the form of named graphs; and one or more HTTP endpoints. These endpoints are the agent's interfaces to its LD-domain and forward incoming RDF messages as events. Behaviors can be linked to these events. If an event occurs, the behaviors linked to it are executed. While executing a SPARQL-BT, it can access special incoming event data by querying its named graph. Each Behavior can also create events to trigger other behaviors. There are two types of events: normal events, that only execute a linked SBT, but do not send its status back to the event creator; and semantic goals that specify input parameters and a postcondition using a SPARQL-ASK query. In case of a goal event, after the execution of the linked SBT, its status is returned to the goal creator, whereupon the postcondition is evaluated. By the introduction of semantic goals, the AJAN agent model follows the BDI4 paradigm in which an agent has beside of a plan library, intentions and beliefs also goals or desires.
Further, each agent has a set of initial knowledge which is stored in the KB of a newly created agent. The initial knowledge consist of information about the agent itself (e.g. knowledge about its events, goals, behaviors and endpoints) and about the multi agent system it lives in, with its endpoint to check available agents with access to their LD-description. Optionally, additional initial knowledge can be defined to give the agent the current state of its environment and for configuration purposes.
By using the AJAN plug-in system, AI methods can be integrated as behavior primitives for behavioral modeling. For example, a SPARQL-BT can be synthesized during GraphPlan-based6 action planning, or by using SPIN-rules5 or an ASP solver (we are using the clingo solver from the Potsdam Answer Set Solving Collection, see 7). To translate the RDF based KB of an agent into ASP rules, we are using the approach of 8, the agent KB can be extended.