Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Building a "Jarvis" agent mesh with Neuron workflows

Description and use

The "Jarvis" system uses Neuron AI to coordinate PHP agents, ensuring sequencing, idempotence, and monitoring without embedded scheduling.

Problem

Coordinating multiple role‑specific PHP agents (Research, Operations, Briefing) without embedding scheduling or transport logic in the agents themselves.

Outcome

The prototype ran end‑to‑end with simulated agents; failed agents were resumed without repeating completed steps; watchdog raised alerts correctly and avoided duplicates.

Workflow

  • Define typed event classes (BriefingStarted, ResearchCompleted, OperationsCompleted, BriefingComposed).
  • Implement four adapters: JarvisSignalBus, JarvisKnowledgeStore, JarvisHeartbeatStore, JarvisAgentFactory.
  • Create DailyBriefingWorkflow that routes events between agents using memoize() for idempotence.
  • Create WatchdogWorkflow that runs a single‑pass sweep to detect stale or missing agents and publishes agent.heartbeat.stale signals.
  • Instantiate workflow with persistence and resources, then run it to obtain the briefing.
  • Use durable shared bus and knowledge store, and multi‑process‑safe persistence for overlapping workers.

Evidence

Three agents each have one job: Research prepares sourced highlights for the day. Operations summarizes status and risks, in light of the research. Briefing composes the final daily briefing from both.

Source

They never call each other. A Neuron Workflow routes between them using typed events: BriefingStarted -> ResearchCompleted -> OperationsCompleted -> BriefingComposed.

Source

The example deliberately defines four small interfaces that your application implements: JarvisSignalBus, JarvisKnowledgeStore, JarvisHeartbeatStore, JarvisAgentFactory.

Source

Agent calls go through the node's memoize(), so a completed agent call is not repeated when an interrupted run resumes.

Source

The second workflow, WatchdogWorkflow, is a single‑pass sweep. For each agent, one node checks the last heartbeat and, if it is stale or missing, writes a note and publishes an agent.heartbeat.stale signal.

Source

I ran the example against Neuron 4.1 with simulated agents and in‑memory adapters (no real LLM, no real database). The briefing ran end to end; an agent that failed mid‑run was resumed without repeating the completed research step; and the watchdog raised one alert for a stale agent and one for a missing agent, ignored a healthy one, and did not duplicate alerts on a second sweep.

Source

  • Record date: 2026-10-17T03:41:00.263Z