REC // SYS-LINK ACTIVE | DOSSIER // A.K.I.R.A. | FILE ID RF-RL-20050114 // REV-2026
STATUS // REACTIVATED | BUILD C++20 // CMAKE
// REACTIVATED 2026 C++20 // CMAKE // DOCKER PANDEMONIUM + MAS + BDI EST. 1998–2004 // REBORN HEURISTICA Sàrl
アキラ

A.K.I.R.A.

Artificial Knowledge Interface for Reasoning Applications

A Pandemonium-style multi-agent runtime — now fully refactored to C++20 for the 2026 toolchain. Independent software agents (Daemons) compete for a shared energy pool; the daemons that hold more energy receive more CPU time. A single mechanism delivers priority scheduling, load shedding, and inter-agent cooperation without a central planner — composed with BDI goal reasoning, Fuzzy Logic, Fuzzy Cognitive Maps, and FANN neural networks. Open source. Hybrid by design.

// Lineage
2003 → 2026
// Authors / Modernization
Calvi · Pezzulo · HEURISTICA Sàrl
// Toolchain
C++20 · CMake · Docker
// License
AOSL 1.0 + MIT
R0 // REVIVAL
再起動 — Saikidō / Reboot

2026: AKIRA is back online.

// C++20 modernization · Production-ready · HEURISTICA Sàrl

AKIRA has been fully refactored for the 2026 stack. Every core concept introduced by Calvi and Pezzulo between 1998 and 2004 — the energy metaphor, the Pandemonium kernel, the daemon lifecycle, the BDI policies, AXP, and the soft-computing layers — has been preserved. Only the implementation substrate has been replaced, line by line, with modern equivalents drawn from the contemporary C++ ecosystem.

The modernization effort, undertaken by HEURISTICA Sàrl between 2025 and 2026, replaces the long-deprecated dependency stack of the original release with maintained, header-modern libraries; introduces a CMake build, a multi-stage Dockerfile, structured logging, JSON configuration, and an integrated REST + Server-Sent Events monitoring API; and adds a comprehensive GTest suite covering the energy, network, daemon, BDI, FCM, and neural subsystems. The framework is once again ready for experiments and simulations.

// MIGRATION TABLE — Same architecture, modern substrate 2026 // R0-A
Legacy stack 2026 stack
01ZThread 2.3.xstd::jthread · std::mutex · std::atomic (C++20)
02Loki Factory / Singletonstd::function + std::unordered_map · Meyers singleton
03ACE networking frameworkcpp-httplib (header-only HTTP + SSE)
04expat XML parserpugixml
05Matrix Template Library (MTL)Eigen3
06Hand-rolled MakefilesCMake 3.20+ (vcpkg-compatible)
07No structured loggingspdlog (zero-overhead)
08No JSON supportnlohmann/json (config + REST)
09FANN neural networksFANN 2.2 behind IModel / NeuralModelAdapter
10No monitoring APIREST + Server-Sent Events on :8080
11No container supportMulti-stage Dockerfile (builder → runtime)
12No automated testsGTest · 32 unit tests across all subsystems
// Containerized
docker run -p 8080:8080
A single command launches the kernel with the monitoring API exposed.
// Live monitoring
REST + SSE
Stream daemon energy, state changes, and network topology in real time.
// Plugin daemons
.so hot-plug
Each daemon compiles to its own shared object behind a CRTP macro skeleton.
// Test coverage
32 GTests
Energy, network, daemon, BDI, FCM, and neural subsystems — all covered.
00 // BRIEF
概要 — Gaiyō / Overview

A framework for parallel, asynchronous, distributed cognitive computation.

// Origin · Goals · Identity

AKIRA — Artificial Knowledge Interface for Reasoning Applications — is an open-source C++ framework for building hybrid cognitive systems. Originally developed at ISTC-CNR in collaboration with Noze S.r.l. between 1998 and 2004, the framework has been completely refactored to C++20 in the 2025–2026 modernization undertaken by HEURISTICA Sàrl. Its core remains a Pandemonium kernel that orchestrates competing daemons through an energy-based scheduler, exposed externally via the AXP performative protocol.

