Skip to content

Your lightweight open-source personal agent.

refactor(loop): log turn completion with state count

chengyongrude13e72e1528
diff --git a/nanobot/agent/loop.py b/nanobot/agent/loop.py
index ea3e50e11..d89ab3007 100644
--- a/nanobot/agent/loop.py
+++ b/nanobot/agent/loop.py
@@ -1325,6 +1325,11 @@ class AgentLoop:
)
ctx.state = next_state
+ logger.debug(
+ "[turn {}] Turn completed after {} states",
+ ctx.turn_id,
+ len(ctx.trace),
+ )
return ctx.outbound
def _assemble_outbound(