loop - kongusen/loom-agent GitHub Wiki
L* is Loom's internal execution loop. It is the engine behind Agent.run(), Session.run(), and Run.wait().
L* = (Reason -> Act -> Observe -> Delta)*
| Phase | What happens |
|---|---|
Reason |
build messages, call the model, interpret next step |
Act |
execute tool calls and safety checks |
Observe |
feed results back into runtime context |
Delta |
decide whether to continue, renew, or finish |
| Public API | Internal loop effect |
|---|---|
agent.run(...) |
starts one L* execution |
session.run(...) |
starts one L* execution with session reuse |
run.events() |
streams runtime events emitted during L* |
RunResult |
materialized output after L* exits |
L* behavior is controlled indirectly through:
RuntimeConfig.limitsRuntimeConfig.featuresGenerationConfigHeartbeatConfigSafetyRule
loom/runtime/loop.pyloom/runtime/engine.py