ContextAA
Context-Driven Autonomous Agent ArchitectureA distributed multi-agent platform for the open intelligent space — where autonomous agents migrate across nodes, coordinate through Context, and remain operational even in the face of network instability, resource constraints, and device mobility.
Smart environments are distributed, mobile, and resource-constrained.
ContextAA is designed for exactly that.
Traditional middleware assumes stable networks, fixed nodes, and developers who manage concurrency. In the open intelligent space — where devices are heterogeneous, connectivity is intermittent, and expertise is domain-specific — those assumptions fail. ContextAA replaces them with a context-driven, agent-based architecture where the Context is both the data model and the programming interface.
"L'architecture, c'est une tournure d'esprit et non un métier. ContextAA extends this idea to software: an architectural mindset for intelligent spaces, where Context guides everything — deployment, coordination, and cognition."
— Le Corbusier / Lettre · adapted for ContextAA · AMI-Lab · Université de SherbrookeEvery piece of information — sensor readings, agent state, queries, responses — is represented as Context. One abstraction to rule them all.
Agents can migrate from Host to Host as resources shift, carrying their contextual state with them. Continuity of service is a first-class design goal.
Domain agents never manage threads or locks. Isolation from network and concurrency concerns lets domain experts reason about logic alone.
A fully loaded Host with all standard agents and a dozen domain agents consumes under 1 MB of RAM — less than a "Hello World" in most modern runtimes.
Four Building Blocks of ContextAA
ContextAA's distributed architecture is built from four principal elements that together handle deployment, execution, communication, and context management across fixed and mobile nodes in an open network.
EXECUTION CYCLE — HOST · AGENT MANAGER · AGENTS
A process deployed on a node — fixed or mobile. The Host acts as deployment unit, agent container, agent lifecycle manager, and isolation layer between agents, the network, and concurrency. Comparable to an OSGi Bundle, but fully context-guided.
Two categories: Standard Agents (privileged, platform-specific, manage host services) and Domain Agents (contextified, portable, express mission logic). All share the same lifecycle interface. Domain agents are strictly isolated from concurrency and network concerns.
Concurrent satellites of a Host that handle blocking or asynchronous operations: the Communicator, Discoverers (network topology), Emitters (outbound context), and Receivers (inbound context). They interact with agents exclusively through Context Channels.
Context is the fundamental data unit — a self-describing, named, hierarchical structure. Context Channels are synchronized, unidirectional links between autonomous objects and standard agents, ensuring non-blocking, race-free data exchange at the periphery of the Host.
Each agent a has a contextual space Sa; each Host h has Sh ⊃ ∪Sa. Domain agents interact only with their own Sa. Standard agents may access Sh. This layering provides both isolation (domain-level privacy) and coordination (host-level sharing).
Each Host maintains Nh — a contextified description of neighboring Hosts. Discoverers update Nh asynchronously; agents operate on this near-current snapshot, enabling robust operation without requiring global consistency or synchronized clocks.
Context Is Both Data and Program
In ContextAA, Context is not merely a data format — it is the programming interface. Queries, responses, agent behavior, and transformations are all expressed as Context. This "contextification" enables agents to be fully serializable, migratable, and reasoned about without any language-specific runtime.
Context matching operates at three levels: name equivalence (fast, surface-level equality), model matching (pattern-based with criteria and transformations), and equivalence providers (semantic bridging for vocabulary or unit-of-measure differences). Together they enable agents to find and consume Context even when vocabularies diverge.
Access qualification — public, local, private — governs the scope of each published Context: world-visible, Host-visible, or agent-only. Standard agents enforce this scoping during query resolution.
Every Agent Operates on Its Own Discrete Present
ContextAA does not seek global consistency. Instead, each agent operates on a stable, locally coherent snapshot of the world during its cycle. This design choice — pragmatic and philosophical — makes agents robust to partial connectivity, clock drift, and distributed non-determinism.
The Three-Step Agent Cycle
Each agent executes a deterministic, isolated cycle managed by the Agent Manager: Consume → Act → Publish. During Act, the agent's contextual space Sa is frozen — no asynchronous events can alter it mid-execution. This eliminates the need for locks, monitors, or any form of explicit synchronization in domain agent code.
Context requests published by an agent are fulfilled between cycles — these are deferred actions. An agent must always be written assuming its requests may not be answered for one or more additional cycles, potentially never (in the case of disconnected neighborhoods).
Time Without Global Clocks
ContextAA contextifies time itself. No global synchronized clock is assumed. An agent's "moment" is an iteration in its own execution cycle — discrete, monotonic, and local. Two consecutive moments ti, tj are ordered only within the same agent's history.
Between hosts, only a partial order is possible: sending a Context c precedes its receipt, and agent migration start precedes arrival. Beyond that, ContextAA favors subjective coherence per agent over global consistency — a principled stance aligned with the realities of open distributed systems.
Agent reads from its contextual space Sa — all previously received responses to prior queries, plus any context produced by the agent itself. The world is stable during this step.
Agent applies its mission logic — evaluates conditions, produces new context values, commands actuators — strictly based on current Sa. No I/O, no blocking, no concurrency. Bounded execution per cycle.
Agent writes new context and outbound requests into Sa. Standard agents then propagate public context to neighbors and fulfill local requests — between this cycle and the next.
Context requests for remote hosts may require multiple cycles to resolve — or may never be fulfilled. Agents are designed to plan for the future but act on the present: always gracefully functional on stale context.
When two agents publish antagonistic demands (e.g., thermostat at 20°C vs. 23°C), ContextAA provides the structural framework — but resolution strategy is the domain expert's responsibility, encoded in the actuator agent's ontological frame.
Agents Move. Context Moves With Them.
Agent migration is a first-class feature of ContextAA. When resources on a Host fall below an agent's declared minimum requirements (Ra), the agent initiates migration to a neighboring Host that can support its mission — carrying its full contextual state along the way.
AGENT MIGRATION SEQUENCE — ha→h'
Each agent declares Ra: the minimum resources a Host must provide to support its mission. Ra is expressed pessimistically to trigger migration before service degrades, not after. The best-supported neighbor in Ξa ⊆ Nh is selected as destination.
Domain agents expressed entirely in Context are platform-independent by nature — their migration is as lightweight as transmitting a structured data object. Binary deployment is also supported for cases where contextification is not yet feasible, with platform constraints declared in Ra.
A domain agent cannot distinguish a well-connected Host from an isolated one. It operates on the Context in Sa, which may lag behind physical reality. This is intentional: the agent remains operational at all times, trading potential staleness for uninterrupted service.
ContextAA in the Platform Ecosystem
Whether you are deploying a smart home application, researching distributed agent systems, or extending the platform — ContextAA is open for collaboration. Contact us or explore the full AMI-Lab infrastructure documentation.
Project Team
Bessam Abdulrazak
Professor, Department of Computer Science, Université de Sherbrooke
Director of the AMI-Lab
Patrice Roy
Ph.D. Student
Supervisor: Prof. Bessam Abdulrazak
Period: until july 2019
Publications
Coming Soon
We are working on this section. Please check back soon!