Files
the-nexus/nexus
Alexander Whitestone ec2a427a7a feat: implement A2A protocol for fleet-wizard delegation (#1122)
Implements Google Agent2Agent Protocol v1.0 with full fleet integration:

## Phase 1 - Agent Card & Discovery
- Agent Card types with JSON serialization (camelCase, Part discrimination by key)
- Card generation from YAML config (~/.hermes/agent_card.yaml)
- Fleet registry with LocalFileRegistry + GiteaRegistry backends
- Discovery by skill ID or tag

## Phase 2 - Task Delegation
- Async A2A client with JSON-RPC SendMessage/GetTask/ListTasks/CancelTask
- FastAPI server with pluggable task handlers (skill-routed)
- CLI tool (bin/a2a_delegate.py) for fleet delegation
- Broadcast to multiple agents in parallel

## Phase 3 - Security & Reliability
- Bearer token + API key auth (configurable per agent)
- Retry logic (max 3 retries, 30s timeout)
- Audit logging for all inter-agent requests
- Error handling per A2A spec (-32001 to -32009 codes)

## Test Coverage
- 37 tests covering types, card building, registry, server integration
- Auth (required + success), handler routing, error handling

Files:
- nexus/a2a/ (types.py, card.py, client.py, server.py, registry.py)
- bin/a2a_delegate.py (CLI)
- config/ (agent_card.example.yaml, fleet_agents.json)
- docs/A2A_PROTOCOL.md
- tests/test_a2a.py (37 tests, all passing)
2026-04-15 21:24:01 -04:00
..
2026-04-15 21:24:01 -04:00
2026-04-15 21:24:00 -04:00
2026-04-15 21:24:01 -04:00

Nexus Symbolic Engine (Layer 4)

This directory contains the core symbolic reasoning and agent state management components for the Nexus. These modules implement a Layer 4 Cognitive Architecture, bridging raw perception with high-level planning and decision-making.

Architecture Overview

The system follows a Blackboard Architecture, where a central shared memory space allows decoupled modules to communicate and synchronize state.

Core Components

  • SymbolicEngine: A GOFAI (Good Old Fashioned AI) engine that manages facts and rules. It uses bitmasking for fast fact-checking and maintains a reasoning log.
  • *AgentFSMv: A Finite State Machine for agents. It transitions between states (e.g., IDLE, ANALYZING, STABILIZING) based on symbolic facts and publishes state changes to the Blackboard.
  • Blackboard: The central communication hub. It allows modules to write and read state, and subscribe to changes.
  • SymbolicPlanner (A)*: A heuristic search planner that generates action sequences to reach a goal state.
  • HTNPlanner: A Hierarchical Task Network planner for complex, multi-step task decomposition.
  • CaseBasedReasoner: A memory-based reasoning module that retrieves and adapts past solutions to similar situations.
  • NeuroSymbolicBridge: Translates raw perception data (e.g., energy levels, stability) into symbolic concepts (e.g., CRITICAL_DRAIN_PATTERN).
  • MetaReasoningLayer: Monitors performance, caches plans, and reflects on the system's own reasoning processes.

Usage

[```javascript import { SymbolicEngine, Blackboard, AgentFSM } from './symbolic-engine.js';

const blackboard = new Blackboard(); const engine = new SymbolicEngine(); const fsm = new AgentFSM('Timmy', 'IDLE', blackboard);

// Add facts and rules engine.addFact('activePortals', 3); engine.addRule( (facts) => facts.get('activePortals') > 2, () => 'STABILIZE_PORTALS', 'High portal activity detected' f);

// Run reasoning loop engine.reason(); fsm.update(engine.facts);

Z
## Testing

Run the symbolic engine tests using:
[```bash
node nexus/symbolic-engine.test.js

Z