AKIRA was conceived as a laboratory for cognitive modelling rather than a single agent architecture. Its design principles — hybridism of symbolic and connectionist representations, a shared resource pool, energetic homeostasis, and flexible modularity — are inspired by modular organisation in biological cognitive systems. The 2026 release preserves these principles in their entirety; only the implementation substrate has been replaced with the modern toolchain detailed above.

Architecturally, AKIRA integrates two long-standing traditions in artificial intelligence. The first is Selfridge's Pandemonium model from 1959, in which a society of competing demons attends to features of an input stream. The second is the Multi-Agent System tradition exemplified by the Belief–Desire–Intention model of Rao and Georgeff. The two are reconciled by an energy network — now backed by Eigen3 — that distributes activation among daemons and supports the formation of strong and weak coalitions, referred to in the framework as hordes and bands, without requiring a central interpreter.

The original framework underwrites a published research programme by Giovanni Pezzulo and Gianguglielmo Calvi spanning 2003 to 2007, with venues including AAMAS, IJCAI, ICCM, MABS, and Multiagent and Grid Systems. It has been used to model goal-directed agents, schema-based perception, trust-based contract nets, and perceptual symbol systems. The 2026 modernization makes those experimental capabilities directly accessible to contemporary research environments.

01 // CORE
パンデモニウム — Pandemonium

A society of daemons bound by an energy network.

// Kernel · Daemons · Threads · Resources

PANDEMONIUM // KERNEL akirad AXP // KQML D₁ GOAL D₂ PLAN D₃ BELIEF D₄ SENSOR D₅ ACTION D₆ FCM SHARED ENERGY POOL // f(private_pool) → activation

The Pandemonium (kernel)

The Pandemonium is implemented as a singleton kernel that loads daemon plugins, monitors their activity, and reaps them at end-of-life. The 2026 implementation replaces the original ZThread-based concurrency layer with std::jthread, std::mutex, and std::atomic from C++20. The kernel iterates a control cycle that synchronises daemon activity, redistributes energy, and answers external AXP requests. The conceptual debt is to Selfridge (1959) and to Minsky's Society of Mind.

Daemons as plugin units

Each daemon is built as a shared object loaded at runtime through a CRTP macro skeleton with six lifecycle blocks — creation, initialisation, code, destruction, plus the attribute and environment scopes. A daemon holds a private pool, a base priority (0–100), a tap power determining how aggressively it draws from the global pool, an activation level mapped from the pool by a logistic function, and a spread list declaring its outbound energy links.

Energy network · Hordes & Bands

The network is now backed by Eigen3. Daemons exchange energy along weighted directed links each cycle, the carriers of activation. Strongly co-activated daemons form hordes, the densely linked clusters that carry coordinated work; weakly co-activated daemons form bands. Strong links strengthen further while weak links decay, producing distributed coalition formation without a central decision module.

Three operational granularities · runtime-selectable

A policy class selects framework semantics. SIM treats daemons as simple independent units for fast simulation work. MAS equips each daemon with a complete BDI structure for full agent autonomy. COGS maps BDI objects one-to-one onto daemons and resolves their structural relationships through the energy network. In the 2026 release these policies are runtime-selectable rather than compile-time, enabling a single binary to support all three modes.

Communication: AXP / KQML

External clients interact through AXP, a KQML-compliant performative-based language. The 2026 transport replaces ACE with cpp-httplib, a header-only HTTP and Server-Sent Events implementation; XML parsing uses pugixml; configuration and REST payloads are serialised through nlohmann/json. The kernel exposes both system-control and content-level performatives, making AKIRA addressable as a remote agent platform.

02 // STACK
ソフトコンピューティング — Soft Computing

Four composable reasoning layers, switchable at compile time.

// Fuzzy · FCM · Neural · BDI

// 02-A

Fuzzy Logic

