How roman-simone/autonomous-software-agent works
Project type and purpose
• This is a Node.js-based autonomous agent implementing the Belief-Desire-Intention (BDI) architecture.
• It interacts with the Deliveroo.js game environment via a socket API and optionally with a PDDL solver (local or remote Docker service).
File structure
• Top-level entry point: index.js
• Core layers under the ASAP/ folder:
• belief/ – maintains world model (agentData.js, belief.js, map.js, utilsBelief.js)
• coordination (communication in file tree) – inter-agent messaging (coordination.js)
• intention&revision – BDI control loop (agent.js, intention.js, options.js, utilsOptions.js)
• planners – domain definition and plan generation (domain.pddl, plans.js, utils_planner.js)
• Infrastructure files: config.js (parameters), socketConnection.js (game API), package.json, external PDFs.
Extract insights from the README
• Confirms BDI architecture, single- or multi-agent modes (MASTER/SLAVE), PDDL planning via Planutils or remote solver.
• Dependencies: Node.js, deliveroo-agent.js API, optional Docker/PDDL server.
Main components
a. Agent Control Layer (index.js)
• Orchestrates startup (reads config, chooses ONE/TWO mode)
b. Communication Layer
• socketConnection.js ↔ Deliveroo.js game server (REST/WebSocket)
• coordination.js ↔ peer agents (in multi-agent mode)
c. Belief Layer
• belief.js, map.js, agentData.js – stores and updates world state
d. Planning Layer
• plans.js, utils_planner.js, domain.pddl – generates or retrieves PDDL plans
• External PDDL solver service (HTTP API)
e. Intention & Revision Layer
• options.js + utilsOptions.js – generates candidate goals/options
• intention.js – executes chosen plan/actions
f. Configuration
• config.js – parameters for connection, planning, thresholds
Relationships and data flows
• index.js invokes socketConnection to receive environment updates → passes raw state to Belief Layer → updates internal world model.
• Belief Layer publishes a snapshot to the Intention & Revision Layer → Options module computes utilities → Intention module selects plan.
• If plan requires PDDL, Intention module calls Planning Layer → communicates with local/remote PDDL solver → receives plan steps.
• Intention module issues actions via socketConnection to the game server.
• In multi-agent mode, coordination.js sends/receives messages to/from other agents (state sharing, task handoff).
Architectural patterns & principles
• BDI (Belief-Desire-Intention) layered architecture
• Modular separation: communication, state management, planning, decision logic
• Externalization of PDDL planning as a service (loose coupling)
• Configurable via config.js for easy experimentation
Final checklist
• All major components and sub-modules clearly labeled.
• A title and brief annotation explaining the overall BDI workflow.