Central Workspace & Update Control
Centrally manage shared library modules (SharedLib) and deploy rolling driver updates safely across agent environments without interrupting production.
Concept & Purpose
When multiple specialized agents are deployed across different edge controllers and cloud platforms, managing code duplication and updates becomes a significant bottleneck.
YAIFA's central management module solves this by organizing code files and updates under a centralized architecture:
- Shared Code Repository: Common helpers, data decoders, and custom library modules are placed inside a flat project folder called
SharedLib/, loaded automatically by all active agent paths. - Template Engine: Structural templates (
defaults/templates/python/) reside in a central location. When the studio updates a template, drivers are regenerated across the project. - Code Signing & Release Matrix: Enforces strict compatibility checks between the platform's studio version, target edge runtimes, and local model weights.
Practical Value
Centralized workspace control provides several operational benefits:
- Prevent Code Drift: Changes to shared business logic (e.g. calculating cycle efficiency) are written once in
SharedLib/and instantly imported by every agent, eliminating copy-paste errors. - Rolling Updates (Over-The-Air): Safely push compiled code packages and updated model weights to running Edge nodes without interrupting production cycles.
- Sandboxed Testing before Commit: Validation scripts verify syntax, import cycles, and BDI schema compliance (
yaifa validate) before saving modifications.
Technical Realization
The compiler handles import paths by inserting the shared library folder directly into Python's sys.path during script initialization:
# Inside generated yaifa_agent.py driver heads
import sys
import os
_PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
_SHARED_LIB = os.path.join(_PROJECT_ROOT, "SharedLib")
if os.path.exists(_SHARED_LIB):
sys.path.insert(0, _SHARED_LIB)
# Agents can now import shared helpers directly without prefixing
import shared_helper_module
A centralized API gateway (/api/project/{id}/shared-lib/...) allows users to view, edit, and push code files to all agent nodes in the MAS. Rolling updates use an atomic file swap: the new executable compiles to a temporary file, and replaces the live process driver only after verifying a successful simulation dry-run.