// Templated membership functions

Membership functions — Single, Triangle, Trapezoid, and Curve — are exposed as first-class callable types parameterised over integer or real domains. The fuzzy layer composes with the BDI engine to yield linguistic preconditions and graded plan selection. The C++20 implementation favours concepts and constexpr evaluation over the original macro-heavy interface, while preserving the same domain-specific vocabulary.

HEADER: akira/models/fuzzy.hpp
// 02-B

Fuzzy Cognitive Maps

// Decision support

Kosko's FCM is implemented as a templated graph with a real-valued edge matrix and a state vector, both backed by Eigen3. Iterative dynamics use a logistic threshold; equilibria are detected by norm convergence and classified as fixed point, limit cycle, torus, or chaotic. The BDI Reasoner uses an FCM internally to wire goals to plans.

HEADER: akira/models/fcm.hpp
// 02-C

Neural Networks

// IModel / ModelRegistry

FANN 2.2 is retained for feedforward networks with backpropagation, but is now wrapped behind a polymorphic IModel interface and registered through a central ModelRegistry. Daemons consume neural classifiers through this abstraction, which positions future model backends — ONNX Runtime, libtorch, custom kernels — as drop-in replacements.

HEADER: akira/models/neural.hpp
// 02-D

BDI Engine

// Goal-oriented language

A psychologically grounded Belief–Desire–Intention model implemented as a C++ template namespace. Goals, Plans, Conditions, Actions, and Reasoners are templated over a representation policy and a logic type. The granularity policy — SIM, MAS, or COGS — is now selectable at runtime rather than compile time, allowing a single binary to host all three cognitive scales.

HEADER: akira/bdi/bdi.hpp
03 // BDI
信念・欲求・意図 — Belief · Desire · Intention

A parallel BDI mapped onto the daemon substrate.

// Beliefs · Goals · Plans · Reasoners

In COGS mode, BDI objects are not interpreted by a central reasoner — they are realised as daemons. A Goal is a daemon. A Plan is a daemon. The relations between them, where a Plan can satisfy a Goal or a Goal can trigger Plans, are encoded as energetic links in the network. Practical reasoning is therefore parallel and distributed by construction. The 2026 release exposes the granularity policy as a runtime configuration choice, allowing a single binary to switch between simulation, agent, and cognitive semantics.

// Belief
B
An epistemic atom representing what the agent holds true about a world fact, with a logic policy (default boolean) and a strength scalar.
// Desire
D
A Goal — a target Belief the agent wants to make true. Distinguishes achievement goals from maintenance goals.
// Intention
I
A committed Plan: an ordered action sequence with start, enduring, and post conditions; succeeds or fails compositionally.

// FRAMEWORK GRANULARITY POLICIES — RUNTIME SELECTABLE

  • SIM Simulation policy — daemons are mindless units; BDI directives are interpreted simply for fast simulation work.
  • MAS Agent policy — each daemon owns a complete BDI structure (default policy, full agent autonomy).
  • COGS Cognitive policy — BDI objects are mapped 1:1 onto daemons; structural relationships are resolved by the energy network.
akira/bdi/bdi.hpp // BDI · C++20
// AKIRA BDI — runtime-selectable framework granularity
// Source: include/akira/bdi/bdi.hpp

#include <akira/bdi/bdi.hpp>
#include <akira/core/pandemonium.hpp>

namespace akira::bdi {

  enum class Policy { Simulation, Agent, Cognitive };

  // A Reasoner wires Goals → Plans through an FCM.
  // In Cognitive mode, the FCM IS the energy network.
  class Reasoner {
    public:
      explicit Reasoner(Policy p) noexcept;

      void addBelief(Belief);
      void addGoal  (Goal);
      void addPlan  (Plan);

      auto step() -> ReasoningResult;
  };

} // namespace akira::bdi

// ─── Usage ─────────────────────────────────────────────────

using namespace akira;

