[P1] Implement rlm_agent supervision with engines, mailboxes, and bounded workers #11

Closed
opened 2026-08-12 01:18:54 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-08-12 01:18:54 +00:00 (Migrated from github.com)

Goal

Make logical agents a first-class Prolog runtime concept without mapping every agent to an unbounded OS thread.

Scope

  • represent agents with SWI engines/state machines;
  • define supervisor/child relationships;
  • define mailbox message terms for request/result/spawn/cancel/checkpoint/budget events;
  • use bounded worker pools for blocking provider/tool work;
  • add bounded queues/backpressure;
  • propagate cancellation and failures through supervision;
  • narrow inherited capabilities for child agents;
  • support spawn_agent from the typed plan language.

Acceptance criteria

  • parent can spawn a child with a narrower capability set;
  • multiple logical agents can share a bounded worker pool;
  • queue limits apply backpressure rather than unbounded spawning;
  • child failure is observable by the supervisor;
  • cancellation propagates to child work;
  • tests exercise normal completion, child crash, cancellation, and queue saturation.

Dependencies

Research

See RLM-RESEARCH-005-swi-agent-runtime.org and RLM-RESEARCH-002-agentic-harness.org.

## Goal Make logical agents a first-class Prolog runtime concept without mapping every agent to an unbounded OS thread. ## Scope - represent agents with SWI engines/state machines; - define supervisor/child relationships; - define mailbox message terms for request/result/spawn/cancel/checkpoint/budget events; - use bounded worker pools for blocking provider/tool work; - add bounded queues/backpressure; - propagate cancellation and failures through supervision; - narrow inherited capabilities for child agents; - support `spawn_agent` from the typed plan language. ## Acceptance criteria - parent can spawn a child with a narrower capability set; - multiple logical agents can share a bounded worker pool; - queue limits apply backpressure rather than unbounded spawning; - child failure is observable by the supervisor; - cancellation propagates to child work; - tests exercise normal completion, child crash, cancellation, and queue saturation. ## Dependencies - #8 - #9 - #10 - parent #3 ## Research See `RLM-RESEARCH-005-swi-agent-runtime.org` and `RLM-RESEARCH-002-agentic-harness.org`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/prolog-rlm#11
No description provided.