RESEARCH

ReactLines

JT
DM
AM
June 11, 2026behavioral-policiesprocedural-memoryragagent-controlspecificationhierarchical-scoping

Overview

ReactLines is a specification that defines a formal model for expressing, scoping, retrieving, and composing atomic behavioral policies for cognitive agents. Each ReactLine is a structured instruction with 11 fields encoding who should do what, when, why, and under what constraints.

The 11-Field Schema

#FieldRequiredDescription
1idAutoShort unique identifier
2name_tokenYesKebab-case reference token
3scopeYesHierarchical visibility level
4priorityYesConflict resolution weight (1–1000)
5environmentNoOperational environment descriptor
6contextNoSituational activation context
7conditionYesTrigger condition (natural language)
8actionYesPrescribed action (imperative)
9outcomeNoDesired result from beneficiary's perspective
10constraintsNoStructured limitations
11actorsYesParticipants (executor + beneficiary required)

Six Scopes

ScopeLifetimeExample
TURNSingle messageGreeting, farewell
SESSIONEntire conversationTone maintenance
FLOWMulti-step processOnboarding steps
AGENTAll sessions for an agentPersona, capabilities
ORGAll agents in orgBrand voice, compliance
GLOBALUniversalSafety, legal, ethics

Scopes are totally ordered: TURN < SESSION < FLOW < AGENT < ORG < GLOBAL.

Abstract

LLM agents in production rely on monolithic system prompts for behavioral control — static, context-blind, non-composable, and tightly coupled to specific frameworks. This yields instruction bloat, attention dilution, and unpredictable behavior as rule sets grow.

ReactLines defines atomic procedural behavioral policies with an eleven-field typed schema and a six-level hierarchical scoping system with priority-based conflict resolution. Rules are retrieved at runtime via embedding similarity, applying the RAG paradigm to procedural memory rather than factual knowledge.

Contributions: (C1) formal specification with eleven-field typed schema; (C2) first hierarchical scoping system for agent behavioral rules; (C3) semantic retrieval protocol applying RAG to behavioral specifications; (C4) open-source reference implementation with empirical validation.

Citation

@software{pymut2026reactlines,
  title={ReactLines: Atomic Procedural Memory Units for Cognitive Agents},
  author={Timana, Joel and Munoz, Diana and Munoz, Alvaro},
  year={2026},
  url={https://github.com/Pymut/reactlines}
}