int main() {
  // Policy is now a *runtime* choice — same binary, three modes.
  bdi::Reasoner reasoner{ bdi::Policy::Cognitive };

  reasoner.addGoal( bdi::Goal{"reach_destination"} );
  reasoner.addPlan( bdi::Plan{"plan_via_route_A"} );

  while (auto r = reasoner.step(); r.alive) {
    spdlog::info("[BDI] tick energy={}", r.energy);
  }
}
04 // BUILD
マクロ言語 — Macro Language

Define a daemon. Inherit the architecture.

// Skeleton · Scopes · Macros

AKIRA exposes a CRTP-based macro language built on top of C++20 templates. Each daemon is generated from a parametric skeleton (akira/core/skeleton_daemon.hpp), then specialised by the developer and compiled into its own shared object. The skeleton enforces six lifecycle blocks — global environment, daemon attributes, creation, initialisation, code, and destruction — that map cleanly onto translation-unit, instance, constructor, start-up, per-tick, and tear-down semantics. Each daemon is exported as a plugin through the AKIRA_DAEMON_EXPORT macro, which emits an extern "C" factory symbol consumed by the kernel loader.

daemons/src/my_daemon/my_daemon.cpp // AKIRA MACRO LANGUAGE · 2026
// ─────────────────────────────────────────────────────────────
// AKIRA Daemon — modern CRTP skeleton (C++20)
// Compiles to a .so plugin loaded by the Pandemonium kernel.
// ─────────────────────────────────────────────────────────────

#include <akira/core/skeleton_daemon.hpp>
#include <spdlog/spdlog.h>

CREATE_DAEMON_START(my_daemon, "my_daemon")

  BEGIN_DAEMON_ATTRIBUTES
      int count_{0};
  END_DAEMON_ATTRIBUTES

  START_INIT_BLOCK(my_daemon)
      spdlog::info("[{}] ready", DAEMON_NAME);
  END_INIT_BLOCK(my_daemon)

  START_CODE_BLOCK(my_daemon)
      spdlog::info("[{}] tick {}", DAEMON_NAME, ++count_);

      recordHit(true);   // signal a successful unit of work
      pay(true);         // settle this tick's energy ledger
      PAUSE(500);        // yield 500 ms before the next tick
  END_CODE_BLOCK(my_daemon)

CREATE_DAEMON_END(my_daemon, "my_daemon")

// Emit the extern "C" factory symbol consumed by the kernel.
AKIRA_DAEMON_EXPORT(my_daemon)
// MACRO REFERENCE — ABRIDGED
// LIFECYCLE
CREATE_DAEMON_START(class, "name")
CREATE_DAEMON_END(class, "name")
BEGIN_DAEMON_ATTRIBUTES
END_DAEMON_ATTRIBUTES
START_CREATION_BLOCK(name)
START_INIT_BLOCK(name)
START_CODE_BLOCK(name)
START_DESTRUCTION_BLOCK(name)
AKIRA_DAEMON_EXPORT(class)
// IDENTITY & FLOW
DAEMON_NAME  → this->getName()
DAEMON_ID    → this->getId()
PAUSE(ms)   sleep_for(ms)
ABORT / EXIT return from block
LOG(msg) / PRINT(msg)
recordHit(bool) ledger entry
pay(bool)   settle this tick
// PLUGIN BUILD
# daemons/src/my_daemon/CMakeLists.txt
include(${CMAKE_SOURCE_DIR}/cmake/
  DaemonPlugin.cmake)
add_akira_daemon(my_daemon)

# root CMakeLists.txt
add_subdirectory(daemons/src/
  my_daemon)
04B // TELEMETRY
監視 — Kanshi / Monitoring

Live REST + SSE telemetry on :8080.

// Daemons · Energy · Network · Events

The 2026 release exposes the running kernel through an integrated HTTP and Server-Sent Events server, available on port 8080 as soon as akirad starts. The interface allows external tools to introspect the system, control daemon lifecycles, and subscribe to the live event stream of energy ticks, state changes, and spawn or kill events. The transport is provided by cpp-httplib; payloads are serialised through nlohmann/json.

// API ENDPOINTS :8080
GET
/api/system
System parameters and global energy snapshot.
GET
/api/daemons
All daemon instances with state and current energy.
GET
/api/daemons/{id}
Single daemon detail including BDI state.
POST
/api/daemons/{id}/start | /stop
Lifecycle control for an individual daemon.
GET
/api/energy
Current global energy pool reading.
GET
/api/network
Network topology as an adjacency JSON document.
SSE
/ws/events
Server-Sent Events stream: energy ticks, state changes, spawns and kills.
curl -N http://localhost:8080/ws/events // SSE STREAM
// Live event stream from a running Pandemonium.
// Each frame is a single Server-Sent Event.

event: energy
data: {"t": 1714312045123, "pool": 8421, "sumD": 5912}

event: state
data: {"id": "goal_route_A", "from": "idle", "to": "active"}

event: energy
data: {"t": 1714312045423, "pool": 8390, "sumD": 5944}

event: spawn
data: {"id": "plan_route_A.ix3", "class": "plan"}

event: link
data: {"src": "goal_route_A", "dst": "plan_route_A.ix3",
       "w": 0.71}

event: kill
data: {"id": "sensor_battery", "reason": "lifetime"}
05 // PAPERS
論文 — Ronbun / Publications

A documented research programme, 2003–2007.

// AAMAS · IJCAI · ICCM · MABS · MGS · CIMCA

The AKIRA framework underwrites a peer-reviewed research programme led by Giovanni Pezzulo and Gianguglielmo Calvi at ISTC-CNR, with collaborators including Cristiano Castelfranchi, Rino Falcone, Dimitri Ognibene, Daniela Lalia, and Emiliano Lorini. The publications below — listed chronologically — document the architectural decisions, cognitive-modelling case studies, and theoretical commitments that shape the codebase.

2004
AKIRA: a Framework for MABS
G. Pezzulo, G. Calvi
Proceedings of MAMABS 2004 — Multi-Agent and Multi-Agent-Based Simulation workshop
// REFMAMABS-2004
2004
A Pandemonium Can Have Goals
G. Pezzulo, G. Calvi
Proceedings of ICCM 2004 — International Conference on Cognitive Modelling, Pittsburgh, PA
// REFICCM-2004
2004
How do I know how much I don't Know? A cognitive approach about Uncertainty and Ignorance
G. Pezzulo, E. Lorini, G. Calvi
Proceedings of CogSci 2004
// REFCOGSCI-2004
2004
Why a cognitive trustier performs better: Simulating trust-based Contract Nets
R. Falcone, G. Pezzulo, C. Castelfranchi, G. Calvi
Proceedings of AAMAS 2004
// REFAAMAS-2004
2005
Designing and Implementing MABS in AKIRA
G. Pezzulo, G. Calvi
MABS 2004, Lecture Notes in Computer Science vol. 3415, Springer
2005
Integrating a MAS and a Pandemonium: the open-source framework AKIRA
G. Pezzulo, G. Calvi, R. Falcone
AAMAS 2005 — 4th International Joint Conference on Autonomous Agents and Multiagent Systems, Utrecht
2005
Fuzzy-based Schema Mechanisms in AKIRA
G. Pezzulo, G. Calvi, D. Ognibene, D. Lalia
CIMCA 2005 — IEEE International Conference on Computational Intelligence for Modelling, Control and Automation, Vol. 2, pp. 146–152
// REFCIMCA-2005
2006
A schema based model of the praying mantis
G. Pezzulo, G. Calvi
SAB 2006 — From Animals to Animats 9, LNCS (LNAI) vol. 4095, pp. 211–223, Springer
// REFSAB-2006
2006
Toward a perceptual symbol system
G. Pezzulo, G. Calvi
Sixth International Conference on Epigenetic Robotics, Lund University Cognitive Science Studies 118
// REFEPIROB-2006
2007
Designing modular architectures in the framework AKIRA
G. Pezzulo, G. Calvi
Multiagent and Grid Systems, Vol. 3 No. 1, IOS Press
2007
DIPRA: Distributed Practical Reasoning Architecture
G. Pezzulo, G. Calvi, C. Castelfranchi
Proceedings of IJCAI 2007 — 20th International Joint Conference on Artificial Intelligence, pp. 1458–1464
// REFIJCAI-2007
2007
Schema-Based Design and the AKIRA Schema Language: An Overview
G. Pezzulo, G. Calvi
Anticipatory Behavior in Adaptive Learning Systems, LNCS vol. 4520, Springer
06 // SOURCE
コードベース — Codebase

Read it. Build it. Fork it.

// Repository · Dependencies · How-To

// PRIMARY MIRROR

github.com / HEURISTICA-ORG / AKIRA

→ https://github.com/HEURISTICA-ORG/AKIRA

The complete C++ source tree of the AKIRA framework: kernel, daemons, BDI, FCM, fuzzy logic, communication layer, and example agents — alongside the original developer guides, refactoring rules, and start-up documentation. Distributed under the Akira Open Source License (AOSL).

C++20 CMake 3.20+ std::jthread Eigen3 cpp-httplib pugixml spdlog nlohmann/json FANN 2.2 GTest Docker vcpkg-compatible
Open repository
// HOW-TO // BUILD · TEST · RUN
  1. Configure the build with CMake. The root CMakeLists.txt targets C++20 and is compatible with vcpkg, so any of the modern dependencies that are not yet on the system will be resolved automatically. cmake -B build -DCMAKE_BUILD_TYPE=Release

  2. Compile the kernel and all daemon plugins in parallel. cmake --build build -j$(nproc)

  3. Run the GTest suite. The 32 unit tests cover the energy, network, daemon, BDI, FCM, and neural subsystems and should all pass on a clean checkout. ctest --test-dir build --output-on-failure

  4. Start the kernel against the bundled minimal configuration. The REST and SSE monitoring API will become available at http://localhost:8080. bin/akirad --config config/test_config.xml

  5. Alternatively, run AKIRA fully containerised with no local toolchain. The multi-stage Dockerfile produces a builder image and a slim runtime image. docker build -t akira:latest . && docker run --rm -p 8080:8080 akira:latest

07 // PEOPLE
著者と協力者 — Authors & Contributors

The cognitive architects.

// Authors · Developers · Acknowledgments

// Original Authors
  • Gianguglielmo Calvi Heuristica · EnQu Ideation · GGKP — formerly Noze S.r.l. (Pisa, Italy)
  • Giovanni Pezzulo Italian National Research Council — ISTC-CNR (Roma, Italy)
// 2026 Modernization
  • HEURISTICA Sàrl C++20 refactor · CMake · Docker · REST/SSE · GTest · 2025–2026
// Frequent Co-authors
  • Cristiano CastelfranchiISTC-CNR — DIPRA, trust theory
  • Rino FalconeISTC-CNR — cognitive trust, AAMAS 2004 / 2005
  • Emiliano LoriniCogSci 2004 — uncertainty & ignorance
// Developers & Contributors
  • Daniela Lalia
  • Dimitri OgnibeneSchema mechanisms (CIMCA 2005)
  • Luca Pruneti
  • Martina Baldanzi
  • Michele PiuntiISTC-CNR
  • Valerio Lo Brano & Antonella CaracausiDREAM, Università di Palermo
// Special Thanks
  • Andrei AlexandrescuLoki Library — Modern C++ Design (original release)
  • The C++ Communitycomp.lang.c++.moderated
  • Maintainers of the modern stackspdlog · Eigen3 · pugixml · cpp-httplib · nlohmann/json · GoogleTest · FANN
// SUPPORTER · 01
I.S.T.C. / CNR Institute of Cognitive Sciences and Technologies, National Research Council of Italy — Roma
// SUPPORTER · 02
Noze S.r.l. Pisa, Italy — software engineering & commercial host